From 20baa8524c144d5d9047e5c2ab6a7b6a10555896 Mon Sep 17 00:00:00 2001 From: Ryan Brady Date: Wed, 24 Jan 2018 11:25:19 -0500 Subject: [PATCH] Adds Workflow to Delete Deployment Plan This patch adds a workflow to delete a deployment plan so the tripleo.plan.delete does not need to be called directly. Change-Id: Ibaf3ee800de56309e014be53e698affc358c9f5a Partial-Bug: 1640436 --- ...delete-plan-workflow-d625682fdddd3f48.yaml | 5 +++ workbooks/plan_management.yaml | 38 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 releasenotes/notes/adds-delete-plan-workflow-d625682fdddd3f48.yaml diff --git a/releasenotes/notes/adds-delete-plan-workflow-d625682fdddd3f48.yaml b/releasenotes/notes/adds-delete-plan-workflow-d625682fdddd3f48.yaml new file mode 100644 index 000000000..e15e19826 --- /dev/null +++ b/releasenotes/notes/adds-delete-plan-workflow-d625682fdddd3f48.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds a workflow to delete a deployment plan so the tripleo.plan.delete does + not need to be called directly. diff --git a/workbooks/plan_management.yaml b/workbooks/plan_management.yaml index fa53fc3ac..59e03cdbc 100644 --- a/workbooks/plan_management.yaml +++ b/workbooks/plan_management.yaml @@ -328,6 +328,44 @@ workflows: on-success: - fail: <% $.get('status') = "FAILED" %> + delete_deployment_plan: + description: > + Deletes a plan by deleting the container matching plan_name. It will + not delete the plan if a stack exists with the same name. + + tags: + - tripleo-common-managed + + input: + - container: overcloud + - queue_name: tripleo + + tasks: + delete_plan: + action: tripleo.plan.delete 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.delete_deployment_plan + payload: + status: <% $.status %> + message: <% $.get('message', '') %> + execution: <% execution() %> + on-success: + - fail: <% $.get('status') = "FAILED" %> + + get_passwords: description: Retrieves passwords for a given plan input: