From ca76260bf803895960cea3d6f735ba98ffb85463 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Fri, 4 Dec 2015 11:51:15 +0800 Subject: [PATCH] Trivial: Improve doc for "server create" command The following options of "server create" command support searching by both name and ID. So add this info into doc. --image, --volume, --flavor, --security. Change-Id: I93b167da58144e5de6c9996009b7ea2449fb4cd8 --- doc/source/command-objects/server.rst | 9 +++++---- openstackclient/compute/v2/server.py | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/source/command-objects/server.rst b/doc/source/command-objects/server.rst index 70b4748251..ddd1d5cd53 100644 --- a/doc/source/command-objects/server.rst +++ b/doc/source/command-objects/server.rst @@ -77,19 +77,20 @@ Create a new server .. option:: --image - Create server from this image + Create server from this image (name or ID) .. option:: --volume - Create server from this volume + Create server from this volume (name or ID) .. option:: --flavor - Create server with this flavor + Create server with this flavor (name or ID) .. option:: --security-group - Security group to assign to this server (repeat for multiple groups) + Security group to assign to this server (name or ID) + (repeat for multiple groups) .. option:: --key-name diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index 9dca784487..e7b18c43a4 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -276,25 +276,25 @@ class CreateServer(show.ShowOne): disk_group.add_argument( '--image', metavar='', - help=_('Create server from this image'), + help=_('Create server from this image (name or ID)'), ) disk_group.add_argument( '--volume', metavar='', - help=_('Create server from this volume'), + help=_('Create server from this volume (name or ID)'), ) parser.add_argument( '--flavor', metavar='', required=True, - help=_('Create server with this flavor'), + help=_('Create server with this flavor (name or ID)'), ) parser.add_argument( '--security-group', metavar='', action='append', default=[], - help=_('Security group to assign to this server ' + help=_('Security group to assign to this server (name or ID) ' '(repeat for multiple groups)'), ) parser.add_argument(