From caa5e910598707d2cfc56faedb6dff97c574e50c Mon Sep 17 00:00:00 2001 From: Timur Sufiev Date: Thu, 26 May 2016 19:09:51 +0300 Subject: [PATCH] Fix Keystone version suffix when Keystone webpath is present In this patch the URLs that are coming from service catalog are fixed to contain the proper version. Update requirements.txt in the same commit, because otherwise integration tests won't pass for OpenStack Proposal Bot commit which should update DOA version. Closes-Bug: #1585682 Depends-On: Iea9b8e8378e6c5fb4c60df0073968d8caf7fbc5e Change-Id: Icebfc291ec2b06ed84934c75cfd8c9d91cb2a895 --- openstack_dashboard/api/keystone.py | 3 +-- releasenotes/notes/bug-1585682-abd815f290e494d3.yaml | 11 +++++++++++ requirements.txt | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/bug-1585682-abd815f290e494d3.yaml diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index 0cd369a62f..7c404f96f3 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -118,8 +118,7 @@ def _get_endpoint_url(request, endpoint_type, catalog=None): # TODO(gabriel): When the Service Catalog no longer contains API versions # in the endpoints this can be removed. - url = url.rstrip('/') - url = urlparse.urljoin(url, 'v%s' % VERSIONS.active) + url = auth_utils.fix_auth_url_version(url) return url diff --git a/releasenotes/notes/bug-1585682-abd815f290e494d3.yaml b/releasenotes/notes/bug-1585682-abd815f290e494d3.yaml new file mode 100644 index 0000000000..0a424e437b --- /dev/null +++ b/releasenotes/notes/bug-1585682-abd815f290e494d3.yaml @@ -0,0 +1,11 @@ +--- +upgrade: + - It is no longer necessary to include the version suffix into + OPENSTACK_KEYSTONE_URL setting. Thanks to a recent update of + django-openstack-auth library as of 2.3.0 release, Horizon will + append the proper version suffix to the URL based on the value + stored inside OPENSTACK_API_VERSIONS['identity'] setting. +fixes: + - LP-1585682 is fixed which grants Horizon the ability to properly version + Keystone webpath endpoints (URLs like http:///identity instead of + http://:5000). diff --git a/requirements.txt b/requirements.txt index 1c255359c7..d8f7025959 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ Django<1.9,>=1.8 # BSD Pint>=0.5 # BSD django-babel>=0.5.1 # BSD django-compressor>=2.0 # MIT -django-openstack-auth>=2.2.0 # Apache-2.0 +django-openstack-auth>=2.3.0 # Apache-2.0 django-pyscss>=2.0.2 # BSD License (2 clause) iso8601>=0.1.11 # MIT netaddr!=0.7.16,>=0.7.12 # BSD