Merge "compute: 'server volume update' -> 'server volume set'"

This commit is contained in:
Zuul 2023-02-21 13:28:40 +00:00 committed by Gerrit Code Review
commit dfe2bc9fbd
4 changed files with 15 additions and 7 deletions

View File

@ -3958,9 +3958,7 @@ Confirm (verify) success of resize operation and release the old server.""")
# TODO(stephenfin): Remove in OSC 7.0
class MigrateConfirm(ResizeConfirm):
_description = _("""DEPRECATED: Confirm server migration.
Use 'server migration confirm' instead.""")
_description = _("DEPRECATED: Use 'server migration confirm' instead.")
def take_action(self, parsed_args):
msg = _(
@ -4006,9 +4004,7 @@ one.""")
# TODO(stephenfin): Remove in OSC 7.0
class MigrateRevert(ResizeRevert):
_description = _("""Revert server migration.
Use 'server migration revert' instead.""")
_description = _("DEPRECATED: Use 'server migration revert' instead.")
def take_action(self, parsed_args):
msg = _(

View File

@ -78,7 +78,7 @@ class ListServerVolume(command.Lister):
)
class UpdateServerVolume(command.Command):
class SetServerVolume(command.Command):
"""Update a volume attachment on the server."""
def get_parser(self, prog_name):
@ -140,3 +140,8 @@ class UpdateServerVolume(command.Command):
volume,
delete_on_termination=parsed_args.delete_on_termination,
)
# Legacy alias
class UpdateServerVolume(SetServerVolume):
"""DEPRECATED: Use 'server volume set' instead."""

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The ``server volume update`` command has been renamed to ``server volume
set`` to better match other commands in OSC. An alias is provided for
backwards compatibility.

View File

@ -159,6 +159,7 @@ openstack.compute.v2 =
server_migration_show = openstackclient.compute.v2.server_migration:ShowMigration
server_volume_list = openstackclient.compute.v2.server_volume:ListServerVolume
server_volume_set = openstackclient.compute.v2.server_volume:SetServerVolume
server_volume_update = openstackclient.compute.v2.server_volume:UpdateServerVolume
usage_list = openstackclient.compute.v2.usage:ListUsage