diff --git a/releasenotes/notes/adds-list-plan-workflow-c0c6f91c9460a09a.yaml b/releasenotes/notes/adds-list-plan-workflow-c0c6f91c9460a09a.yaml new file mode 100644 index 000000000..aef8a5c15 --- /dev/null +++ b/releasenotes/notes/adds-list-plan-workflow-c0c6f91c9460a09a.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds a workflow to list deployment plans so the tripleo.plan.list action + does not need to be called directly. diff --git a/workbooks/plan_management.yaml b/workbooks/plan_management.yaml index 9f8d14499..2ff2d553f 100644 --- a/workbooks/plan_management.yaml +++ b/workbooks/plan_management.yaml @@ -1405,3 +1405,45 @@ workflows: selected_roles: <% $.get('selected_roles', []) %> on-success: - fail: <% $.get('status') = "FAILED" %> + + list_plans: + description: > + This workflow lists all deployment plans residing in the undercloud. A + deployment plan consists of a container marked with metadata + 'x-container-meta-usage-tripleo'. + + tags: + - tripleo-common-managed + + input: + - queue_name: tripleo + + output: + plan_list: <% $.plans %> + + tasks: + list_plans: + action: tripleo.plan.list + on-complete: notify_zaqar + publish: + status: SUCCESS + message: <% task().result %> + plans: <% task().result %> + publish-on-error: + status: FAILED + message: <% task().result %> + + notify_zaqar: + action: zaqar.queue_post + input: + queue_name: <% $.queue_name %> + messages: + body: + type: tripleo.plan_management.v1.list_plans + payload: + status: <% $.status %> + message: <% $.get('message', '') %> + execution: <% execution() %> + plans: <% $.get('plans', []) %> + on-success: + - fail: <% $.get('status') = "FAILED" %>