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 e51a8d6374)
This commit is contained in:
Boris Bobrov 2016-11-17 13:46:21 +03:00 committed by Tim Rozet
parent 67dfccbd47
commit fc37010415
1 changed files with 1 additions and 0 deletions

View File

@ -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')
):