mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
Update views and serializers to support instance group (ramparts)
* includes top level views for instances and instance groups and extending those views to be able to view running jobs * Associative endpoints on Organizations, Inventories, and Job Templates * Related and summary field entries where appropriate * Adding job model references to executing instance group * Fix up default queue properties for clustering from the settings file * Update production and default settings for instance queues in settings
This commit is contained in:
@@ -29,11 +29,11 @@ class Command(BaseCommand):
|
||||
instance_list = [x.strip() for x in options.get('hostnames').split(",")]
|
||||
for inst_name in instance_list:
|
||||
instance = Instance.objects.filter(hostname=inst_name)
|
||||
if instance.exists() and instance not in ig.instances:
|
||||
ig.instances.add(instance)
|
||||
print("Added instance {} to {}".format(instance, ig))
|
||||
if instance.exists() and instance not in ig.instances.all():
|
||||
ig.instances.add(instance[0])
|
||||
print("Added instance {} to {}".format(instance[0], ig))
|
||||
elif not instance.exists():
|
||||
print("Instance does not exist: {}".format(instance))
|
||||
print("Instance does not exist: {}".format(inst_name))
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("Instance already registered {}".format(instance))
|
||||
print("Instance already registered {}".format(instance[0]))
|
||||
|
||||
Reference in New Issue
Block a user