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: 42440
(cherry picked from commit 19ead1f072
)
This commit is contained in:
parent
ea6adc227d
commit
2a24f55f83
|
@ -29,6 +29,7 @@ def cloudkittyclient(request):
|
||||||
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
||||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||||
auth_url = getattr(settings, 'OPENSTACK_KEYSTONE_URL', None)
|
auth_url = getattr(settings, 'OPENSTACK_KEYSTONE_URL', None)
|
||||||
|
interface = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
|
||||||
auth = Token(
|
auth = Token(
|
||||||
auth_url,
|
auth_url,
|
||||||
token=request.user.token.id,
|
token=request.user.token.id,
|
||||||
|
@ -38,6 +39,7 @@ def cloudkittyclient(request):
|
||||||
|
|
||||||
adapter_options = {
|
adapter_options = {
|
||||||
'region_name': request.user.services_region,
|
'region_name': request.user.services_region,
|
||||||
|
'interface': interface,
|
||||||
}
|
}
|
||||||
|
|
||||||
return ck_client.Client(
|
return ck_client.Client(
|
||||||
|
|
|
@ -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.
|
Loading…
Reference in New Issue