keystone: pass region name to keystone client
If multiple Keystone are registered into the catalog and Keystone API is used
(e.g. gnocchi dispatcher uses it to find the project id), then the region is
picked randomly by Keystone client to choose the Keystone server.
Change-Id: Ia6ae72994431bfcf31c10866c7079784487411c1
(cherry picked from commit 89ef6422f1
)
This commit is contained in:
parent
39196afd03
commit
a5e6a08aa7
|
@ -34,7 +34,9 @@ def get_session(requests_session=None):
|
|||
def get_client(trust_id=None, requests_session=None):
|
||||
"""Return a client for keystone v3 endpoint, optionally using a trust."""
|
||||
session = get_session(requests_session=requests_session)
|
||||
return ks_client_v3.Client(session=session, trust_id=trust_id)
|
||||
return ks_client_v3.Client(
|
||||
session=session, trust_id=trust_id,
|
||||
region_name=cfg.CONF.service_credentials.region_name)
|
||||
|
||||
|
||||
def get_service_catalog(client):
|
||||
|
|
Loading…
Reference in New Issue