Merge "Deprecate --standalone argument"
This commit is contained in:
commit
0372ddd911
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The --standalone argument to the openstack tripleo deploy command is now
|
||||||
|
deprecated. The argument previously had no effect other than allow the
|
||||||
|
tripleo deploy command to not throw an exception, so it can be safely
|
||||||
|
deprecated with no replacement.
|
|
@ -938,8 +938,7 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
'-e', '/tmp/thtroot42/notouch.yaml',
|
'-e', '/tmp/thtroot42/notouch.yaml',
|
||||||
'-e', '~/custom.yaml',
|
'-e', '~/custom.yaml',
|
||||||
'-e', 'something.yaml',
|
'-e', 'something.yaml',
|
||||||
'-e', '../../../outside.yaml',
|
'-e', '../../../outside.yaml'], [])
|
||||||
'--standalone'], [])
|
|
||||||
|
|
||||||
mock_file_exists.return_value = True
|
mock_file_exists.return_value = True
|
||||||
fake_orchestration = mock_launchheat(parsed_args)
|
fake_orchestration = mock_launchheat(parsed_args)
|
||||||
|
@ -977,8 +976,7 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
['--local-ip', '127.0.0.1',
|
['--local-ip', '127.0.0.1',
|
||||||
'--templates', '/tmp/thtroot',
|
'--templates', '/tmp/thtroot',
|
||||||
'--stack', 'undercloud',
|
'--stack', 'undercloud',
|
||||||
'--output-dir', '/my',
|
'--output-dir', '/my'], [])
|
||||||
'--standalone'], [])
|
|
||||||
self.assertRaises(exceptions.DeploymentError,
|
self.assertRaises(exceptions.DeploymentError,
|
||||||
self.cmd.take_action, parsed_args)
|
self.cmd.take_action, parsed_args)
|
||||||
mock_copy.assert_called_once()
|
mock_copy.assert_called_once()
|
||||||
|
@ -989,8 +987,7 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
['--local-ip', '127.0.0.1',
|
['--local-ip', '127.0.0.1',
|
||||||
'--templates', '/tmp/thtroot',
|
'--templates', '/tmp/thtroot',
|
||||||
'--stack', 'undercloud',
|
'--stack', 'undercloud',
|
||||||
'--output-dir', '/my',
|
'--output-dir', '/my'], [])
|
||||||
'--standalone'], [])
|
|
||||||
self.cmd._set_stack_action(parsed_args)
|
self.cmd._set_stack_action(parsed_args)
|
||||||
self.assertEqual('CREATE', self.cmd.stack_action)
|
self.assertEqual('CREATE', self.cmd.stack_action)
|
||||||
|
|
||||||
|
@ -1000,8 +997,7 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
['--local-ip', '127.0.0.1',
|
['--local-ip', '127.0.0.1',
|
||||||
'--templates', '/tmp/thtroot',
|
'--templates', '/tmp/thtroot',
|
||||||
'--stack', 'undercloud',
|
'--stack', 'undercloud',
|
||||||
'--output-dir', '/my',
|
'--output-dir', '/my'], [])
|
||||||
'--standalone'], [])
|
|
||||||
self.cmd._set_stack_action(parsed_args)
|
self.cmd._set_stack_action(parsed_args)
|
||||||
self.assertEqual('UPDATE', self.cmd.stack_action)
|
self.assertEqual('UPDATE', self.cmd.stack_action)
|
||||||
|
|
||||||
|
@ -1012,7 +1008,6 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
'--templates', '/tmp/thtroot',
|
'--templates', '/tmp/thtroot',
|
||||||
'--stack', 'undercloud',
|
'--stack', 'undercloud',
|
||||||
'--output-dir', '/my',
|
'--output-dir', '/my',
|
||||||
'--standalone',
|
|
||||||
'--force-stack-update'], [])
|
'--force-stack-update'], [])
|
||||||
self.cmd._set_stack_action(parsed_args)
|
self.cmd._set_stack_action(parsed_args)
|
||||||
self.assertEqual('UPDATE', self.cmd.stack_action)
|
self.assertEqual('UPDATE', self.cmd.stack_action)
|
||||||
|
@ -1024,7 +1019,6 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
'--templates', '/tmp/thtroot',
|
'--templates', '/tmp/thtroot',
|
||||||
'--stack', 'undercloud',
|
'--stack', 'undercloud',
|
||||||
'--output-dir', '/my',
|
'--output-dir', '/my',
|
||||||
'--standalone',
|
|
||||||
'--force-stack-create'], [])
|
'--force-stack-create'], [])
|
||||||
self.cmd._set_stack_action(parsed_args)
|
self.cmd._set_stack_action(parsed_args)
|
||||||
self.assertEqual('CREATE', self.cmd.stack_action)
|
self.assertEqual('CREATE', self.cmd.stack_action)
|
||||||
|
@ -1039,7 +1033,6 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
'--templates', '/tmp/thtroot',
|
'--templates', '/tmp/thtroot',
|
||||||
'--stack', 'undercloud',
|
'--stack', 'undercloud',
|
||||||
'--output-dir', '/my',
|
'--output-dir', '/my',
|
||||||
'--standalone',
|
|
||||||
'--force-stack-create',
|
'--force-stack-create',
|
||||||
'--force-stack-update'], [])
|
'--force-stack-update'], [])
|
||||||
|
|
||||||
|
@ -1100,8 +1093,7 @@ class TestDeployUndercloud(TestPluginV1):
|
||||||
'--templates', '/tmp/thtroot',
|
'--templates', '/tmp/thtroot',
|
||||||
'--stack', 'undercloud',
|
'--stack', 'undercloud',
|
||||||
'--output-dir', '/my',
|
'--output-dir', '/my',
|
||||||
'--output-only',
|
'--output-only'], [])
|
||||||
'--standalone'], [])
|
|
||||||
|
|
||||||
rc = self.cmd.take_action(parsed_args)
|
rc = self.cmd.take_action(parsed_args)
|
||||||
self.assertEqual(None, rc)
|
self.assertEqual(None, rc)
|
||||||
|
|
|
@ -907,8 +907,10 @@ class Deploy(command.Command):
|
||||||
default=constants.TRIPLEO_HEAT_TEMPLATES
|
default=constants.TRIPLEO_HEAT_TEMPLATES
|
||||||
)
|
)
|
||||||
parser.add_argument('--standalone', default=False, action='store_true',
|
parser.add_argument('--standalone', default=False, action='store_true',
|
||||||
help=_("Run deployment as a standalone deployment "
|
help=_("DEPRECATED. The --standalone argument is "
|
||||||
"with no undercloud."))
|
"now deprecated. Standalone deployments "
|
||||||
|
"can now be run without passing "
|
||||||
|
"--standalone. "))
|
||||||
parser.add_argument('--upgrade', default=False, action='store_true',
|
parser.add_argument('--upgrade', default=False, action='store_true',
|
||||||
help=_("Upgrade an existing deployment."))
|
help=_("Upgrade an existing deployment."))
|
||||||
parser.add_argument('-y', '--yes', default=False, action='store_true',
|
parser.add_argument('-y', '--yes', default=False, action='store_true',
|
||||||
|
@ -1407,13 +1409,8 @@ class Deploy(command.Command):
|
||||||
self.log.debug("take_action(%s)" % parsed_args)
|
self.log.debug("take_action(%s)" % parsed_args)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if parsed_args.standalone:
|
if self._standalone_deploy(parsed_args) != 0:
|
||||||
if self._standalone_deploy(parsed_args) != 0:
|
msg = _('Deployment failed.')
|
||||||
msg = _('Deployment failed.')
|
|
||||||
self.log.error(msg)
|
|
||||||
raise exceptions.DeploymentError(msg)
|
|
||||||
else:
|
|
||||||
msg = _('Non-standalone is currently not supported')
|
|
||||||
self.log.error(msg)
|
self.log.error(msg)
|
||||||
raise exceptions.DeploymentError(msg)
|
raise exceptions.DeploymentError(msg)
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue