summaryrefslogtreecommitdiff
path: root/openstackclient/common/clientmanager.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-10-24 16:11:42 +0000
committerGerrit Code Review <review@openstack.org>2014-10-24 16:11:42 +0000
commit747a62494ca17375b835c54992ea5907e68a9a4f (patch)
tree948653a67e45b3c9a7bc579dc7ca01e89b1d31c7 /openstackclient/common/clientmanager.py
parent6a4b673e8828f3fc80c86ef8bfa7f3ab5a8f720f (diff)
parentf079b5b9c4c030293b4ebfdf84d8b768b3aa3515 (diff)
downloadpython-openstackclient-747a62494ca17375b835c54992ea5907e68a9a4f.tar.gz
Merge "Change --os-auth-plugin to --os-auth-type"
Diffstat (limited to 'openstackclient/common/clientmanager.py')
-rw-r--r--openstackclient/common/clientmanager.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py
index ae38f160..adec842f 100644
--- a/openstackclient/common/clientmanager.py
+++ b/openstackclient/common/clientmanager.py
@@ -19,7 +19,6 @@ import logging
import pkg_resources
import sys
-from keystoneclient.auth import base
from keystoneclient import session
import requests
@@ -78,20 +77,22 @@ class ClientManager(object):
returns a string containig the password
"""
- # If no plugin is named by the user, select one based on
+ # If no auth type is named by the user, select one based on
# the supplied options
- if not auth_options.os_auth_plugin:
- auth_options.os_auth_plugin = auth.select_auth_plugin(auth_options)
- self._auth_plugin = auth_options.os_auth_plugin
+ self.auth_plugin_name = auth.select_auth_plugin(auth_options)
# Horrible hack alert...must handle prompt for null password if
# password auth is requested.
- if (self._auth_plugin.endswith('password') and
+ if (self.auth_plugin_name.endswith('password') and
not auth_options.os_password):
auth_options.os_password = pw_func()
+ (auth_plugin, self._auth_params) = auth.build_auth_params(
+ self.auth_plugin_name,
+ auth_options,
+ )
+
self._url = auth_options.os_url
- self._auth_params = auth.build_auth_params(auth_options)
self._region_name = auth_options.os_region_name
self._api_version = api_version
self._auth_ref = None
@@ -117,8 +118,7 @@ class ClientManager(object):
root_logger = logging.getLogger('')
LOG.setLevel(root_logger.getEffectiveLevel())
- LOG.debug('Using auth plugin: %s' % self._auth_plugin)
- auth_plugin = base.get_plugin_class(self._auth_plugin)
+ LOG.debug('Using auth plugin: %s' % self.auth_plugin_name)
self.auth = auth_plugin.load_from_options(**self._auth_params)
# needed by SAML authentication
request_session = requests.session()