mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 20:20:06 -03:30
Update code to be compatible with py2
This commit is contained in:
@@ -300,27 +300,21 @@ JobTemplateNotificationDisAssociation.targets.update({
|
||||
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||
resource = 'workflow_job_templates'
|
||||
action = 'associate'
|
||||
targets = dict(
|
||||
**NotificationAssociateMixin.targets,
|
||||
**{'approval_notification': [
|
||||
'notification_templates_approvals',
|
||||
'notification_template'
|
||||
]
|
||||
},
|
||||
)
|
||||
targets = NotificationAssociateMixin.targets.copy()
|
||||
|
||||
|
||||
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
|
||||
resource = 'workflow_job_templates'
|
||||
action = 'disassociate'
|
||||
targets = dict(
|
||||
**NotificationAssociateMixin.targets,
|
||||
**{'approval_notification': [
|
||||
'notification_templates_approvals',
|
||||
'notification_template'
|
||||
]
|
||||
},
|
||||
)
|
||||
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):
|
||||
@@ -346,29 +340,22 @@ class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, Cust
|
||||
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||
resource = 'organizations'
|
||||
action = 'associate'
|
||||
targets = dict(
|
||||
**NotificationAssociateMixin.targets,
|
||||
**{'approval_notification': [
|
||||
'notification_templates_approvals',
|
||||
'notification_template'
|
||||
]
|
||||
},
|
||||
)
|
||||
targets = NotificationAssociateMixin.targets.copy()
|
||||
|
||||
|
||||
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
|
||||
resource = 'organizations'
|
||||
action = 'disassociate'
|
||||
targets = dict(
|
||||
**NotificationAssociateMixin.targets,
|
||||
**{'approval_notification': [
|
||||
'notification_templates_approvals',
|
||||
'notification_template'
|
||||
]
|
||||
},
|
||||
)
|
||||
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):
|
||||
action = 'list'
|
||||
resource = 'settings'
|
||||
|
||||
Reference in New Issue
Block a user