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

We use 'set', not 'update', in command names. An alias is provided.

Change-Id: I7864599e06df055999b975aabf101611cd482753
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2022-12-15 18:21:29 +00:00
parent 25b4714f1c
commit e0577e7ebe
4 changed files with 15 additions and 7 deletions

View File

@ -3907,9 +3907,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 = _(
@ -3955,9 +3953,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