Browse Source

Remove usage of swifthelper.SwiftTempUrlAction

This would help us removing the action from tripleo-common.

Change-Id: I9023afbb953153443fa7287af0a48310c44b3fd7
tags/13.2.0
Rabi Mishra 3 months ago
parent
commit
50191cddf5
2 changed files with 8 additions and 9 deletions
  1. +5
    -5
      tripleoclient/workflows/deployment.py
  2. +3
    -4
      tripleoclient/workflows/plan_management.py

+ 5
- 5
tripleoclient/workflows/deployment.py View File

@@ -23,7 +23,7 @@ from openstackclient import shell
from tripleo_common.actions import ansible
from tripleo_common.actions import config
from tripleo_common.actions import deployment
from tripleo_common.actions import swifthelper
from tripleo_common.utils import swift as swift_utils

from tripleoclient.constants import ANSIBLE_TRIPLEO_PLAYBOOKS
from tripleoclient.constants import DEFAULT_WORK_DIR
@@ -492,10 +492,10 @@ def config_download_export(clients, plan, config_type):
plan
)
)
return swifthelper.SwiftTempUrlAction(
container=container_config,
obj='{}.tar.gz'.format(container_config)
).run(context=context)
return swift_utils.get_temp_url(
clients.tripleoclient.object_store, container=container_config,
object_name='{}.tar.gz'.format(container_config))


def get_horizon_url(stack):


+ 3
- 4
tripleoclient/workflows/plan_management.py View File

@@ -16,7 +16,6 @@ import yaml

from swiftclient import exceptions as swift_exc
from tripleo_common.actions import plan
from tripleo_common.actions import swifthelper
from tripleo_common.utils import swift as swiftutils
from tripleo_common.utils import tarball

@@ -322,8 +321,8 @@ def export_deployment_plan(clients, plan_name):
raise exceptions.WorkflowServiceError(
'Exception exporting plan: {}'.format(result.error))

action = swifthelper.SwiftTempUrlAction(
export_container, "{}.tar.gz".format(plan_name), valid=delete_after)
url = action.run(mistral_context)
url = swiftutils.get_temp_url(clients.tripleoclient.object_store,
container=export_container,
object_name="{}.tar.gz".format(plan_name))
print(url)
return url

Loading…
Cancel
Save