Skip to content

Commit 31c6d8c

Browse files
committed
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: 42441 (cherry picked from commit 19ead1f)
1 parent 29522fd commit 31c6d8c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cloudkittydashboard/api/cloudkitty.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def cloudkittyclient(request):
2929
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
3030
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
3131
auth_url = getattr(settings, 'OPENSTACK_KEYSTONE_URL', None)
32+
interface = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
3233
auth = Token(
3334
auth_url,
3435
token=request.user.token.id,
@@ -38,6 +39,7 @@ def cloudkittyclient(request):
3839

3940
adapter_options = {
4041
'region_name': request.user.services_region,
42+
'interface': interface,
4143
}
4244

4345
return ck_client.Client(
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
upgrade:
3+
- |
4+
The CloudKitty dashboard now inherits the interface type from Horizon.
5+
This allows for easier testing, like in an all-in-one to use the
6+
internalURL.

0 commit comments

Comments
 (0)