From c885c72cba459ca853de10ec1685d70d9c2b7ca2 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Thu, 8 Jan 2015 01:29:35 -0500 Subject: [PATCH] Command doc: consumer Change-Id: Ie687e1d7f80810106a64204828299f9d143b8d7c --- doc/source/command-objects/consumer.rst | 83 +++++++++++++++++++++++++ doc/source/commands.rst | 2 +- openstackclient/identity/v3/consumer.py | 22 +++---- 3 files changed, 95 insertions(+), 12 deletions(-) create mode 100644 doc/source/command-objects/consumer.rst diff --git a/doc/source/command-objects/consumer.rst b/doc/source/command-objects/consumer.rst new file mode 100644 index 0000000000..59ace845e0 --- /dev/null +++ b/doc/source/command-objects/consumer.rst @@ -0,0 +1,83 @@ +======== +consumer +======== + +Identity v3 + +`Requires: OS-OAUTH1 extension` + +consumer create +--------------- + +Create new consumer + +.. program:: consumer create +.. code:: bash + + os consumer create + [--description ] + +.. option:: --description + + New consumer description + +consumer delete +--------------- + +Delete a consumer + +.. program:: consumer delete +.. code:: bash + + os consumer delete + + +.. describe:: + + Consumer to delete + +consumer list +------------- + +List consumers + +.. program:: consumer list +.. code:: bash + + os consumer list + +consumer set +------------ + +Set consumer properties + +.. program:: consumer set +.. code:: bash + + os consumer set + [--description ] + + +.. option:: --description + + New consumer description + +.. describe:: + + Consumer to modify + +consumer show +------------- + +Display consumer details + +.. program:: consumer show +.. code:: bash + + os consumer show + + +.. _consumer_show-consumer: +.. describe:: + + Consumer to display diff --git a/doc/source/commands.rst b/doc/source/commands.rst index bb3db18755..9d60984354 100644 --- a/doc/source/commands.rst +++ b/doc/source/commands.rst @@ -76,7 +76,7 @@ referring to both Compute and Volume quotas. * ``catalog``: (**Identity**) service catalog * ``console log``: (**Compute**) server console text dump * ``console url``: (**Compute**) server remote console URL -* ``consumer``: Identity - OAuth-based delegatee +* ``consumer``: (**Identity**) OAuth-based delegatee * ``container``: (**Object Store**) a grouping of objects * ``credentials``: (**Identity**) specific to identity providers * ``domain``: (**Identity**) a grouping of projects diff --git a/openstackclient/identity/v3/consumer.py b/openstackclient/identity/v3/consumer.py index b7e57d8dd0..c5e263926c 100644 --- a/openstackclient/identity/v3/consumer.py +++ b/openstackclient/identity/v3/consumer.py @@ -27,7 +27,7 @@ from openstackclient.common import utils class CreateConsumer(show.ShowOne): - """Create consumer command""" + """Create new consumer""" log = logging.getLogger(__name__ + '.CreateConsumer') @@ -35,7 +35,7 @@ class CreateConsumer(show.ShowOne): parser = super(CreateConsumer, self).get_parser(prog_name) parser.add_argument( '--description', - metavar='', + metavar='', help='New consumer description', ) return parser @@ -51,7 +51,7 @@ class CreateConsumer(show.ShowOne): class DeleteConsumer(command.Command): - """Delete consumer command""" + """Delete a consumer""" log = logging.getLogger(__name__ + '.DeleteConsumer') @@ -60,7 +60,7 @@ class DeleteConsumer(command.Command): parser.add_argument( 'consumer', metavar='', - help='ID of consumer to delete', + help='Consumer to delete', ) return parser @@ -74,7 +74,7 @@ class DeleteConsumer(command.Command): class ListConsumer(lister.Lister): - """List consumer command""" + """List consumers""" log = logging.getLogger(__name__ + '.ListConsumer') @@ -90,7 +90,7 @@ class ListConsumer(lister.Lister): class SetConsumer(command.Command): - """Set consumer command""" + """Set consumer properties""" log = logging.getLogger(__name__ + '.SetConsumer') @@ -99,11 +99,11 @@ class SetConsumer(command.Command): parser.add_argument( 'consumer', metavar='', - help='ID of consumer to change', + help='Consumer to modify', ) parser.add_argument( '--description', - metavar='', + metavar='', help='New consumer description', ) return parser @@ -118,7 +118,7 @@ class SetConsumer(command.Command): kwargs['description'] = parsed_args.description if not len(kwargs): - sys.stdout.write("Consumer not updated, no arguments present") + sys.stdout.write('Consumer not updated, no arguments present') return consumer = identity_client.oauth1.consumers.update( @@ -127,7 +127,7 @@ class SetConsumer(command.Command): class ShowConsumer(show.ShowOne): - """Show consumer command""" + """Display consumer details""" log = logging.getLogger(__name__ + '.ShowConsumer') @@ -136,7 +136,7 @@ class ShowConsumer(show.ShowOne): parser.add_argument( 'consumer', metavar='', - help='ID of consumer to display', + help='Consumer to display', ) return parser