Browse Source

Honor OPENSTACK_ENDPOINT_TYPE in Horizon's local_settings.py

    Story: 2003777
    Task: 26470

Change-Id: Idd173a9c518f99de58e63f5cc6d3b0ccae0d80a1
Emmanuel MISSIAEN 3 months ago
parent
commit
124e6827a8
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      octavia_dashboard/api/rest/lbaasv2.py

+ 3
- 0
octavia_dashboard/api/rest/lbaasv2.py View File

@@ -46,12 +46,15 @@ def _get_sdk_connection(request):
46 46
     # get_one_cloud wants verify, so we pass 'not insecure' to verify.
47 47
     insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
48 48
     cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
49
+    # Pass interface to honor 'OPENSTACK_ENDPOINT_TYPE'
50
+    interface = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
49 51
     # Pass load_yaml_config as this is a Django service with its own config
50 52
     # and we don't want to accidentaly pick up a clouds.yaml file. We want to
51 53
     # use the settings we're passing in.
52 54
     cloud_config = occ.OpenStackConfig(load_yaml_config=False).get_one_cloud(
53 55
         verify=not insecure,
54 56
         cacert=cacert,
57
+        interface=interface,
55 58
         region_name=request.user.services_region,
56 59
         auth_type='token',
57 60
         auth=dict(

Loading…
Cancel
Save