Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Correct the container name confusion in the swift rings workflow
Browse files Browse the repository at this point in the history
The create_swift_rings_backup_container_plan workflow switches between
using the overcloud swift container and the overcloud-swift-rings
container (if given the input "overcloud"). This patch determines the
container name in one place and updates all uses.

While refactoring it also removes the duplication of the
swift-rings.tar.gz file name.

Closes-Bug: #1736998
Change-Id: I5f988b003ed9600a530868dedc911a4f1333e730
  • Loading branch information
d0ugal committed Dec 11, 2017
1 parent 080a708 commit 4ad2410
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions workbooks/swift_rings_backup.yaml
Expand Up @@ -14,22 +14,29 @@ workflows:
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=<% $.container %>
action: swift.head_container container=<% $.swift_rings_container %>
on-success: get_tempurl
on-error: create_container

create_container:
action: tripleo.plan.create_container container="<% $.container %>-swift-rings"
action: tripleo.plan.create_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: "<% $.container %>-swift-rings"
obj: "swift-rings.tar.gz"
container: <% $.swift_rings_container %>
obj: <% $.swift_rings_tar %>

set_get_tempurl:
action: tripleo.parameters.update
Expand All @@ -43,8 +50,8 @@ workflows:
action: tripleo.swift.tempurl
on-success: set_put_tempurl
input:
container: "<% $.container %>-swift-rings"
obj: "swift-rings.tar.gz"
container: <% $.swift_rings_container %>
obj: <% $.swift_rings_tar %>
method: "PUT"

set_put_tempurl:
Expand Down

0 comments on commit 4ad2410

Please sign in to comment.