e718c04bdd
Closes-Bug: 1745373 Change-Id: Ibc1a70758830373ea653db0077c78ffaa8c1dd57
97 lines
2.8 KiB
YAML
97 lines
2.8 KiB
YAML
---
|
|
version: '2.0'
|
|
name: tripleo.swift_rings_backup.v1
|
|
description: TripleO Swift Rings backup container Deployment Workflow v1
|
|
|
|
workflows:
|
|
|
|
create_swift_rings_backup_container_plan:
|
|
description: >
|
|
This plan ensures existence of container for Swift Rings backup.
|
|
input:
|
|
- container
|
|
- queue_name: tripleo
|
|
tags:
|
|
- tripleo-common-managed
|
|
tasks:
|
|
|
|
swift_rings_container:
|
|
publish:
|
|
swift_rings_container: "<% $.container %>-swift-rings"
|
|
swift_rings_tar: "swift-rings.tar.gz"
|
|
on-complete: check_container
|
|
|
|
check_container:
|
|
action: swift.head_container container=<% $.swift_rings_container %>
|
|
on-success: get_tempurl
|
|
on-error: create_container
|
|
|
|
create_container:
|
|
action: swift.put_container container=<% $.swift_rings_container %>
|
|
on-error: set_create_container_failed
|
|
on-success: get_tempurl
|
|
|
|
get_tempurl:
|
|
action: tripleo.swift.tempurl
|
|
on-success: set_get_tempurl
|
|
input:
|
|
container: <% $.swift_rings_container %>
|
|
obj: <% $.swift_rings_tar %>
|
|
|
|
set_get_tempurl:
|
|
action: tripleo.parameters.update
|
|
input:
|
|
parameters:
|
|
SwiftRingGetTempurl: <% task(get_tempurl).result %>
|
|
container: <% $.container %>
|
|
on-success: put_tempurl
|
|
|
|
put_tempurl:
|
|
action: tripleo.swift.tempurl
|
|
on-success: set_put_tempurl
|
|
input:
|
|
container: <% $.swift_rings_container %>
|
|
obj: <% $.swift_rings_tar %>
|
|
method: "PUT"
|
|
|
|
set_put_tempurl:
|
|
action: tripleo.parameters.update
|
|
input:
|
|
parameters:
|
|
SwiftRingPutTempurl: <% task(put_tempurl).result %>
|
|
container: <% $.container %>
|
|
on-success: set_status_success
|
|
on-error: set_put_tempurl_failed
|
|
|
|
set_status_success:
|
|
on-success: notify_zaqar
|
|
publish:
|
|
status: SUCCESS
|
|
message: <% task(set_put_tempurl).result %>
|
|
|
|
set_put_tempurl_failed:
|
|
on-success: notify_zaqar
|
|
publish:
|
|
status: FAILED
|
|
message: <% task(set_put_tempurl).result %>
|
|
|
|
set_create_container_failed:
|
|
on-success: notify_zaqar
|
|
publish:
|
|
status: FAILED
|
|
message: <% task(create_container).result %>
|
|
|
|
notify_zaqar:
|
|
action: zaqar.queue_post
|
|
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" %>
|