expand documentation for WFJT node list

This commit is contained in:
AlanCoding
2016-10-26 09:28:20 -04:00
parent 04013e4d9f
commit 8165141210
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Workflow Job Template Workflow Node List
Workflow nodes reference templates to execute and define the ordering
in which to execute them. After a job ran as part of a workflow finishes
the subsequent actions will be to.
- run nodes contained in "failure_nodes" or "always_nodes" if job failed
- run nodes contained in "success_nodes" or "always_nodes" if job succeeded
The workflow will be marked as failed if any jobs ran as a part of the workflow
fail and have the field `fail_on_job_failure` set to true. If not, the
workflow job will be marked as successful.
{% include "api/sub_list_create_api_view.md" %}

View File

@@ -2404,6 +2404,7 @@ class JobTemplateLabelList(DeleteLastUnattachLabelMixin, SubListCreateAttachDeta
serializer_class = LabelSerializer
parent_model = JobTemplate
relationship = 'labels'
new_in_300 = True
def post(self, request, *args, **kwargs):
# If a label already exists in the database, attach it instead of erroring out
@@ -2697,6 +2698,7 @@ class WorkflowJobTemplateList(ListCreateAPIView):
model = WorkflowJobTemplate
serializer_class = WorkflowJobTemplateListSerializer
always_allow_superuser = False
new_in_310 = True
# TODO: RBAC
'''
@@ -2714,10 +2716,12 @@ class WorkflowJobTemplateDetail(RetrieveUpdateDestroyAPIView):
model = WorkflowJobTemplate
serializer_class = WorkflowJobTemplateSerializer
always_allow_superuser = False
new_in_310 = True
class WorkflowJobTemplateLabelList(JobTemplateLabelList):
parent_model = WorkflowJobTemplate
new_in_310 = True
# TODO:
@@ -2725,6 +2729,7 @@ class WorkflowJobTemplateLaunch(GenericAPIView):
model = WorkflowJobTemplate
serializer_class = EmptySerializer
new_in_310 = True
def get(self, request, *args, **kwargs):
data = {}
@@ -2750,6 +2755,7 @@ class WorkflowJobTemplateWorkflowNodesList(SubListCreateAPIView):
parent_model = WorkflowJobTemplate
relationship = 'workflow_job_template_nodes'
parent_key = 'workflow_job_template'
new_in_310 = True
def update_raw_data(self, data):
for fd in ['job_type', 'job_tags', 'skip_tags', 'limit', 'skip_tags']:
@@ -2770,12 +2776,14 @@ class WorkflowJobList(ListCreateAPIView):
model = WorkflowJob
serializer_class = WorkflowJobListSerializer
new_in_310 = True
# TODO:
class WorkflowJobDetail(RetrieveDestroyAPIView):
model = WorkflowJob
serializer_class = WorkflowJobSerializer
new_in_310 = True
class WorkflowJobWorkflowNodesList(SubListAPIView):
@@ -2785,6 +2793,7 @@ class WorkflowJobWorkflowNodesList(SubListAPIView):
parent_model = WorkflowJob
relationship = 'workflow_job_nodes'
parent_key = 'workflow_job'
new_in_310 = True
class SystemJobTemplateList(ListAPIView):