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 e4d9bb17be)
changes/15/739215/1
Rabi Mishra 2 years ago
parent cf666626a0
commit 8211384480
  1. 4
      tripleoclient/tests/v1/test_overcloud_export.py
  2. 5
      tripleoclient/v1/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',

@ -51,7 +51,7 @@ class ExportOvercloud(command.Command):
action='store',
help=_('Directory to search for config-download '
'export data. Defaults to '
'$HOME/config-download/<stack>'))
'$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

Loading…
Cancel
Save