Update overcloud export for new working directory
After I0d803f695c725c58ef2e6b655753b6c8248d1b2f and then I189bd751066cfaebd951d92d8371250aac5b4e9b, the default path for config-download changed so that it would be in the new working directory, which defaults to $HOME/overcloud-deploy/<stack>. Update the default path of --config-download-dir for both the 'openstack overcloud export' and 'openstack overcloud export ceph' commands to use the new working directory. Closes-Bug: #1922249 Change-Id: Id8f5b00dd24848f73aeb9794000e0d44f0f9cbe8
This commit is contained in:
parent
fba0312c49
commit
8b4d326839
|
@ -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,
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue