[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
This commit is contained in:
parent
f5892a583a
commit
d239ca70d0
|
@ -11,8 +11,6 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
import os
|
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from osc_lib.tests import utils
|
from osc_lib.tests import utils
|
||||||
|
@ -61,6 +59,6 @@ class TestOvercloudExportCeph(utils.TestCommand):
|
||||||
|
|
||||||
with mock.patch('six.moves.builtins.open', self.mock_open):
|
with mock.patch('six.moves.builtins.open', self.mock_open):
|
||||||
self.cmd.take_action(parsed_args)
|
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)
|
mock_export_ceph.assert_called_once_with('dcn0', 'openstack', path)
|
||||||
self.assertEqual(data, mock_safe_dump.call_args[0][0])
|
self.assertEqual(data, mock_safe_dump.call_args[0][0])
|
||||||
|
|
|
@ -66,7 +66,7 @@ class ExportOvercloudCeph(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'))
|
'/var/lib/mistral'))
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
@ -91,8 +91,7 @@ class ExportOvercloudCeph(command.Command):
|
||||||
"File '%s' already exists, not exporting." % output_file)
|
"File '%s' already exists, not exporting." % output_file)
|
||||||
|
|
||||||
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 = '/var/lib/mistral'
|
||||||
'config-download')
|
|
||||||
else:
|
else:
|
||||||
config_download_dir = parsed_args.config_download_dir
|
config_download_dir = parsed_args.config_download_dir
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue