Use the standard messaging in the parameters workbook
Update the parameters 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: I010b848721732a7a186dd4de183089b5e24bfd04 Related-Bug: #1757372
This commit is contained in:
parent
dcc95d37f5
commit
e3834bb2d2
|
@ -35,7 +35,7 @@ workflows:
|
|||
ipmi_level: <% $.ipmi_level %>
|
||||
ipmi_cipher: <% $.ipmi_cipher %>
|
||||
ipmi_lanplus: <% $.ipmi_lanplus %>
|
||||
on-complete: notify_zaqar
|
||||
on-complete: send_message
|
||||
publish:
|
||||
fencing_parameters: <% task().result %>
|
||||
status: SUCCESS
|
||||
|
@ -44,18 +44,14 @@ workflows:
|
|||
status: FAILED
|
||||
message: <% task().result %>
|
||||
|
||||
notify_zaqar:
|
||||
action: zaqar.queue_post
|
||||
send_message:
|
||||
workflow: tripleo.messaging.v1.send
|
||||
input:
|
||||
queue_name: <% $.queue_name %>
|
||||
messages:
|
||||
body:
|
||||
type: tripleo.parameters.v1.generate_fencing_parameters
|
||||
payload:
|
||||
status: <% $.status %>
|
||||
message: <% $.get('message', '') %>
|
||||
execution: <% execution() %>
|
||||
fencing_parameters: <% $.get('fencing_parameters', {}) %>
|
||||
on-success:
|
||||
- fail: <% $.get('status') = "FAILED" %>
|
||||
type: <% execution().name %>
|
||||
status: <% $.status %>
|
||||
execution: <% execution() %>
|
||||
message: <% $.get('message', '') %>
|
||||
payload:
|
||||
fencing_parameters: <% $.get('fencing_parameters', {}) %>
|
||||
|
||||
|
|
Loading…
Reference in New Issue