Merge "Update overcloud export for new working directory"

This commit is contained in:
Zuul 2021-04-06 00:43:59 +00:00 committed by Gerrit Code Review
commit 930240c883
4 changed files with 14 additions and 5 deletions

View File

@ -52,6 +52,8 @@ class TestOvercloudExport(utils.TestCommand):
self.app.client_manager.orchestration,
'overcloud', True)
path = os.path.join(os.environ.get('HOME'),
'overcloud-deploy',
'overcloud',
'config-download')
mock_export_stack.assert_called_once_with(
self.app.client_manager.orchestration,
@ -82,6 +84,8 @@ class TestOvercloudExport(utils.TestCommand):
self.app.client_manager.orchestration,
'foo', True)
path = os.path.join(os.environ.get('HOME'),
'overcloud-deploy',
'foo',
'config-download')
mock_export_stack.assert_called_once_with(
self.app.client_manager.orchestration,

View File

@ -61,6 +61,7 @@ class TestOvercloudExportCeph(utils.TestCommand):
with mock.patch('six.moves.builtins.open', self.mock_open):
self.cmd.take_action(parsed_args)
path = os.path.join(os.environ.get('HOME'), 'config-download')
path = os.path.join(os.environ.get('HOME'),
'overcloud-deploy', 'dcn0', 'config-download')
mock_export_ceph.assert_called_once_with('dcn0', 'openstack', path)
self.assertEqual(data, mock_safe_dump.call_args[0][0])

View File

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

View File

@ -65,8 +65,8 @@ class ExportOvercloudCeph(command.Command):
parser.add_argument('--config-download-dir',
action='store',
help=_('Directory to search for config-download '
'export data. Defaults to '
'$HOME/config-download'))
'export data. Defaults to $HOME/'
'overcloud-deploy/<stack>/config-download'))
return parser
@ -92,6 +92,8 @@ class ExportOvercloudCeph(command.Command):
if not parsed_args.config_download_dir:
config_download_dir = os.path.join(os.environ.get('HOME'),
"overcloud-deploy",
parsed_args.stack,
'config-download')
else:
config_download_dir = parsed_args.config_download_dir