mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Enable approval notification support for CLI
This commit is contained in:
@@ -225,6 +225,7 @@ class AssociationMixin(object):
|
|||||||
def __init__(self, connection, resource):
|
def __init__(self, connection, resource):
|
||||||
self.conn = connection
|
self.conn = connection
|
||||||
self.resource = {
|
self.resource = {
|
||||||
|
'approval_notification': 'notification_templates',
|
||||||
'start_notification': 'notification_templates',
|
'start_notification': 'notification_templates',
|
||||||
'success_notification': 'notification_templates',
|
'success_notification': 'notification_templates',
|
||||||
'failure_notification': 'notification_templates',
|
'failure_notification': 'notification_templates',
|
||||||
@@ -299,11 +300,27 @@ JobTemplateNotificationDisAssociation.targets.update({
|
|||||||
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
resource = 'workflow_job_templates'
|
resource = 'workflow_job_templates'
|
||||||
action = 'associate'
|
action = 'associate'
|
||||||
|
targets = dict(
|
||||||
|
**NotificationAssociateMixin.targets,
|
||||||
|
**{'approval_notification': [
|
||||||
|
'notification_templates_approvals',
|
||||||
|
'notification_template'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
|
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
resource = 'workflow_job_templates'
|
resource = 'workflow_job_templates'
|
||||||
action = 'disassociate'
|
action = 'disassociate'
|
||||||
|
targets = dict(
|
||||||
|
**NotificationAssociateMixin.targets,
|
||||||
|
**{'approval_notification': [
|
||||||
|
'notification_templates_approvals',
|
||||||
|
'notification_template'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
@@ -329,11 +346,27 @@ class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, Cust
|
|||||||
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
resource = 'organizations'
|
resource = 'organizations'
|
||||||
action = 'associate'
|
action = 'associate'
|
||||||
|
targets = dict(
|
||||||
|
**NotificationAssociateMixin.targets,
|
||||||
|
**{'approval_notification': [
|
||||||
|
'notification_templates_approvals',
|
||||||
|
'notification_template'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
|
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
resource = 'organizations'
|
resource = 'organizations'
|
||||||
action = 'disassociate'
|
action = 'disassociate'
|
||||||
|
targets = dict(
|
||||||
|
**NotificationAssociateMixin.targets,
|
||||||
|
**{'approval_notification': [
|
||||||
|
'notification_templates_approvals',
|
||||||
|
'notification_template'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class SettingsList(CustomAction):
|
class SettingsList(CustomAction):
|
||||||
|
|||||||
Reference in New Issue
Block a user