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
This commit is contained in:
Rabi Mishra 2020-06-24 08:21:58 +05:30
parent 11f4cf1998
commit e4d9bb17be
2 changed files with 4 additions and 5 deletions

View File

@ -52,7 +52,7 @@ class TestOvercloudExport(utils.TestCommand):
self.app.client_manager.tripleoclient.object_store, self.app.client_manager.tripleoclient.object_store,
'overcloud', True) 'overcloud', True)
path = os.path.join(os.environ.get('HOME'), path = os.path.join(os.environ.get('HOME'),
'config-download/overcloud') 'config-download')
mock_export_stack.assert_called_once_with( mock_export_stack.assert_called_once_with(
self.app.client_manager.orchestration, self.app.client_manager.orchestration,
'overcloud', 'overcloud',
@ -81,7 +81,7 @@ class TestOvercloudExport(utils.TestCommand):
self.app.client_manager.tripleoclient.object_store, self.app.client_manager.tripleoclient.object_store,
'foo', True) 'foo', True)
path = os.path.join(os.environ.get('HOME'), path = os.path.join(os.environ.get('HOME'),
'config-download/foo') 'config-download')
mock_export_stack.assert_called_once_with( mock_export_stack.assert_called_once_with(
self.app.client_manager.orchestration, self.app.client_manager.orchestration,
'foo', 'foo',

View File

@ -51,7 +51,7 @@ class ExportOvercloud(command.Command):
action='store', action='store',
help=_('Directory to search for config-download ' help=_('Directory to search for config-download '
'export data. Defaults to ' 'export data. Defaults to '
'$HOME/config-download/<stack>')) '$HOME/config-download'))
parser.add_argument('--no-password-excludes', parser.add_argument('--no-password-excludes',
action='store_true', action='store_true',
dest='no_password_excludes', dest='no_password_excludes',
@ -79,8 +79,7 @@ class ExportOvercloud(command.Command):
if not parsed_args.config_download_dir: if not parsed_args.config_download_dir:
config_download_dir = os.path.join(os.environ.get('HOME'), config_download_dir = os.path.join(os.environ.get('HOME'),
'config-download', 'config-download')
parsed_args.stack)
else: else:
config_download_dir = parsed_args.config_download_dir config_download_dir = parsed_args.config_download_dir