aboutsummaryrefslogtreecommitdiffstats
path: root/laas/actions/workflows/software_workflow.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'laas/actions/workflows/software_workflow.yaml')
-rw-r--r--laas/actions/workflows/software_workflow.yaml90
1 files changed, 90 insertions, 0 deletions
diff --git a/laas/actions/workflows/software_workflow.yaml b/laas/actions/workflows/software_workflow.yaml
new file mode 100644
index 0000000..4f22117
--- /dev/null
+++ b/laas/actions/workflows/software_workflow.yaml
@@ -0,0 +1,90 @@
+---
+##############################################################################
+# Copyright 2018 Parker Berberian and Others #
+# #
+# Licensed under the Apache License, Version 2.0 (the License); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an AS IS BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+##############################################################################
+
+version: '2.0'
+laas.software_workflow:
+ description: fulfills a software install job
+ input:
+ - task_id
+ - job_id
+
+ tasks:
+
+ start_task:
+ action: laas.start_task
+ input:
+ task_id: <% $.task_id %>
+ job_id: <% $.job_id %>
+ on-success: get_task
+
+ get_task:
+ action: laas.get_task
+ input:
+ job_id: <% $.job_id %>
+ task_id: <% $.task_id %>
+ type: "software"
+ publish:
+ task_data: <% task(get_task).result.result %>
+ on-success:
+ - software_task
+
+ software_task:
+ action: core.local cmd="exit 0"
+ on-success:
+ - opnfv_install: <% $.task_data.containsKey("opnfv")
+ and $.task_data.opnfv.containsKey("installer") %>
+ on-error: retry
+
+ opnfv_install:
+ action: laas.get_xdf
+ input:
+ task_data: <% $.task_data %>
+ publish:
+ pdf: <% task(opnfv_install).result.result.pdf %>
+ idf: <% task(opnfv_install).result.result.idf %>
+ on-success:
+ start_opnfv_install
+
+ start_opnfv_install:
+ action: laas.opnfv_master_workflow
+ input:
+ hosts: <% $.task_data.opnfv.get("roles") %>
+ installer: <% $.task_data.opnfv.get("installer") %>
+ scenario: <% $.task_data.opnfv.get("scenario") %>
+ virtual: <% len($.task_data.opnfv.get("roles", [])) = 1 %>
+ pdf: <% $.pdf %>
+ idf: <% $.idf %>
+ on-complete: finish
+
+ finish:
+ action: laas.finish_task
+ input:
+ task_id: <% $.task_id %>
+ job_id: <% $.job_id %>
+
+ retry:
+ action: core.local cmd="exit 0"
+ on-success: software_task
+ on-error: task_error
+
+ task_error:
+ action: laas.error_task
+ input:
+ task_id: <% $.task_id %>
+ job_id: <% $.job_id %>
+ on-complete:
+ - fail