From 8490ebd7b5c25711e5faeef9094429fa764a8463 Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Fri, 2 Dec 2016 14:59:45 +0000 Subject: [PATCH] When making sub-workflow calls, pass the queue_name When we make sud-workflow calls we should pass the queue name that was provided. At the moment, with the CLI, we are only getting messages from the "main" workflow, all the sub-workflow messages are going to the "tripleo" queue, which is currently only consumed by the GUI. Closes-Bug: #1648781 Change-Id: Icfb25e66ea50a2d7371a5d1b5ba03c46095bc65e --- workbooks/baremetal.yaml | 32 +++++++++++++++++++++++++++----- workbooks/deployment.yaml | 5 ++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/workbooks/baremetal.yaml b/workbooks/baremetal.yaml index ea484c38d..e9cc3d7e4 100644 --- a/workbooks/baremetal.yaml +++ b/workbooks/baremetal.yaml @@ -126,7 +126,12 @@ workflows: on-success: send_message on-error: set_status_failed_nodes_managed with-items: node in <% $.new_nodes %> - workflow: tripleo.baremetal.v1.set_node_state node_uuid=<% $.node.uuid %> state_action='manage' target_state='manageable' + workflow: tripleo.baremetal.v1.set_node_state + input: + node_uuid: <% $.node.uuid %> + queue_name: <% $.queue_name %> + state_action: 'manage' + target_state: 'manageable' publish: status: SUCCESS message: Nodes set to managed. @@ -164,7 +169,12 @@ workflows: on-success: try_power_off on-error: set_status_failed_nodes_available with-items: uuid in <% $.node_uuids %> - workflow: tripleo.baremetal.v1.set_node_state node_uuid=<% $.uuid %> state_action='provide' target_state='available' + workflow: tripleo.baremetal.v1.set_node_state + input: + node_uuid: <% $.uuid %> + queue_name: <% $.queue_name %> + state_action: 'provide' + target_state: 'available' set_status_failed_nodes_available: on-success: send_message @@ -176,7 +186,12 @@ workflows: on-success: send_message on-error: power_off_failed with-items: uuid in <% $.node_uuids %> - workflow: tripleo.baremetal.v1.set_power_state node_uuid=<% $.uuid %> state_action='off' target_state='power off' + workflow: tripleo.baremetal.v1.set_power_state + input: + node_uuid: <% $.uuid %> + queue_name: <% $.queue_name %> + state_action: 'off' + target_state: 'power off' publish: status: SUCCESS message: 'Successfully set nodes state to available.' @@ -511,13 +526,20 @@ workflows: tag_nodes: with-items: node_uuid in <% $.tag_node_uuids %> - workflow: tripleo.baremetal.v1.tag_node node_uuid=<% $.node_uuid %> role=<% $.role %> + workflow: tripleo.baremetal.v1.tag_node + input: + node_uuid: <% $.node_uuid %> + queue_name: <% $.queue_name %> + role: <% $.role %> concurrency: 1 on-success: untag_nodes untag_nodes: with-items: node_uuid in <% $.untag_node_uuids %> - workflow: tripleo.baremetal.v1.tag_node node_uuid=<% $.node_uuid %> + workflow: tripleo.baremetal.v1.tag_node + input: + node_uuid: <% $.node_uuid %> + queue_name: <% $.queue_name %> concurrency: 1 on-success: update_role_parameters diff --git a/workbooks/deployment.yaml b/workbooks/deployment.yaml index 24a6ada98..b09d80818 100644 --- a/workbooks/deployment.yaml +++ b/workbooks/deployment.yaml @@ -109,7 +109,10 @@ workflows: tasks: add_validation_ssh_key: - workflow: tripleo.validations.v1.add_validation_ssh_key_parameter container=<% $.container %> + workflow: tripleo.validations.v1.add_validation_ssh_key_parameter + input: + container: <% $.container %> + queue_name: <% $.queue_name %> on-complete: deploy deploy: