Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'disassociate'
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'associate'
class ProjectNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'disassociate'
class InventorySourceNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'associate'
class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'disassociate'
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
action = 'associate'
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
class ProjectNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'disassociate'
class InventorySourceNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'associate'
class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'disassociate'
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
action = 'associate'
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
action = 'disassociate'
class SettingsList(CustomAction):
action = 'list'
resource = 'settings'
def add_arguments(self, parser):
parser.choices['list'].add_argument(
'--slug', help='optional setting category/slug', default='all'
'start_notification': [
'notification_templates_started',
'notification_template'
],
'success_notification': [
'notification_templates_success',
'notification_template'
],
'failure_notification': [
'notification_templates_error',
'notification_template'
],
}
class JobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'job_templates'
action = 'associate'
targets = NotificationAssociateMixin.targets.copy()
class JobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'job_templates'
action = 'disassociate'
targets = NotificationAssociateMixin.targets.copy()
JobTemplateNotificationAssociation.targets.update({
'credential': ['credentials', None],
})
JobTemplateNotificationDisAssociation.targets.update({
'credential': ['credentials', None],
'notification_template'
],
'failure_notification': [
'notification_templates_error',
'notification_template'
],
}
class JobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'job_templates'
action = 'associate'
targets = NotificationAssociateMixin.targets.copy()
class JobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'job_templates'
action = 'disassociate'
targets = NotificationAssociateMixin.targets.copy()
JobTemplateNotificationAssociation.targets.update({
'credential': ['credentials', None],
})
JobTemplateNotificationDisAssociation.targets.update({
'credential': ['credentials', None],
})
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'associate'
class InventorySourceNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'associate'
class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'disassociate'
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
action = 'associate'
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
action = 'disassociate'
class SettingsList(CustomAction):
action = 'list'
resource = 'settings'
def add_arguments(self, parser):
parser.choices['list'].add_argument(
'--slug', help='optional setting category/slug', default='all'
)
def perform(self, slug):
self.page.endpoint = self.page.endpoint + '{}/'.format(slug)
return self.page.get()
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'associate'
class ProjectNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'disassociate'
class InventorySourceNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'associate'
class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'disassociate'
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
action = 'associate'
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'
action = 'disassociate'
class SettingsList(CustomAction):
action = 'list'
JobTemplateNotificationDisAssociation.targets.update({
'credential': ['credentials', None],
})
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'associate'
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'disassociate'
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'associate'
class ProjectNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'disassociate'
class InventorySourceNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'associate'
class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
class JobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'job_templates'
action = 'disassociate'
targets = NotificationAssociateMixin.targets.copy()
JobTemplateNotificationAssociation.targets.update({
'credential': ['credentials', None],
})
JobTemplateNotificationDisAssociation.targets.update({
'credential': ['credentials', None],
})
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'associate'
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'disassociate'
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'associate'
class ProjectNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
'notification_templates_error',
'notification_template'
],
}
class JobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'job_templates'
action = 'associate'
targets = NotificationAssociateMixin.targets.copy()
class JobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'job_templates'
action = 'disassociate'
targets = NotificationAssociateMixin.targets.copy()
JobTemplateNotificationAssociation.targets.update({
'credential': ['credentials', None],
})
JobTemplateNotificationDisAssociation.targets.update({
'credential': ['credentials', None],
})
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'associate'
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'associate'
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates'
action = 'disassociate'
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'associate'
class ProjectNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'projects'
action = 'disassociate'
class InventorySourceNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'associate'
class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'inventory_sources'
action = 'disassociate'
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations'