Browse Source

Merge "Remove swift_backup workbook and some related actions"

tags/12.3.0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
9b8d98083b
3 changed files with 0 additions and 89 deletions
  1. +0
    -1
      setup.cfg
  2. +0
    -17
      tripleo_common/actions/swifthelper.py
  3. +0
    -71
      workbooks/swift_backup.yaml

+ 0
- 1
setup.cfg View File

@@ -114,7 +114,6 @@ mistral.actions =
tripleo.plan.validate_roles = tripleo_common.actions.plan:ValidateRolesDataAction
tripleo.plan.remove_noop_deploystep = tripleo_common.actions.plan:RemoveNoopDeployStepAction
tripleo.scale.delete_node = tripleo_common.actions.scale:ScaleDownAction
tripleo.swift.tempurl = tripleo_common.actions.swifthelper:SwiftTempUrlAction
tripleo.swift.swift_information = tripleo_common.actions.swifthelper:SwiftInformationAction
tripleo.validations.get_pubkey = tripleo_common.actions.validations:GetPubkeyAction
tripleo.validations.get_privkey = tripleo_common.actions.validations:GetPrivkeyAction


+ 0
- 17
tripleo_common/actions/swifthelper.py View File

@@ -16,7 +16,6 @@
from mistral_lib import actions

from tripleo_common.actions import base
from tripleo_common.utils import swift as swiftutils


class SwiftInformationAction(base.TripleOAction):
@@ -42,19 +41,3 @@ class SwiftInformationAction(base.TripleOAction):
error = str(err)

return actions.Result(data=data, error=error)


class SwiftTempUrlAction(base.TripleOAction):

def __init__(self, container, obj, method='GET', valid='86400'):
super(SwiftTempUrlAction, self).__init__()
self.container = container
self.obj = obj
self.method = method
self.valid = valid

def run(self, context):
swift_client = self.get_object_client(context)
return swiftutils.get_temp_url(
swift_client, self.container, self.obj,
self.method, self.valid)

+ 0
- 71
workbooks/swift_backup.yaml View File

@@ -1,71 +0,0 @@
---
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
- validate_stack: true
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 %>
validate: <% $.validate_stack %>
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() %>

Loading…
Cancel
Save