Browse Source

Merge "Deprecate --standalone argument"

changes/66/743866/1
Zuul 6 days ago
committed by Gerrit Code Review
parent
commit
0372ddd911
3 changed files with 18 additions and 22 deletions
  1. +7
    -0
      releasenotes/notes/deprecate-standalone-argument-57660f3023dc3220.yaml
  2. +5
    -13
      tripleoclient/tests/v1/tripleo/test_tripleo_deploy.py
  3. +6
    -9
      tripleoclient/v1/tripleo_deploy.py

+ 7
- 0
releasenotes/notes/deprecate-standalone-argument-57660f3023dc3220.yaml View File

@@ -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.

+ 5
- 13
tripleoclient/tests/v1/tripleo/test_tripleo_deploy.py View File

@@ -938,8 +938,7 @@ class TestDeployUndercloud(TestPluginV1):
'-e', '/tmp/thtroot42/notouch.yaml',
'-e', '~/custom.yaml',
'-e', 'something.yaml',
'-e', '../../../outside.yaml',
'--standalone'], [])
'-e', '../../../outside.yaml'], [])

mock_file_exists.return_value = True
fake_orchestration = mock_launchheat(parsed_args)
@@ -977,8 +976,7 @@ class TestDeployUndercloud(TestPluginV1):
['--local-ip', '127.0.0.1',
'--templates', '/tmp/thtroot',
'--stack', 'undercloud',
'--output-dir', '/my',
'--standalone'], [])
'--output-dir', '/my'], [])
self.assertRaises(exceptions.DeploymentError,
self.cmd.take_action, parsed_args)
mock_copy.assert_called_once()
@@ -989,8 +987,7 @@ class TestDeployUndercloud(TestPluginV1):
['--local-ip', '127.0.0.1',
'--templates', '/tmp/thtroot',
'--stack', 'undercloud',
'--output-dir', '/my',
'--standalone'], [])
'--output-dir', '/my'], [])
self.cmd._set_stack_action(parsed_args)
self.assertEqual('CREATE', self.cmd.stack_action)

@@ -1000,8 +997,7 @@ class TestDeployUndercloud(TestPluginV1):
['--local-ip', '127.0.0.1',
'--templates', '/tmp/thtroot',
'--stack', 'undercloud',
'--output-dir', '/my',
'--standalone'], [])
'--output-dir', '/my'], [])
self.cmd._set_stack_action(parsed_args)
self.assertEqual('UPDATE', self.cmd.stack_action)

@@ -1012,7 +1008,6 @@ class TestDeployUndercloud(TestPluginV1):
'--templates', '/tmp/thtroot',
'--stack', 'undercloud',
'--output-dir', '/my',
'--standalone',
'--force-stack-update'], [])
self.cmd._set_stack_action(parsed_args)
self.assertEqual('UPDATE', self.cmd.stack_action)
@@ -1024,7 +1019,6 @@ class TestDeployUndercloud(TestPluginV1):
'--templates', '/tmp/thtroot',
'--stack', 'undercloud',
'--output-dir', '/my',
'--standalone',
'--force-stack-create'], [])
self.cmd._set_stack_action(parsed_args)
self.assertEqual('CREATE', self.cmd.stack_action)
@@ -1039,7 +1033,6 @@ class TestDeployUndercloud(TestPluginV1):
'--templates', '/tmp/thtroot',
'--stack', 'undercloud',
'--output-dir', '/my',
'--standalone',
'--force-stack-create',
'--force-stack-update'], [])

@@ -1100,8 +1093,7 @@ class TestDeployUndercloud(TestPluginV1):
'--templates', '/tmp/thtroot',
'--stack', 'undercloud',
'--output-dir', '/my',
'--output-only',
'--standalone'], [])
'--output-only'], [])

rc = self.cmd.take_action(parsed_args)
self.assertEqual(None, rc)

+ 6
- 9
tripleoclient/v1/tripleo_deploy.py View File

@@ -907,8 +907,10 @@ class Deploy(command.Command):
default=constants.TRIPLEO_HEAT_TEMPLATES
)
parser.add_argument('--standalone', default=False, action='store_true',
help=_("Run deployment as a standalone deployment "
"with no undercloud."))
help=_("DEPRECATED. The --standalone argument is "
"now deprecated. Standalone deployments "
"can now be run without passing "
"--standalone. "))
parser.add_argument('--upgrade', default=False, action='store_true',
help=_("Upgrade an existing deployment."))
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)

try:
if parsed_args.standalone:
if self._standalone_deploy(parsed_args) != 0:
msg = _('Deployment failed.')
self.log.error(msg)
raise exceptions.DeploymentError(msg)
else:
msg = _('Non-standalone is currently not supported')
if self._standalone_deploy(parsed_args) != 0:
msg = _('Deployment failed.')
self.log.error(msg)
raise exceptions.DeploymentError(msg)
finally:


Loading…
Cancel
Save