diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-08-27 23:25:44 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2014-08-28 08:29:32 -0500 |
| commit | 1ab38679b61290bcb204508dc34bed564e31cbcf (patch) | |
| tree | 40629f1b35e6fe6a670d54d29a727d65bb059d49 /openstackclient/identity | |
| parent | 7a8c9a7a8a69bb520c241d40b8ecaa1deab96355 (diff) | |
| download | python-openstackclient-1ab38679b61290bcb204508dc34bed564e31cbcf.tar.gz | |
Make Identity client load like the others
This does a couple of things:
* Loads the Identity client module in the same manner as the other
'base' clients (where 'base' == 'included in the OSC repo')
* Changes the entry point group name for the base clients to
'openstack.cli.base'. The extension group name remains the same.
* Loads the base modules first followed by the extension modules.
This load order ensures that the extension module commands are all
loaded _after_ the base commands, allowing extensions to now override
the base commands.
Change-Id: I4b9ca7f1df6eb8bbe8e3f663f3065c2ed80ce20b
Diffstat (limited to 'openstackclient/identity')
| -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): |
