From d239ca70d06e65b413ae8a2aa72c36430296c95e Mon Sep 17 00:00:00 2001 From: John Fulton Date: Tue, 24 Nov 2020 16:22:00 -0500 Subject: [PATCH] [TRAIN] Default ceph export config-download dir to mistral When [1] was backported it should have used the defaults that train has which were removed by the work on bug 1874432. This patch is going directly into Train only so that Train users may have a better default. [1] https://review.opendev.org/754402 Change-Id: I943723a04d2a8cc1bb46ba0c55d395410c14486c Closes-Bug: #1905471 --- tripleoclient/tests/v1/test_overcloud_export_ceph.py | 4 +--- tripleoclient/v1/overcloud_export_ceph.py | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tripleoclient/tests/v1/test_overcloud_export_ceph.py b/tripleoclient/tests/v1/test_overcloud_export_ceph.py index c9cc501e7..6f19b36f1 100644 --- a/tripleoclient/tests/v1/test_overcloud_export_ceph.py +++ b/tripleoclient/tests/v1/test_overcloud_export_ceph.py @@ -11,8 +11,6 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -import os - import mock from osc_lib.tests import utils @@ -61,6 +59,6 @@ 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 = '/var/lib/mistral' mock_export_ceph.assert_called_once_with('dcn0', 'openstack', path) self.assertEqual(data, mock_safe_dump.call_args[0][0]) diff --git a/tripleoclient/v1/overcloud_export_ceph.py b/tripleoclient/v1/overcloud_export_ceph.py index f4f06916e..caa85785f 100644 --- a/tripleoclient/v1/overcloud_export_ceph.py +++ b/tripleoclient/v1/overcloud_export_ceph.py @@ -66,7 +66,7 @@ class ExportOvercloudCeph(command.Command): action='store', help=_('Directory to search for config-download ' 'export data. Defaults to ' - '$HOME/config-download')) + '/var/lib/mistral')) return parser @@ -91,8 +91,7 @@ class ExportOvercloudCeph(command.Command): "File '%s' already exists, not exporting." % output_file) if not parsed_args.config_download_dir: - config_download_dir = os.path.join(os.environ.get('HOME'), - 'config-download') + config_download_dir = '/var/lib/mistral' else: config_download_dir = parsed_args.config_download_dir