mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -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):
|
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
resource = 'workflow_job_templates'
|
resource = 'workflow_job_templates'
|
||||||
action = 'associate'
|
action = 'associate'
|
||||||
targets = dict(
|
targets = NotificationAssociateMixin.targets.copy()
|
||||||
**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(
|
targets = NotificationAssociateMixin.targets.copy()
|
||||||
**NotificationAssociateMixin.targets,
|
|
||||||
**{'approval_notification': [
|
|
||||||
'notification_templates_approvals',
|
WorkflowJobTemplateNotificationAssociation.targets.update({
|
||||||
'notification_template'
|
'approval_notification': ['notification_templates_approvals', 'notification_template'],
|
||||||
]
|
})
|
||||||
},
|
WorkflowJobTemplateNotificationDisAssociation.targets.update({
|
||||||
)
|
'approval_notification': ['notification_templates_approvals', 'notification_template'],
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
@@ -346,29 +340,22 @@ class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, Cust
|
|||||||
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
|
||||||
resource = 'organizations'
|
resource = 'organizations'
|
||||||
action = 'associate'
|
action = 'associate'
|
||||||
targets = dict(
|
targets = NotificationAssociateMixin.targets.copy()
|
||||||
**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(
|
targets = NotificationAssociateMixin.targets.copy()
|
||||||
**NotificationAssociateMixin.targets,
|
|
||||||
**{'approval_notification': [
|
|
||||||
'notification_templates_approvals',
|
|
||||||
'notification_template'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
OrganizationNotificationAssociation.targets.update({
|
||||||
|
'approval_notification': ['notification_templates_approvals', 'notification_template'],
|
||||||
|
})
|
||||||
|
OrganizationNotificationDisAssociation.targets.update({
|
||||||
|
'approval_notification': ['notification_templates_approvals', 'notification_template'],
|
||||||
|
})
|
||||||
|
|
||||||
class SettingsList(CustomAction):
|
class SettingsList(CustomAction):
|
||||||
action = 'list'
|
action = 'list'
|
||||||
resource = 'settings'
|
resource = 'settings'
|
||||||
|
|||||||
Reference in New Issue
Block a user