summaryrefslogtreecommitdiff
path: root/openstackclient/identity/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/identity/client.py')
-rw-r--r--openstackclient/identity/client.py21
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):