summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorBoris Bobrov <bbobrov@mirantis.com>2016-11-17 13:46:21 +0300
committerTim Rozet <trozet@redhat.com>2016-12-09 02:36:18 +0000
commitfc370104156810cb4f65a3235d6bf6ab65f028bd (patch)
treef32d75d6a406d35275383187047b56c6e069ef82 /openstackclient
parent67dfccbd474cdd0f74f52af1ba4d2981121df687 (diff)
downloadpython-openstackclient-fc370104156810cb4f65a3235d6bf6ab65f028bd.tar.gz
Use project_domain_id only in password auth
The method being changed constructs domain-related parameters that will further be passed to the auth plugin. If project domain is not passed, the method sets it to the default domain. token_endpoint does not expect any information about domain, because it uses only a token and URL. Passing it to auth plugin causes an exception. Construct domain-related parameters only for specific plugins, such as password or totp. Change-Id: I13db3bbe31a0ed843e9f4528d37c768546e2bee9 Closes-Bug: 1642301 (cherry picked from commit e51a8d63747932f2ee4ffab02dfb0cd43e4a103d)
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/common/client_config.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/openstackclient/common/client_config.py b/openstackclient/common/client_config.py
index 895909e9..e23b07b6 100644
--- a/openstackclient/common/client_config.py
+++ b/openstackclient/common/client_config.py
@@ -148,6 +148,7 @@ class OSC_Config(config.OpenStackConfig):
# present, then do not change the behaviour. Otherwise, set the
# PROJECT_DOMAIN_ID to 'OS_DEFAULT_DOMAIN' for better usability.
if (
+ auth_type in ("password", "v3password", "v3totp") and
not config['auth'].get('project_domain_id') and
not config['auth'].get('project_domain_name')
):