mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Added instance_groups method to the awxkit models
Also added additional payload fields to the wfjt model.
This commit is contained in:
committed by
Alan Rominger
parent
4579ab0d60
commit
ffe970aee5
@@ -48,10 +48,12 @@ class Schedules(page.PageList, Schedule):
|
||||
self.related.credentials.post(dict(id=cred.id, disassociate=True))
|
||||
|
||||
def add_label(self, label):
|
||||
if isinstance(label, page.Page):
|
||||
label = label.json
|
||||
with suppress(exc.NoContent):
|
||||
self.related.labels.post(label)
|
||||
self.related.labels.post(dict(id=label.id))
|
||||
|
||||
def add_instance_group(self, instance_group):
|
||||
with suppress(exc.NoContent):
|
||||
self.related.instance_groups.post(dict(id=instance_group.id))
|
||||
|
||||
|
||||
page.register_page([resources.schedules, resources.related_schedules], Schedules)
|
||||
|
||||
Reference in New Issue
Block a user