Use the standard messaging in the undercloud_backup workbook
Update the undercloud_backup workbook to use the standard message sending workflow. This workflow reduces the boilerplate that is copied between workflows by defining the message structure, providing the retry logic and ensuring the task on a "FAILED" message. The workflow also offers optional persistence in Swift. If the plan name is given to the workflow it will store the messages in a Swift container named <plan_name>-messages. Change-Id: I71e761c1295ae0d0ca2773c7521b6a57cabd6227 Related-Bug: #1757372
This commit is contained in:
parent
5d44a0a016
commit
9ca3346709
@ -118,16 +118,10 @@ workflows:
|
||||
|
||||
# Sending a message to show that the backup finished
|
||||
send_message:
|
||||
action: zaqar.queue_post
|
||||
retry: count=5 delay=1
|
||||
workflow: tripleo.messaging.v1.send
|
||||
input:
|
||||
queue_name: <% $.queue_name %>
|
||||
messages:
|
||||
body:
|
||||
type: tripleo.undercloud_backup.v1.launch
|
||||
payload:
|
||||
status: <% $.get('status', 'SUCCESS') %>
|
||||
execution: <% execution() %>
|
||||
message: <% $.get('message', '') %>
|
||||
on-success:
|
||||
- fail: <% $.get('status') = "FAILED" %>
|
||||
type: <% execution().name %>
|
||||
status: <% $.get('status', 'SUCCESS') %>
|
||||
execution: <% execution() %>
|
||||
message: <% $.get('message', '') %>
|
||||
|
Loading…
Reference in New Issue
Block a user