aboutsummaryrefslogtreecommitdiffstats
path: root/laas/actions/workflows/set_boot_workflow.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'laas/actions/workflows/set_boot_workflow.yaml')
-rw-r--r--laas/actions/workflows/set_boot_workflow.yaml60
1 files changed, 60 insertions, 0 deletions
diff --git a/laas/actions/workflows/set_boot_workflow.yaml b/laas/actions/workflows/set_boot_workflow.yaml
new file mode 100644
index 0000000..53529b6
--- /dev/null
+++ b/laas/actions/workflows/set_boot_workflow.yaml
@@ -0,0 +1,60 @@
+---
+##############################################################################
+# 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.set_boot_workflow:
+ description: "Will set the host's boot option to the correct pxe option"
+ type: direct
+ input:
+ - host
+
+ tasks:
+
+ get_ipmi_hostname:
+ action: laas.get_ipmi_hostname host=<% $.host %>
+ publish:
+ ipmi_name: <% task(get_ipmi_hostname).result.result %>
+ on-success: get_ipmi_password
+
+ get_ipmi_password:
+ action: laas.get_ipmi_password host=<% $.ipmi_name %>
+ publish:
+ password: <% task(get_ipmi_password).result.result %>
+ on-success: get_host_type
+
+ get_host_type:
+ action: laas.get_host_type host=<% $.host %>
+ publish:
+ type: <% task(get_host_type).result.result %>
+ on-success:
+ - hpe: <% $.type = "hpe" %>
+ - arm: <% $.type = "arm" %>
+
+ hpe:
+ action: laas.set_hpe_boot
+ input:
+ user: "Administrator"
+ passwd: <% $.password %>
+ host: <% $.ipmi_name %>
+
+ arm:
+ action: laas.set_arm_boot
+ input:
+ user: "ADMIN"
+ passwd: <% $.password %>
+ host: <% $.ipmi_name %>