From aac0d588bd83b51cd2f4b36b22741497fb39d79f Mon Sep 17 00:00:00 2001 From: Steve Martinelli <stevemar@ca.ibm.com> Date: Thu, 11 Jun 2015 02:43:57 -0400 Subject: [PATCH] Skip trying to set project_domain_id if not using password This is already fine for user_domain_id, and needs to be replicated for project_domain_id. Also added more logging. Change-Id: I3fa8f29edb3fc430d453bd0fc835312c0c8401f4 --- openstackclient/common/clientmanager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 6311c71a50..0159ad7d50 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -138,6 +138,7 @@ class ClientManager(object): # present, then do not change the behaviour. Otherwise, set the # PROJECT_DOMAIN_ID to 'OS_DEFAULT_DOMAIN' for better usability. if (self._api_version.get('identity') == '3' and + self.auth_plugin_name.endswith('password') and not self._auth_params.get('project_domain_id', None) and not self.auth_plugin_name.startswith('v2') and not self._auth_params.get('project_domain_name', None)): @@ -160,6 +161,7 @@ class ClientManager(object): self._project_name = self._auth_params['tenant_name'] LOG.info('Using auth plugin: %s' % self.auth_plugin_name) + LOG.debug('Using parameters %s' % self._auth_params) self.auth = auth_plugin.load_from_options(**self._auth_params) # needed by SAML authentication request_session = requests.session()