Use the standard messaging in the swift_rings_backup workbook

Update the swift_rings_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: Iad199545d0093ccdedf082a945345ad4863ed4d0
Related-Bug: #1757372
This commit is contained in:
Dougal Matthews 2018-06-05 12:10:11 +01:00
parent cd1dd6aa83
commit 1adc25c9b2
1 changed files with 5 additions and 10 deletions

View File

@ -82,15 +82,10 @@ workflows:
message: <% task(create_container).result %>
notify_zaqar:
action: zaqar.queue_post
workflow: tripleo.messaging.v1.send
input:
queue_name: <% $.queue_name %>
messages:
body:
type: tripleo.swift_rings_backup.v1.create_swift_rings_backup_container_plan
payload:
status: <% $.status %>
message: <% $.get('message', '') %>
execution: <% execution() %>
on-success:
- fail: <% $.get('status') = "FAILED" %>
type: <% execution().name %>
status: <% $.get('status', 'SUCCESS') %>
message: <% $.get('message', '') %>
execution: <% execution() %>