From 1686dc54f09b6e77b1de3abc708c297710987a04 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Mon, 3 Apr 2017 16:15:14 -0500 Subject: Help/docs cleanups: marker, limit, ip-address metavars Cleanup help strings and docs for clarity and to keep things consistent: * --limit metavar should be to indicate what is being counted * --marker metavar should be or to indicate the type of value being specified * <*-ip-address> metavars should be just as there is no difference in format between fixed and floating IPs * Move all occurances of '(name or ID)' to end of help text Change-Id: I2c31746ed6ded3845244e03e57d809f8bc0e6b9d --- openstackclient/compute/v2/flavor.py | 4 ++-- openstackclient/compute/v2/server.py | 45 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 25 deletions(-) (limited to 'openstackclient/compute') diff --git a/openstackclient/compute/v2/flavor.py b/openstackclient/compute/v2/flavor.py index 009c9bd1..bf9921b7 100644 --- a/openstackclient/compute/v2/flavor.py +++ b/openstackclient/compute/v2/flavor.py @@ -251,13 +251,13 @@ class ListFlavor(command.Lister): ) parser.add_argument( '--marker', - metavar="", + metavar="", help=_("The last flavor ID of the previous page") ) parser.add_argument( '--limit', type=int, - metavar="", + metavar="", help=_("Maximum number of flavors to display") ) return parser diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index 1fe5bb0d..aad1ae99 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -197,13 +197,14 @@ class AddFixedIP(command.Command): parser.add_argument( "server", metavar="", - help=_("Server (name or ID) to receive the fixed IP address"), + help=_("Server to receive the fixed IP address (name or ID)"), ) parser.add_argument( "network", metavar="", - help=_("Network (name or ID) to allocate " - "the fixed IP address from"), + help=_( + "Network to allocate the fixed IP address from (name or ID)" + ), ) return parser @@ -227,17 +228,16 @@ class AddFloatingIP(command.Command): parser.add_argument( "server", metavar="", - help=_("Server (name or ID) to receive the floating IP address"), + help=_("Server to receive the floating IP address (name or ID)"), ) parser.add_argument( "ip_address", metavar="", - help=_("Floating IP address (IP address only) to assign " - "to server"), + help=_("Floating IP address to assign to server (IP only)"), ) parser.add_argument( "--fixed-ip-address", - metavar="", + metavar="", help=_("Fixed IP address to associate with this floating IP " "address"), ) @@ -820,21 +820,21 @@ class ListServer(command.Lister): ) parser.add_argument( '--marker', - metavar='', + metavar='', default=None, - help=_('The last server (name or ID) of the previous page. Display' - ' list of servers after marker. Display all servers if not' - ' specified.') + help=_('The last server of the previous page. Display ' + 'list of servers after marker. Display all servers if not ' + 'specified. (name or ID)') ) parser.add_argument( '--limit', - metavar='', + metavar='', type=int, default=None, - help=_("Maximum number of servers to display. If limit equals -1," - " all servers will be displayed. If limit is greater than" - " 'osapi_max_limit' option of Nova API," - " 'osapi_max_limit' will be used instead."), + help=_("Maximum number of servers to display. If limit equals -1, " + "all servers will be displayed. If limit is greater than " + "'osapi_max_limit' option of Nova API, " + "'osapi_max_limit' will be used instead."), ) parser.add_argument( '--deleted', @@ -1295,13 +1295,12 @@ class RemoveFixedIP(command.Command): parser.add_argument( "server", metavar="", - help=_("Server (name or ID) to remove the fixed IP address from"), + help=_("Server to remove the fixed IP address from (name or ID)"), ) parser.add_argument( "ip_address", metavar="", - help=_("Fixed IP address (IP address only) to remove from the " - "server"), + help=_("Fixed IP address to remove from the server (IP only)"), ) return parser @@ -1322,14 +1321,14 @@ class RemoveFloatingIP(command.Command): parser.add_argument( "server", metavar="", - help=_("Server (name or ID) to remove the " - "floating IP address from"), + help=_( + "Server to remove the floating IP address from (name or ID)" + ), ) parser.add_argument( "ip_address", metavar="", - help=_("Floating IP address (IP address only) " - "to remove from server"), + help=_("Floating IP address to remove from server (IP only)"), ) return parser -- cgit v1.2.1