summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openstackclient/compute/v2/server.py8
-rw-r--r--openstackclient/compute/v2/server_volume.py7
-rw-r--r--releasenotes/notes/rename-server-volume-update-to-server-volume-set-833f1730a9bf6169.yaml6
-rw-r--r--setup.cfg1
4 files changed, 15 insertions, 7 deletions
diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py
index 3fb9bf09..303bb70b 100644
--- a/openstackclient/compute/v2/server.py
+++ b/openstackclient/compute/v2/server.py
@@ -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 = _(
diff --git a/openstackclient/compute/v2/server_volume.py b/openstackclient/compute/v2/server_volume.py
index 7d0cd336..b4322c0b 100644
--- a/openstackclient/compute/v2/server_volume.py
+++ b/openstackclient/compute/v2/server_volume.py
@@ -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."""
diff --git a/releasenotes/notes/rename-server-volume-update-to-server-volume-set-833f1730a9bf6169.yaml b/releasenotes/notes/rename-server-volume-update-to-server-volume-set-833f1730a9bf6169.yaml
new file mode 100644
index 00000000..c1e9251b
--- /dev/null
+++ b/releasenotes/notes/rename-server-volume-update-to-server-volume-set-833f1730a9bf6169.yaml
@@ -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.
diff --git a/setup.cfg b/setup.cfg
index fa3d30fe..daba5275 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -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