Fix "Support pagination for 'list' API calls" backport

The change Ica7c8c953c11af4400b224ad942023f69a72ae02 was incorrectly
backported to stable/train, a merge conflict with the use of urllib from
six introduced a bug that triggers an exception when a list of octavia
resources exceeds the limit of the pagination:

module 'six.moves.urllib' has no attribute 'urlparse'

This commit fixes the invalid calls.

It also disables the lower-constraints job that is now failing on
train.

Note: this is a stable/train-only commit

Change-Id: I5523820e8607ed8e2fb75965427df33055673943
This commit is contained in:
Gregory Thiemonge 2022-02-04 09:34:22 +01:00
parent ebfe469c2d
commit b6642c9a04
2 changed files with 2 additions and 3 deletions

View File

@ -86,8 +86,8 @@ class OctaviaAPI(api.BaseAPI):
links = response.get("{}_links".format(resource_key), [])
for link in links:
if link.get('rel') == 'next':
query_str = urllib.urlparse.urlparse(link['href']).query
params = urllib.urlparse.parse_qs(query_str)
query_str = urllib.parse.urlparse(link['href']).query
params = urllib.parse.parse_qs(query_str)
break
else:
break

View File

@ -2,7 +2,6 @@
templates:
- check-requirements
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-train-jobs
- openstackclient-plugin-jobs