mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 03:17:39 -02:30
Enable notification endpoints.
This commit is contained in:
@@ -2857,6 +2857,29 @@ class WorkflowJobTemplateSchedulesList(SubListCreateAttachDetachAPIView):
|
||||
parent_model = WorkflowJobTemplate
|
||||
relationship = 'schedules'
|
||||
parent_key = 'unified_job_template'
|
||||
|
||||
class WorkflowJobTemplateNotificationTemplatesAnyList(SubListCreateAttachDetachAPIView):
|
||||
|
||||
model = NotificationTemplate
|
||||
serializer_class = NotificationTemplateSerializer
|
||||
parent_model = WorkflowJobTemplate
|
||||
relationship = 'notification_templates_any'
|
||||
new_in_310 = True
|
||||
|
||||
class WorkflowJobTemplateNotificationTemplatesErrorList(SubListCreateAttachDetachAPIView):
|
||||
|
||||
model = NotificationTemplate
|
||||
serializer_class = NotificationTemplateSerializer
|
||||
parent_model = WorkflowJobTemplate
|
||||
relationship = 'notification_templates_error'
|
||||
new_in_310 = True
|
||||
|
||||
class WorkflowJobTemplateNotificationTemplatesSuccessList(SubListCreateAttachDetachAPIView):
|
||||
|
||||
model = NotificationTemplate
|
||||
serializer_class = NotificationTemplateSerializer
|
||||
parent_model = WorkflowJobTemplate
|
||||
relationship = 'notification_templates_success'
|
||||
new_in_310 = True
|
||||
|
||||
# TODO:
|
||||
@@ -2900,6 +2923,14 @@ class WorkflowJobCancel(RetrieveAPIView):
|
||||
else:
|
||||
return self.http_method_not_allowed(request, *args, **kwargs)
|
||||
|
||||
class WorkflowJobNotificationsList(SubListAPIView):
|
||||
|
||||
model = Notification
|
||||
serializer_class = NotificationSerializer
|
||||
parent_model = WorkflowJob
|
||||
relationship = 'notifications'
|
||||
new_in_310 = True
|
||||
|
||||
class SystemJobTemplateList(ListAPIView):
|
||||
|
||||
model = SystemJobTemplate
|
||||
|
||||
Reference in New Issue
Block a user