From ca92608974a8fe9a54951d0ea6b24ab59a5b7a06 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Mon, 5 Jan 2015 01:27:47 -0500 Subject: [PATCH] Command doc: volume type Change-Id: I7e36daa027639d6a782043d4181c1b328335975a --- doc/source/command-objects/volume-type.rst | 95 ++++++++++++++++++++++ doc/source/commands.rst | 2 +- openstackclient/volume/v1/type.py | 14 ++-- 3 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 doc/source/command-objects/volume-type.rst diff --git a/doc/source/command-objects/volume-type.rst b/doc/source/command-objects/volume-type.rst new file mode 100644 index 0000000000..0898df528b --- /dev/null +++ b/doc/source/command-objects/volume-type.rst @@ -0,0 +1,95 @@ +=========== +volume type +=========== + +Volume v1 + +volume type create +------------------ + +Create new volume type + +.. program:: volume type create +.. code:: bash + + os volume type create + [--property [...] ] + + +.. option:: --property + + Set a property on this volume type (repeat option to set multiple properties) + +.. describe:: + + New volume type name + +volume type delete +------------------ + +Delete volume type + +.. program:: volume type delete +.. code:: bash + + os volume type delete + + +.. describe:: + + Volume type to delete (name or ID) + +volume type list +---------------- + +List volume types + +.. program:: volume type list +.. code:: bash + + os volume type list + [--long] + +.. option:: --long + + List additional fields in output + +volume type set +--------------- + +Set volume type properties + +.. program:: volume type set +.. code:: bash + + os volume type set + [--property [...] ] + + +.. option:: --property + + Property to add or modify for this volume type (repeat option to set multiple properties) + +.. describe:: + + Volume type to modify (name or ID) + +volume type unset +----------------- + +Unset volume type properties + +.. program:: volume type unset +.. code:: bash + + os volume type unset + [--property ] + + +.. option:: --property + + Property to remove from volume type (repeat option to remove multiple properties) + +.. describe:: + + Volume type to modify (name or ID) diff --git a/doc/source/commands.rst b/doc/source/commands.rst index 4b2e6355e4..5bec1a8518 100644 --- a/doc/source/commands.rst +++ b/doc/source/commands.rst @@ -113,7 +113,7 @@ referring to both Compute and Volume quotas. * ``user``: (**Identity**) individual cloud resources users * ``user role``: (**Identity**) roles assigned to a user * ``volume``: Volume - block volumes -* ``volume type``: Volume - deployment-specific types of volumes available +* ``volume type``: (**Volume**) deployment-specific types of volumes available Actions ------- diff --git a/openstackclient/volume/v1/type.py b/openstackclient/volume/v1/type.py index 71bfc9eaba..46d1828b1e 100644 --- a/openstackclient/volume/v1/type.py +++ b/openstackclient/volume/v1/type.py @@ -71,7 +71,7 @@ class DeleteVolumeType(command.Command): parser.add_argument( 'volume_type', metavar='', - help='Name or ID of volume type to delete', + help='Volume type to delete (name or ID)', ) return parser @@ -115,7 +115,7 @@ class ListVolumeType(lister.Lister): class SetVolumeType(command.Command): - """Set volume type property""" + """Set volume type properties""" log = logging.getLogger(__name__ + '.SetVolumeType') @@ -124,13 +124,13 @@ class SetVolumeType(command.Command): parser.add_argument( 'volume_type', metavar='', - help='Volume type name or ID to update', + help='Volume type to modify (name or ID)', ) parser.add_argument( '--property', metavar='', action=parseractions.KeyValueAction, - help='Property to add/change for this volume type ' + help='Property to add or modify for this volume type ' '(repeat option to set multiple properties)', ) return parser @@ -148,7 +148,7 @@ class SetVolumeType(command.Command): class UnsetVolumeType(command.Command): - """Unset volume type property""" + """Unset volume type properties""" log = logging.getLogger(__name__ + '.UnsetVolumeType') @@ -157,14 +157,14 @@ class UnsetVolumeType(command.Command): parser.add_argument( 'volume_type', metavar='', - help='Type ID or name to remove', + help='Volume type to modify (name or ID)', ) parser.add_argument( '--property', metavar='', action='append', default=[], - help='Property key to remove from volume ' + help='Property to remove from volume type ' '(repeat option to remove multiple properties)', ) return parser