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
This commit is contained in:
parent
3de27d2855
commit
89ef6422f1
@ -38,10 +38,12 @@ def get_session(conf, requests_session=None, group=None, timeout=None):
|
||||
return session
|
||||
|
||||
|
||||
def get_client(conf, trust_id=None, requests_session=None, group=None):
|
||||
def get_client(conf, trust_id=None, requests_session=None,
|
||||
group=DEFAULT_GROUP):
|
||||
"""Return a client for keystone v3 endpoint, optionally using a trust."""
|
||||
session = get_session(conf, requests_session=requests_session, group=group)
|
||||
return ks_client_v3.Client(session=session, trust_id=trust_id)
|
||||
return ks_client_v3.Client(session=session, trust_id=trust_id,
|
||||
region_name=conf[group].region_name)
|
||||
|
||||
|
||||
def get_service_catalog(client):
|
||||
|
Loading…
Reference in New Issue
Block a user