tempest-lib KeystoneV2AuthProvider won't strip version in url correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Fix Released
|
Medium
|
Sergey Nikitin |
Bug Description
Hi,
If the endpoint url for the identity server in keystone looks like http://
I guess the expression here is the culprit: https:/
>>> "/".join(
'v2.0'
>>> "/".join(
''
When a double // is used the version if not stripped correctly.
Also, if the url is mounted somewhere else than root this looks broken too:
>>> "/".join(
'v2.0'
Here, I guess the tempest-lib code expects it returns 'bla' not 'v2.0'
Cheers,
Changed in tempest: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in tempest: | |
assignee: | nobody → takmatsu (takeaki-matsumoto) |
Changed in tempest: | |
assignee: | takmatsu (takeaki-matsumoto) → nobody |
Changed in tempest: | |
assignee: | nobody → Marian Horban (mhorban) |
Changed in tempest: | |
status: | Confirmed → In Progress |
Changed in tempest: | |
assignee: | Marian Horban (mhorban) → Sergey Nikitin (snikitin) |
Changed in tempest: | |
assignee: | Sergey Nikitin (snikitin) → nobody |
Changed in tempest: | |
assignee: | nobody → Sergey Nikitin (snikitin) |
a potential fix for this is: .venv/lib/ python2. 7/site- packages/ tempest_ lib/auth. py 2016-02-12 16:51:54.599727161 -0600 urlparse( _base_url) get('api_ version' , None) is not None: 'api_version' ] parts.path. split(" /")[2:] )
path += "/" + noversion_path
_base_url = _base_url. replace( parts.path, path) urlparse( _base_url) get('api_ version' , None) is not None: 'api_version' ] r'^/{2, }(.+)', r'/\1', parts.path) noversion_ path.split( "/")[2: ])
path += "/" + noversion_path
_base_url = _base_url. replace( parts.path, path) urlparse( _base_url) get('api_ version' , None) is not None: 'api_version' ] parts.path. split(" /")[2:] )
path += "/" + noversion_path
_base_url = _base_url. replace( parts.path, path) urlparse( _base_url) get('api_ version' , None) is not None: 'api_version' ] r'^/{2, }(.+)', r'/\1', parts.path) noversion_ path.split( "/")[2: ])
path += "/" + noversion_path
_base_url = _base_url. replace( parts.path, path)
*** tempest_lib/auth.py 2016-02-12 16:50:43.983726239 -0600
--- ../tempest/
***************
*** 324,330 ****
parts = urlparse.
if filters.
path = "/" + filters[
! noversion_path = "/".join(
if noversion_path != "":
--- 324,331 ----
parts = urlparse.
if filters.
path = "/" + filters[
! noversion_path = re.sub(
! noversion_path = "/".join(
if noversion_path != "":
***************
*** 446,452 ****
parts = urlparse.
if filters.
path = "/" + filters[
! noversion_path = "/".join(
if noversion_path != "":
--- 447,454 ----
parts = urlparse.
if filters.
path = "/" + filters[
! noversion_path = re.sub(
! noversion_path = "/".join(
if noversion_path != "":
note that line 224 in auth.py has a similar approach for handling contiguous slashes