Deprecate nova-manage flavor subcommand
The nova client already has the following flavor commands: flavor-access-add Add flavor access for the given tenant. flavor-access-list Print access information about the given flavor. flavor-access-remove Remove flavor access for the given tenant. flavor-create Create a new flavor flavor-delete Delete a specific flavor flavor-key Set or unset extra_spec for a flavor. flavor-list Print a list of available 'flavors' (sizes of flavor-show Show details about the given flavor. This covers what nova-manage flavor was providing so let's deprecate the legacy nova-manage subcommand and mark it for removal in the K release. There is not a bug or blueprint for this. The flavor subcommand is completely duplicated in nova client. It is accessing the database directly and we want to move to using flavor objects which would go through conductor. So this could be considered part of the objects conversion for flavors. For some other commands like service, db and host it makes sense to leave those so you can access the database before the api service is running, but that's not the case for flavors. UpgradeImpact: nova-manage flavor command is deprecated, use nova client Change-Id: I8709bc9af4e490142e44c6dc61fd0aaa3a392b68
This commit is contained in:
parent
54ccd875b7
commit
a601556684
|
@ -118,6 +118,9 @@ Nova Floating IPs
|
|||
Nova Flavor
|
||||
~~~~~~~~~~~
|
||||
|
||||
**DEPRECATED** Use the nova flavor-* commands from python-novaclient instead.
|
||||
The flavor subcommand will be removed in the 2015.1 release.
|
||||
|
||||
``nova-manage flavor list``
|
||||
|
||||
Outputs a list of all active flavors to the screen.
|
||||
|
|
|
@ -927,6 +927,10 @@ class FlavorCommands(object):
|
|||
Note instance type is a deprecated synonym for flavor.
|
||||
"""
|
||||
|
||||
description = ('DEPRECATED: Use the nova flavor-* commands from '
|
||||
'python-novaclient instead. The flavor subcommand will be '
|
||||
'removed in the 2015.1 release')
|
||||
|
||||
def _print_flavors(self, val):
|
||||
is_public = ('private', 'public')[val["is_public"] == 1]
|
||||
print(("%s: Memory: %sMB, VCPUS: %s, Root: %sGB, Ephemeral: %sGb, "
|
||||
|
@ -1300,13 +1304,14 @@ def add_command_parsers(subparsers):
|
|||
for category in CATEGORIES:
|
||||
command_object = CATEGORIES[category]()
|
||||
|
||||
parser = subparsers.add_parser(category)
|
||||
desc = getattr(command_object, 'description', None)
|
||||
parser = subparsers.add_parser(category, description=desc)
|
||||
parser.set_defaults(command_object=command_object)
|
||||
|
||||
category_subparsers = parser.add_subparsers(dest='action')
|
||||
|
||||
for (action, action_fn) in methods_of(command_object):
|
||||
parser = category_subparsers.add_parser(action)
|
||||
parser = category_subparsers.add_parser(action, description=desc)
|
||||
|
||||
action_kwargs = []
|
||||
for args, kwargs in getattr(action_fn, 'args', []):
|
||||
|
|
Loading…
Reference in New Issue