Explicitly specify the region_name when instanciating a client
Until now, the region_name was not specified when instanciating cloudkittyclient from the horizon dashboard. This caused the client to use systematically use the default region. That behavior was problematic in multi-region setups, as only the cloudkitty API of the default region could be reached. Change-Id: Ibb399a0b5b96aa808b0bbb7a5a82dd4d8a948063
This commit is contained in:
parent
aa0bb413b4
commit
3e33fddff0
|
@ -35,11 +35,18 @@ def cloudkittyclient(request):
|
|||
project_id=request.user.project_id,
|
||||
domain_id=request.user.domain_id,
|
||||
)
|
||||
|
||||
adapter_options = {
|
||||
'region_name': request.user.services_region,
|
||||
}
|
||||
|
||||
return ck_client.Client(
|
||||
'1',
|
||||
auth=auth,
|
||||
cacert=cacert,
|
||||
insecure=insecure)
|
||||
insecure=insecure,
|
||||
adapter_options=adapter_options,
|
||||
)
|
||||
|
||||
|
||||
def identify(what, name=False, key=None):
|
||||
|
|
Loading…
Reference in New Issue