e07dc79693
In the swift backup workflow we create 2 parameters for temp URLs, but we don't need to call parameters.update twice, just once with the two new parameters. Change-Id: I75b64dca102a62c06c56327cf425451ae804e3b9
70 lines
2.0 KiB
YAML
70 lines
2.0 KiB
YAML
---
|
|
version: '2.0'
|
|
name: tripleo.swift_backup.v1
|
|
description: TripleO Swift backup container Deployment Workflow v1
|
|
|
|
workflows:
|
|
|
|
create_swift_backup_container_plan:
|
|
description: >
|
|
Ensures the existence of containers for backups, e.g. swift_rings
|
|
input:
|
|
- container
|
|
- queue_name: tripleo
|
|
- container_suffix: "-swift-rings"
|
|
- swift_tar: "swift-rings.tar.gz"
|
|
- get_url_parm: SwiftRingGetTempurl
|
|
- put_url_parm: SwiftRingPutTempurl
|
|
tags:
|
|
- tripleo-common-managed
|
|
tasks:
|
|
|
|
swift_container:
|
|
publish:
|
|
swift_container: "<% $.container %><% $.container_suffix %>"
|
|
on-complete: get_tempurl
|
|
|
|
get_tempurl:
|
|
action: tripleo.swift.tempurl
|
|
on-success: put_tempurl
|
|
input:
|
|
container: <% $.swift_container %>
|
|
obj: <% $.swift_tar %>
|
|
|
|
put_tempurl:
|
|
action: tripleo.swift.tempurl
|
|
on-success: set_tempurl
|
|
input:
|
|
container: <% $.swift_container %>
|
|
obj: <% $.swift_tar %>
|
|
method: "PUT"
|
|
|
|
set_tempurl:
|
|
action: tripleo.parameters.update
|
|
input:
|
|
parameters: <% {$.get_url_parm => task(get_tempurl).result, $.put_url_parm => task(put_tempurl).result} %>
|
|
container: <% $.container %>
|
|
on-success: set_status_success
|
|
on-error: set_tempurl_failed
|
|
|
|
set_status_success:
|
|
on-success: notify_zaqar
|
|
publish:
|
|
status: SUCCESS
|
|
message: 'Temporary Swift GET/PUT URL parameters have successfully been updated.'
|
|
|
|
set_tempurl_failed:
|
|
on-success: notify_zaqar
|
|
publish:
|
|
status: FAILED
|
|
message: <% task(set_tempurl).result %>
|
|
|
|
notify_zaqar:
|
|
workflow: tripleo.messaging.v1.send
|
|
input:
|
|
queue_name: <% $.queue_name %>
|
|
type: <% execution().name %>
|
|
status: <% $.get('status', 'SUCCESS') %>
|
|
message: <% $.get('message', '') %>
|
|
execution: <% execution() %>
|