mirror of
https://opendev.org/openstack/python-heatclient.git
synced 2026-01-16 23:00:35 +00:00
Merge "align the order of parameters for urlencode()"
This commit is contained in:
commit
ca72a42ad9
2 changed files with 4 additions and 3 deletions
|
|
@ -251,9 +251,9 @@ class StackManagerPaginationTest(testtools.TestCase):
|
|||
|
||||
offset = result[0]
|
||||
url = '/stacks?'
|
||||
if offset > 0:
|
||||
url += 'marker=abcd1234-%s&' % offset
|
||||
url += 'limit=%s' % self.page_size
|
||||
if offset > 0:
|
||||
url += '&marker=abcd1234-%s' % offset
|
||||
self.assertEqual(url, arg_url)
|
||||
|
||||
def results():
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ class StackManager(base.Manager):
|
|||
absolute_limit = kwargs.get('limit')
|
||||
|
||||
def paginate(qp, seen=0):
|
||||
url = '/stacks?%s' % urlutils.urlencode(qp)
|
||||
sort_qp = sorted(qp.items(), key=lambda x: x[0])
|
||||
url = '/stacks?%s' % urlutils.urlencode(sort_qp)
|
||||
|
||||
stacks = self._list(url, "stacks")
|
||||
for stack in stacks:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue