Ensure that url stripping is done correctly

Change-Id: I9c50674f95ab849e4eaceefd05e3a8e770a86c3a
Closes-Bug: #1284640
This commit is contained in:
Endre Karlson 2014-02-25 14:28:28 +01:00
parent b9e48a4e3f
commit c6542d4437

View File

@ -85,7 +85,10 @@ class KeystoneAuth(AuthBase):
# NOTE(kiall): The Version 1 API is the only API that has ever included
# the version number in the endpoint. Thus, it's safe to
# simply remove it if present.
return url.rstrip('/').rstrip('v1').rstrip('/')
url = url.rstrip('/')
if url.endswith('/v1'):
url = url[:-3]
return url
def refresh_auth(self):
ks = self.get_ksclient()