From 3df5f92b447e647cdfff76010d729d74c89b39b9 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 12 Jun 2019 11:39:54 -0400 Subject: [PATCH] Add server add/remove volume description for microversion 2.20 The compute API 2.20 microversion allows attaching and detaching a volume to/from a server with status SHELVED or SHELVED_OFFLOADED. For OSC this just means the user has to specify the appropriate minimum microversion to make that work, so this change mentions that in the "server add volume" and "server remove volume" command description. Related to nova blueprint volume-ops-when-shelved Change-Id: I4824175e5d9e124e3bd9e9a8fd5a89277efc6cff --- openstackclient/compute/v2/server.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index 3e1deed59a..654440fc55 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -424,7 +424,10 @@ class AddServerSecurityGroup(command.Command): class AddServerVolume(command.Command): - _description = _("Add volume to server") + _description = _( + "Add volume to server. " + "Specify ``--os-compute-api-version 2.20`` or higher to add a volume " + "to a server with status ``SHELVED`` or ``SHELVED_OFFLOADED``.") def get_parser(self, prog_name): parser = super(AddServerVolume, self).get_parser(prog_name) @@ -1949,7 +1952,11 @@ class RemoveServerSecurityGroup(command.Command): class RemoveServerVolume(command.Command): - _description = _("Remove volume from server") + _description = _( + "Remove volume from server. " + "Specify ``--os-compute-api-version 2.20`` or higher to remove a " + "volume from a server with status ``SHELVED`` or " + "``SHELVED_OFFLOADED``.") def get_parser(self, prog_name): parser = super(RemoveServerVolume, self).get_parser(prog_name)