From 19ead1f0723845a7ebee511dace691da5f28c268 Mon Sep 17 00:00:00 2001 From: Jonathan Herlin Date: Mon, 3 May 2021 14:54:47 +0200 Subject: [PATCH] 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 --- cloudkittydashboard/api/cloudkitty.py | 2 ++ .../notes/keystone-endpoint-type-b5646c052e65c848.yaml | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/keystone-endpoint-type-b5646c052e65c848.yaml diff --git a/cloudkittydashboard/api/cloudkitty.py b/cloudkittydashboard/api/cloudkitty.py index 56785ca..0fa26c9 100644 --- a/cloudkittydashboard/api/cloudkitty.py +++ b/cloudkittydashboard/api/cloudkitty.py @@ -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( diff --git a/releasenotes/notes/keystone-endpoint-type-b5646c052e65c848.yaml b/releasenotes/notes/keystone-endpoint-type-b5646c052e65c848.yaml new file mode 100644 index 0000000..e552146 --- /dev/null +++ b/releasenotes/notes/keystone-endpoint-type-b5646c052e65c848.yaml @@ -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.