mirror of
https://github.com/ansible/awx.git
synced 2026-08-06 13:00:05 -02:30
Add new add_label method to the wfjt node and schedules awxkit models
This commit is contained in:
committed by
Alan Rominger
parent
efeeeefd4c
commit
4579ab0d60
@@ -47,6 +47,12 @@ class Schedules(page.PageList, Schedule):
|
||||
with suppress(exc.NoContent):
|
||||
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)
|
||||
|
||||
|
||||
page.register_page([resources.schedules, resources.related_schedules], Schedules)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user