Create get_flattened_parameters workflow

The 'tripleo.parameters.get_flatten' action is called directly
as an action in tripleo-ui and should instead be called via a
workflow.

This code create the related workflow that will be used instead
of the action

Change-Id: I2b560dc084f54042598b72c9c3280ccfa2a4181a
Fixes-bug: #1759413
This commit is contained in:
Mike Fedosin 2018-04-04 19:14:07 +02:00 committed by Ryan Brady
parent 1c32aa5f9e
commit 84b76ef66c
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
features:
- |
Creates a worflow to get flattened deployment parameters, so the related
action does not need to be called directly.

View File

@ -146,6 +146,42 @@ workflows:
payload:
result: <% $.get('result', '') %>
get_flattened_parameters:
description: Workflow to retreive a list of flattened parameters
input:
- plan: overcloud
- queue_name: tripleo
output:
flattened_parameters: <% $.flattened_parameters %>
tags:
- tripleo-common-managed
tasks:
get_flattened_parameters:
action: tripleo.parameters.get_flatten container=<% $.plan %>
on-success: send_message
publish:
status: SUCCESS
message: <% task().result %>
flattened_parameters: <% task().result %>
publish-on-error:
status: FAILED
message: <% task().result %>
send_message:
workflow: tripleo.messaging.v1.send
input:
queue_name: <% $.queue_name %>
type: <% execution().name %>
status: <% $.get('status', 'SUCCESS')
execution: <% execution() %>
messages: <% $.get('message', '') %>
payload:
flattened_parameters: <% $.get('flattened_parameters', []) %>
_derive_parameters_per_role:
description: >
Workflow which runs per role to get the introspection data on the first matching node assigned to role.