From c72a3759b6412dde0905e035ecc64d1033da0dbe Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Fri, 7 Aug 2020 15:48:45 -0700 Subject: [PATCH] Specify public keystone endpoint when creating client Change-Id: Ib5bab9e7b21937e70f4f90a65b3b518705378b74 --- orm/common/client/keystone/keystone_utils/tokens.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/orm/common/client/keystone/keystone_utils/tokens.py b/orm/common/client/keystone/keystone_utils/tokens.py index 66618951..2bb6889d 100755 --- a/orm/common/client/keystone/keystone_utils/tokens.py +++ b/orm/common/client/keystone/keystone_utils/tokens.py @@ -25,7 +25,8 @@ class KeystoneNotFoundError(Exception): class TokenConf(object): """The Token Validator configuration class.""" - def __init__(self, mech_id, password, rms_url, tenant_name, version, user_domain_name, project_domain_name): + def __init__(self, mech_id, password, rms_url, tenant_name, + version, user_domain_name, project_domain_name): """Initialize the Token Validator configuration. :param mech_id: Username for Keystone @@ -182,7 +183,8 @@ def _get_keystone_client(client, conf, keystone_ep, lcp_id): project_name=conf.tenant_name, auth_url=keystone_ep + '/v' + conf.version) sess = ksc_session.Session(auth=auth) - _KEYSTONES[keystone_ep] = client.Client(session=sess) + _KEYSTONES[keystone_ep] = client.Client(session=sess, + interface='public') return _KEYSTONES[keystone_ep] except Exception: logger.critical(