Command doc: access token

Change-Id: I1b7103e28273f0a63c7d6b6003317b9e69702b05
This commit is contained in:
Steve Martinelli 2015-01-08 02:22:31 -05:00
parent d9c217e5bc
commit d2943d2592
3 changed files with 50 additions and 10 deletions

View File

@ -0,0 +1,42 @@
============
access token
============
Identity v3
`Requires: OS-OAUTH1 extension`
access token create
-------------------
Create an access token
.. program:: access token create
.. code:: bash
os access token create
--consumer-key <consumer-key>
--consumer-secret <consumer-secret>
--request-key <request-key>
--request-secret <request-secret>
--verifier <verifier>
.. option:: --consumer-key <consumer-key>
Consumer key (required)
.. option:: --consumer-secret <consumer-secret>
Consumer secret (required)
.. option:: --request-key <request-key>
Request token to exchange for access token (required)
.. option:: --request-secret <request-secret>
Secret associated with <request-key> (required)
.. option:: --verifier <verifier>
Verifier associated with <request-key> (required)

View File

@ -69,7 +69,7 @@ overlapping purposes there will be options to select which object to use, or
the API resources will be merged, as in the ``quota`` object that has options
referring to both Compute and Volume quotas.
* ``access token``: Identity - long-lived OAuth-based token
* ``access token``: (**Identity**) long-lived OAuth-based token
* ``availability zone``: (**Compute**) a logical partition of hosts or volume services
* ``aggregate``: (**Compute**) a grouping of servers
* ``backup``: (**Volume**) a volume copy

View File

@ -69,7 +69,7 @@ class AuthorizeRequestToken(show.ShowOne):
class CreateAccessToken(show.ShowOne):
"""Create access token"""
"""Create an access token"""
log = logging.getLogger(__name__ + '.CreateAccessToken')
@ -78,31 +78,31 @@ class CreateAccessToken(show.ShowOne):
parser.add_argument(
'--consumer-key',
metavar='<consumer-key>',
help='Consumer key',
help='Consumer key (required)',
required=True
)
parser.add_argument(
'--consumer-secret',
metavar='<consumer-secret>',
help='Consumer secret',
help='Consumer secret (required)',
required=True
)
parser.add_argument(
'--request-key',
metavar='<request-key>',
help='Request token key',
help='Request token to exchange for access token (required)',
required=True
)
parser.add_argument(
'--request-secret',
metavar='<request-secret>',
help='Request token secret',
help='Secret associated with <request-key> (required)',
required=True
)
parser.add_argument(
'--verifier',
metavar='<verifier>',
help='Verifier Pin',
help='Verifier associated with <request-key> (required)',
required=True
)
return parser
@ -114,9 +114,7 @@ class CreateAccessToken(show.ShowOne):
parsed_args.consumer_key, parsed_args.consumer_secret,
parsed_args.request_key, parsed_args.request_secret,
parsed_args.verifier)
info = {}
info.update(access_token._info)
return zip(*sorted(six.iteritems(info)))
return zip(*sorted(six.iteritems(access_token._info)))
class CreateRequestToken(show.ShowOne):