Remove count/flavor options from overcloud deploy
... because these options were supposed to be removed from the deploy
command during Ussuri release[1].
[1] 200d20a71c
Change-Id: I01cd598f090568283d1684e9f5a4d741d14ef4a0
This commit is contained in:
parent
bec4e6fcb1
commit
8cc029b99c
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The ``--*-flavor`` options and the ``--*-count`` options were removed from
|
||||
the ``overcloud deploy`` command.
|
@ -1643,19 +1643,6 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
||||
mock_makedirs.assert_called_with(dirname)
|
||||
mock_open.assert_called()
|
||||
|
||||
def test_validate_args_deprecated(self):
|
||||
arglist = ['--control-scale', '3', '--control-flavor', 'control']
|
||||
verifylist = [
|
||||
('control_scale', 3),
|
||||
('control_flavor', 'control'),
|
||||
]
|
||||
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
|
||||
self.assertRaises(oscexc.CommandError,
|
||||
self.cmd.take_action,
|
||||
parsed_args)
|
||||
|
||||
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
|
||||
'_write_user_environment', autospec=True)
|
||||
def test_provision_baremetal(self, mock_write):
|
||||
|
@ -1313,54 +1313,30 @@ def assign_and_verify_profiles(bm_client, flavors,
|
||||
return predeploy_errors, predeploy_warnings
|
||||
|
||||
|
||||
def add_deployment_plan_arguments(parser, mark_as_depr=False):
|
||||
def add_deployment_plan_arguments(parser):
|
||||
"""Add deployment plan arguments (flavors and scales) to a parser"""
|
||||
|
||||
depr_warning = _(' (DEPRECATED. Use an environment file and set the '
|
||||
'parameter %s. This option will be removed in the "U" '
|
||||
'release.)')
|
||||
|
||||
# TODO(d0ugal): Deprecated in Newton. Remove these in U.
|
||||
parser.add_argument('--control-scale', type=int,
|
||||
help=_('New number of control nodes.')
|
||||
+ (depr_warning % 'ControllerCount'
|
||||
if mark_as_depr else ''))
|
||||
help=_('New number of control nodes.'))
|
||||
parser.add_argument('--compute-scale', type=int,
|
||||
help=_('New number of compute nodes.')
|
||||
+ (depr_warning % 'ComputeCount'
|
||||
if mark_as_depr else ''))
|
||||
help=_('New number of compute nodes.'))
|
||||
parser.add_argument('--ceph-storage-scale', type=int,
|
||||
help=_('New number of ceph storage nodes.')
|
||||
+ (depr_warning % 'CephStorageCount'
|
||||
if mark_as_depr else ''))
|
||||
help=_('New number of ceph storage nodes.'))
|
||||
parser.add_argument('--block-storage-scale', type=int,
|
||||
help=_('New number of cinder storage nodes.')
|
||||
+ (depr_warning % 'BlockStorageCount'
|
||||
if mark_as_depr else ''))
|
||||
help=_('New number of cinder storage nodes.'))
|
||||
parser.add_argument('--swift-storage-scale', type=int,
|
||||
help=_('New number of swift storage nodes.')
|
||||
+ (depr_warning % 'ObjectStorageCount'
|
||||
if mark_as_depr else ''))
|
||||
help=_('New number of swift storage nodes.'))
|
||||
parser.add_argument('--control-flavor',
|
||||
help=_('Nova flavor to use for control nodes.')
|
||||
+ (depr_warning % 'OvercloudControlFlavor'
|
||||
if mark_as_depr else ''))
|
||||
help=_('Nova flavor to use for control nodes.'))
|
||||
parser.add_argument('--compute-flavor',
|
||||
help=_('Nova flavor to use for compute nodes.')
|
||||
+ (depr_warning % 'OvercloudComputeFlavor'
|
||||
if mark_as_depr else ''))
|
||||
help=_('Nova flavor to use for compute nodes.'))
|
||||
parser.add_argument('--ceph-storage-flavor',
|
||||
help=_('Nova flavor to use for ceph storage nodes.')
|
||||
+ (depr_warning % 'OvercloudCephStorageFlavor'
|
||||
if mark_as_depr else ''))
|
||||
help=_('Nova flavor to use for ceph storage nodes.'))
|
||||
parser.add_argument('--block-storage-flavor',
|
||||
help=_('Nova flavor to use for cinder storage nodes')
|
||||
+ (depr_warning % 'OvercloudBlockStorageFlavor'
|
||||
if mark_as_depr else ''))
|
||||
help=_('Nova flavor to use for cinder storage nodes'))
|
||||
parser.add_argument('--swift-storage-flavor',
|
||||
help=_('Nova flavor to use for swift storage nodes')
|
||||
+ (depr_warning % 'OvercloudSwiftStorageFlavor'
|
||||
if mark_as_depr else ''))
|
||||
help=_('Nova flavor to use for swift storage nodes'))
|
||||
|
||||
|
||||
def get_roles_info(parsed_args):
|
||||
|
@ -607,26 +607,6 @@ class DeployOvercloud(command.Command):
|
||||
utils.remove_known_hosts(overcloud_ip_or_fqdn)
|
||||
|
||||
def _validate_args(self, parsed_args):
|
||||
# TODO(bcrochet): This should be removed after Rocky or 'S'.
|
||||
if any(map(lambda x: getattr(parsed_args, x) is not None, [
|
||||
'control_scale',
|
||||
'compute_scale',
|
||||
'ceph_storage_scale',
|
||||
'block_storage_scale',
|
||||
'swift_storage_scale',
|
||||
'control_flavor',
|
||||
'compute_flavor',
|
||||
'ceph_storage_flavor',
|
||||
'block_storage_flavor',
|
||||
'swift_storage_flavor'
|
||||
])):
|
||||
raise oscexc.CommandError(
|
||||
"A scale or flavor argument was passed to the command line. "
|
||||
"These arguments are no longer valid. They MUST be replaced "
|
||||
"with an environment file that contains a valid "
|
||||
"parameter_default. Failure to do so may cause possible data "
|
||||
"loss or a decommisioning of nodes.")
|
||||
|
||||
if parsed_args.templates is None and parsed_args.answers_file is None:
|
||||
raise oscexc.CommandError(
|
||||
"You must specify either --templates or --answers-file")
|
||||
@ -788,7 +768,6 @@ class DeployOvercloud(command.Command):
|
||||
parser.add_argument('--timeout', '-t', metavar='<TIMEOUT>',
|
||||
type=int, default=240,
|
||||
help=_('Deployment timeout in minutes.'))
|
||||
utils.add_deployment_plan_arguments(parser, mark_as_depr=True)
|
||||
parser.add_argument('--libvirt-type',
|
||||
choices=['kvm', 'qemu'],
|
||||
help=_('Libvirt domain type.'))
|
||||
|
Loading…
Reference in New Issue
Block a user