Respect endpoint type specified in Horizon

The CloudKitty dashboard now inherits the interface type from Horizon.
This allows for easier testing, like in an all-in-one to use the
internalURL.

Change-Id: I28d6d1ac1a9d8db4accc4cadc5da261cb86330fd
Story: 2008879
Task: 42424
This commit is contained in:
Jonathan Herlin 2021-05-03 14:54:47 +02:00
parent 4e166ded43
commit 19ead1f072
2 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,7 @@ def cloudkittyclient(request):
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
auth_url = getattr(settings, 'OPENSTACK_KEYSTONE_URL', None)
interface = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
auth = Token(
auth_url,
token=request.user.token.id,
@ -38,6 +39,7 @@ def cloudkittyclient(request):
adapter_options = {
'region_name': request.user.services_region,
'interface': interface,
}
return ck_client.Client(

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The CloudKitty dashboard now inherits the interface type from Horizon.
This allows for easier testing, like in an all-in-one to use the
internalURL.