From 1ab38679b61290bcb204508dc34bed564e31cbcf Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 27 Aug 2014 23:25:44 -0500 Subject: 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 --- openstackclient/identity/client.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'openstackclient/identity/client.py') 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='', + 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='', + 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): -- cgit v1.2.1