diff --git a/awxkit/awxkit/cli/custom.py b/awxkit/awxkit/cli/custom.py index ad2af3b433..45146b493e 100644 --- a/awxkit/awxkit/cli/custom.py +++ b/awxkit/awxkit/cli/custom.py @@ -225,6 +225,7 @@ class AssociationMixin(object): def __init__(self, connection, resource): self.conn = connection self.resource = { + 'approval_notification': 'notification_templates', 'start_notification': 'notification_templates', 'success_notification': 'notification_templates', 'failure_notification': 'notification_templates', @@ -299,11 +300,21 @@ JobTemplateNotificationDisAssociation.targets.update({ class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction): resource = 'workflow_job_templates' action = 'associate' + targets = NotificationAssociateMixin.targets.copy() class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction): resource = 'workflow_job_templates' action = 'disassociate' + targets = NotificationAssociateMixin.targets.copy() + + +WorkflowJobTemplateNotificationAssociation.targets.update({ + 'approval_notification': ['notification_templates_approvals', 'notification_template'], +}) +WorkflowJobTemplateNotificationDisAssociation.targets.update({ + 'approval_notification': ['notification_templates_approvals', 'notification_template'], +}) class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction): @@ -329,11 +340,21 @@ class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, Cust class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction): resource = 'organizations' action = 'associate' + targets = NotificationAssociateMixin.targets.copy() class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction): resource = 'organizations' action = 'disassociate' + targets = NotificationAssociateMixin.targets.copy() + + +OrganizationNotificationAssociation.targets.update({ + 'approval_notification': ['notification_templates_approvals', 'notification_template'], +}) +OrganizationNotificationDisAssociation.targets.update({ + 'approval_notification': ['notification_templates_approvals', 'notification_template'], +}) class SettingsList(CustomAction): diff --git a/awxkit/awxkit/cli/docs/README.md b/awxkit/awxkit/cli/docs/README.md index 11676ee5dd..d8f1dfc85a 100644 --- a/awxkit/awxkit/cli/docs/README.md +++ b/awxkit/awxkit/cli/docs/README.md @@ -1,7 +1,7 @@ AWX Command Line Interface ========================== -awx is the official command-line client for AWX. It: +`awx` is the official command-line client for AWX. It: * Uses naming and structure consistent with the AWX HTTP API * Provides consistent output formats with optional machine-parsable formats