Deprecate --standalone argument
The only effect the argument had previously was to prevent the command from throwing an exception when it was not passed. However, the argument did not actually prevent non-standalone deployments. It was still possible to deploy multinode or single remote node deployments using tripleo deploy even when passing --standalone. This patch deprecates the --standalone argument and adds help text to indicate that it's no longer needed. Continuing to pass the argument will have no change in behavior. blueprint tripleo-deploy-multinode Change-Id: I6d390f3b201ad681d977a12fd627e610ad7b65f0 Signed-off-by: James Slagle <jslagle@redhat.com>
This commit is contained in:
committed by
Emilien Macchi
parent
c8736dff0c
commit
a5381b2169
@@ -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)
|
||||||
|
|||||||
@@ -908,8 +908,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',
|
||||||
@@ -1408,15 +1410,10 @@ 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)
|
self.log.error(msg)
|
||||||
raise exceptions.DeploymentError(msg)
|
raise exceptions.DeploymentError(msg)
|
||||||
else:
|
|
||||||
msg = _('Non-standalone is currently not supported')
|
|
||||||
self.log.error(msg)
|
|
||||||
raise exceptions.DeploymentError(msg)
|
|
||||||
finally:
|
finally:
|
||||||
# Copy clouds.yaml from /etc/openstack so credentials can be
|
# Copy clouds.yaml from /etc/openstack so credentials can be
|
||||||
# read by the deployment user and not only root.
|
# read by the deployment user and not only root.
|
||||||
|
|||||||
Reference in New Issue
Block a user