mirror of
https://github.com/ansible/awx.git
synced 2026-02-21 13:10:11 -03:30
Add functional API tests
add tests for calling write_receptor_config add write_receptor_config test Do not set default listener_port on control node
This commit is contained in:
@@ -5506,6 +5506,9 @@ class InstanceSerializer(BaseSerializer):
|
||||
return super().validate(attrs)
|
||||
|
||||
def validate_node_type(self, value):
|
||||
if not self.instance and value not in [Instance.Types.HOP, Instance.Types.EXECUTION]:
|
||||
raise serializers.ValidationError("Can only create execution nodes.")
|
||||
|
||||
if self.instance and self.instance.node_type != value:
|
||||
raise serializers.ValidationError(_("Cannot change node type."))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user