Browse Source

Merge "Update overcloud export for new working directory"

changes/59/784959/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
930240c883
4 changed files with 14 additions and 5 deletions
  1. +4
    -0
      tripleoclient/tests/v1/test_overcloud_export.py
  2. +2
    -1
      tripleoclient/tests/v1/test_overcloud_export_ceph.py
  3. +4
    -2
      tripleoclient/v1/overcloud_export.py
  4. +4
    -2
      tripleoclient/v1/overcloud_export_ceph.py

+ 4
- 0
tripleoclient/tests/v1/test_overcloud_export.py 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,


+ 2
- 1
tripleoclient/tests/v1/test_overcloud_export_ceph.py 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])

+ 4
- 2
tripleoclient/v1/overcloud_export.py 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


+ 4
- 2
tripleoclient/v1/overcloud_export_ceph.py 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


Loading…
Cancel
Save