From ab24a8de07dac62569ec79425241a6b974ed32a9 Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Thu, 10 Oct 2019 15:07:45 -0400 Subject: Updated LaaS-Reflab We have had divergent repositories for the code that runs in UNH because of difficulties with Gerrit and developer laziness. This incorporates the previous change (removing all references to pharos) and updates everything to what is currently running. Change-Id: I5c83c70d5ca686dfa03d49936fdce1603cdac16c Signed-off-by: Parker Berberian --- laas/actions/workflows/set_boot_workflow.yaml | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 laas/actions/workflows/set_boot_workflow.yaml (limited to 'laas/actions/workflows/set_boot_workflow.yaml') 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 %> -- cgit 1.2.3-korg