From 8211384480195087af1a75189de88a755a77a09c Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Wed, 24 Jun 2020 08:21:58 +0530 Subject: [PATCH] Don't use stack name in default config_download_dir We create a subfolder with the plan/stack name under the config_download_dir to store the config-downloaded artifacts. Fix 'overcloud export' as users are not expected to specify the path with the plan/stack name. Change-Id: I994353a6d4aa6b72e9fecc5f61bf5314a5a94963 Related-Bug: #1884246 (cherry picked from commit e4d9bb17be805ae7bbb844f65c9f28d4d22b44e1) --- tripleoclient/tests/v1/test_overcloud_export.py | 4 ++-- tripleoclient/v1/overcloud_export.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tripleoclient/tests/v1/test_overcloud_export.py b/tripleoclient/tests/v1/test_overcloud_export.py index f47680e37..37c323ac5 100644 --- a/tripleoclient/tests/v1/test_overcloud_export.py +++ b/tripleoclient/tests/v1/test_overcloud_export.py @@ -52,7 +52,7 @@ class TestOvercloudExport(utils.TestCommand): self.app.client_manager.tripleoclient.object_store, 'overcloud', True) path = os.path.join(os.environ.get('HOME'), - 'config-download/overcloud') + 'config-download') mock_export_stack.assert_called_once_with( self.app.client_manager.orchestration, 'overcloud', @@ -81,7 +81,7 @@ class TestOvercloudExport(utils.TestCommand): self.app.client_manager.tripleoclient.object_store, 'foo', True) path = os.path.join(os.environ.get('HOME'), - 'config-download/foo') + 'config-download') mock_export_stack.assert_called_once_with( self.app.client_manager.orchestration, 'foo', diff --git a/tripleoclient/v1/overcloud_export.py b/tripleoclient/v1/overcloud_export.py index 074a4efeb..54af2f875 100644 --- a/tripleoclient/v1/overcloud_export.py +++ b/tripleoclient/v1/overcloud_export.py @@ -51,7 +51,7 @@ class ExportOvercloud(command.Command): action='store', help=_('Directory to search for config-download ' 'export data. Defaults to ' - '$HOME/config-download/')) + '$HOME/config-download')) parser.add_argument('--no-password-excludes', action='store_true', dest='no_password_excludes', @@ -79,8 +79,7 @@ class ExportOvercloud(command.Command): if not parsed_args.config_download_dir: config_download_dir = os.path.join(os.environ.get('HOME'), - 'config-download', - parsed_args.stack) + 'config-download') else: config_download_dir = parsed_args.config_download_dir