Add Workflow To Create Overcloudrc Files

This patch adds a workflow to generate the overcloudrc files in a
given deployment so the tripleo.deployment.overcloudrc action does
not need to be called directly.

Change-Id: I9da87beb0a3be967bad4b07c2072ccb5e1f3a6cb
Partial-Bug: 1640436
This commit is contained in:
Ryan Brady 2018-02-12 09:27:11 -05:00
parent 89db127b44
commit 471ca8c24e
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds a workflow to generate the overcloudrc files in a given deployment
so the tripleo.deployment.overcloudrc action does not need to be called
directly.

View File

@ -410,3 +410,42 @@ workflows:
execution: <% execution() %> execution: <% execution() %>
on-success: on-success:
- fail: <% $.get('status') = "FAILED" %> - fail: <% $.get('status') = "FAILED" %>
create_overcloudrc:
description: >
Given the name of a container, generate the overcloudrc files
needed to access the overcloud via the CLI.
tags:
- tripleo-common-managed
input:
- container: overcloud
- queue_name: tripleo
tasks:
generate_overcloud_rc:
action: tripleo.deployment.overcloudrc
input:
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.deployment.v1.create_overcloudrc
payload:
status: <% $.status %>
message: <% $.get('message', '') %>
execution: <% execution() %>
on-success:
- fail: <% $.get('status') = "FAILED" %>