mirror of
https://github.com/ansible/awx.git
synced 2026-03-05 18:51:06 -03:30
Changes in posting constraints due to rescoping to OCP/K8S-only
- node_state is now read only - node_state gets set automatically to Installed in the create view - raise a validation error when creating on non-K8S - allow SystemAdministrator the 'add' permission for Instances - expose the new listener_port field
This commit is contained in:
@@ -367,6 +367,9 @@ class InstanceList(ListCreateAPIView):
|
||||
search_fields = ('hostname',)
|
||||
ordering = ('id',)
|
||||
|
||||
def perform_create(self, serializer):
|
||||
serializer.save(node_state=models.Instance.States.INSTALLED)
|
||||
|
||||
|
||||
class InstanceDetail(RetrieveUpdateAPIView):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user