diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-09-06 13:26:40 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-09-06 13:26:40 +0000 |
| commit | bdf9b19abb3c7612fc3d40af9d2fe96df8f1339c (patch) | |
| tree | 9b8f80cde5bf9f6ccc2bb5e2a95b6064fc9c08d6 /openstackclient/identity/client.py | |
| parent | 1eb7aba2c9bea877b840703cf158c76b9c066b4b (diff) | |
| parent | 1ab38679b61290bcb204508dc34bed564e31cbcf (diff) | |
| download | python-openstackclient-bdf9b19abb3c7612fc3d40af9d2fe96df8f1339c.tar.gz | |
Merge "Make Identity client load like the others"
Diffstat (limited to 'openstackclient/identity/client.py')
| -rw-r--r-- | openstackclient/identity/client.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/openstackclient/identity/client.py b/openstackclient/identity/client.py index 7f5390c8..a2bbb61d 100644 --- a/openstackclient/identity/client.py +++ b/openstackclient/identity/client.py @@ -70,6 +70,27 @@ def make_client(instance): return client +def build_option_parser(parser): + """Hook to add global options""" + parser.add_argument( + '--os-identity-api-version', + metavar='<identity-api-version>', + default=utils.env( + 'OS_IDENTITY_API_VERSION', + default=DEFAULT_IDENTITY_API_VERSION), + help='Identity API version, default=' + + DEFAULT_IDENTITY_API_VERSION + + ' (Env: OS_IDENTITY_API_VERSION)') + parser.add_argument( + '--os-trust-id', + metavar='<trust-id>', + default=utils.env('OS_TRUST_ID'), + help='Trust ID to use when authenticating. ' + 'This can only be used with Keystone v3 API ' + '(Env: OS_TRUST_ID)') + return parser + + class IdentityClientv2_0(identity_client_v2_0.Client): """Tweak the earlier client class to deal with some changes""" def __getattr__(self, name): |
