summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-08-13 09:14:01 +0000
committerMonty Taylor <mordred@inaugust.com>2015-08-15 07:40:42 +0800
commite29ed75a4b72ed25c7791dab8a66f3a3c86f962a (patch)
tree860ffccebdb4b248750245de452e11ab515909b1
parent0e3117cb01d201f403be72cbb1218b9eec69a541 (diff)
downloados-client-config-e29ed75a4b72ed25c7791dab8a66f3a3c86f962a.tar.gz
Revert "Revert "Use the correct auth_plugin for token authentication""
Name the auth type needed for using an admin token "admin_token". This hack can be removed with keystoneclient and/or keystoneauth make a release with the admin_token entrypoint defined. Naming it admin_token further reduces the conflict with OSC, which should make the patch to work around OSC having different arguments unnecessary. This reverts commit 0e3117cb01d201f403be72cbb1218b9eec69a541. Change-Id: I079c7c61b2637ded73542876cb1378a0731f8631
-rw-r--r--os_client_config/config.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py
index 1840d18..9983978 100644
--- a/os_client_config/config.py
+++ b/os_client_config/config.py
@@ -379,8 +379,12 @@ class OpenStackConfig(object):
def _validate_auth(self, config):
# May throw a keystoneclient.exceptions.NoMatchingPlugin
- plugin_options = ksc_auth.get_plugin_class(
- config['auth_type']).get_options()
+ if config['auth_type'] == 'admin_endpoint':
+ auth_plugin = ksc_auth.token_endpoint.Token
+ else:
+ auth_plugin = ksc_auth.get_plugin_class(config['auth_type'])
+
+ plugin_options = auth_plugin.get_options()
for p_opt in plugin_options:
# if it's in config.auth, win, kill it from config dict