From 2d0116d79bf39d2f3014df0bb411c0635e55bd3d Mon Sep 17 00:00:00 2001 From: Ryan Brady Date: Mon, 23 Apr 2018 09:21:53 -0400 Subject: [PATCH] Adds Create Container Workflow This patch adds a workflow to update the parameters in a given deployment plan so the tripleo.plan.create_container action does not need to be called directly. Change-Id: I7144b927b02f162433acc9481a43950d2c77cd9b Closes-Bug: #1759308 --- ...e-container-workflow-77ee4557779563c0.yaml | 5 +++ workbooks/plan_management.yaml | 37 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 releasenotes/notes/adds-create-container-workflow-77ee4557779563c0.yaml diff --git a/releasenotes/notes/adds-create-container-workflow-77ee4557779563c0.yaml b/releasenotes/notes/adds-create-container-workflow-77ee4557779563c0.yaml new file mode 100644 index 000000000..7e6683441 --- /dev/null +++ b/releasenotes/notes/adds-create-container-workflow-77ee4557779563c0.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds a workflow to create a container so the underlying action does + not need to be called directly. \ No newline at end of file diff --git a/workbooks/plan_management.yaml b/workbooks/plan_management.yaml index 47d6e4458..5a706906a 100644 --- a/workbooks/plan_management.yaml +++ b/workbooks/plan_management.yaml @@ -5,6 +5,43 @@ description: TripleO Overcloud Deployment Workflows v1 workflows: + create_container: + description: > + Creates an object container for a given name. If a container with the + same name already exists an error is returned. + + tags: + - tripleo-common-managed + + input: + - container: overcloud + - queue_name: tripleo + + tasks: + create_container: + action: tripleo.plan.create_container container=<% $.container %> + on-complete: notify_zaqar + publish-on-error: + status: FAILED + message: <% task().result %> + publish: + status: SUCCESS + message: <% task().result %> + + notify_zaqar: + action: zaqar.queue_post + input: + queue_name: <% $.queue_name %> + messages: + body: + type: tripleo.plan_management.v1.create_container + payload: + status: <% $.status %> + message: <% $.get('message', '') %> + execution: <% execution() %> + on-success: + - fail: <% $.get('status') = "FAILED" %> + create_default_deployment_plan: description: > This workflow exists to maintain backwards compatibility in pike. This