mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 00:08:44 -03:30
Merge pull request #3805 from beeankha/cli_approval_notification_support
Enable Approval Notification Support for CLI
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user