Current region at region switcher is displayed as 'None' in case keystone version in AVAILABLE_REGIONS differs from the one returned in User object

Bug #1432781 reported by Timur Sufiev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django-openstack-auth
New
Medium
Unassigned

Bug Description

Here https://github.com/openstack/django_openstack_auth/blob/master/openstack_auth/views.py#L108 we pull out the region name to be shown at the top right corner of Horizon (region switcher, header bar) from the list of AVAILABLE_REGIONS defined in settings. The region_endpoint returned inside the User object is used as the key. Unfortunately, if the keystone version in region url at AVAILABLE_REGIONS differs from the one actually returned inside the User (e.g., we're using '.../v3' in the settings and '.../v2.0' is returned as the request.user.endpoint at https://github.com/openstack/django_openstack_auth/blob/master/openstack_auth/views.py#L107) then the current region will be displayed as None. This not only affects the name of the current region, but also the list of the regions that are available for switching to - it includes also the current region (while it shouldn't).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.