Add workflow to generate fencing parameters

Create a workflow to supplant the need for a direct action call to
generate fencing parameters.

Change-Id: I63f3a579af5aa70080f8c9cdd5eb0e8f5b3d17da
Partial-Bug: #1640436
This commit is contained in:
Brad P. Crochet 2018-02-27 13:56:24 +00:00
parent 89db127b44
commit 2c7fb29c16
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
features:
- |
Add a workflow to generate fencing parameters so action
tripleo.parameters.generate_fencing does not need to be called directly.

61
workbooks/parameters.yaml Normal file
View File

@ -0,0 +1,61 @@
---
version: '2.0'
name: tripleo.parameters.v1
description: TripleO Parameter-related Workflows
workflows:
generate_fencing_parameters:
description: >
This workflow will generate fencing parameters from the given inputs for
a deployment.
input:
- nodes_json
- os_auth
- fence_action
- delay
- ipmi_level
- ipmi_cipher
- ipmi_lanplus
- queue_name: tripleo
tags:
- tripleo-common-managed
output:
fencing_parameters: <% $.get('fencing_parameters', {}) %>
tasks:
generate_fencing_params:
action: tripleo.parameters.generate_fencing
input:
nodes_json: <% $.nodes_json %>
os_auth: <% $.os_auth %>
fence_action: <% $.fence_action %>
delay: <% $.delay %>
ipmi_level: <% $.ipmi_level %>
ipmi_cipher: <% $.ipmi_cipher %>
ipmi_lanplus: <% $.ipmi_lanplus %>
on-complete: notify_zaqar
publish:
fencing_parameters: <% task().result %>
status: SUCCESS
message: 'Fencing parameters successfully generated'
publish-on-error:
status: FAILED
message: <% task().result %>
notify_zaqar:
action: zaqar.queue_post
input:
queue_name: <% $.queue_name %>
messages:
body:
type: tripleo.parameters.v1.generate_fencing_parameters
payload:
status: <% $.status %>
message: <% $.get('message', '') %>
execution: <% execution() %>
fencing_parameters: <% $.get('fencing_parameters', {}) %>
on-success:
- fail: <% $.get('status') = "FAILED" %>