Pop limit and marker only during aggregation

Change-Id: Id0eeb99c46f340dc1a5a151690cb2580c6f15ccb
This commit is contained in:
Kristi Nikolla 2017-02-10 11:44:48 -05:00
parent 7768638d49
commit 4d44d0bb0d
2 changed files with 10 additions and 2 deletions

View File

@ -292,8 +292,9 @@ class RequestHandler(object):
the service providers.
"""
args = user_args.copy()
args.pop('limit', None)
args.pop('marker', None)
if CONF.aggregation:
args.pop('limit', None)
args.pop('marker', None)
return args
@property

View File

@ -186,6 +186,13 @@ class TestVolumesV2(base.BaseTest):
EXPECTED['volumes'].sort(key=lambda x: x[u'id'])
self.assertEqual(actual, EXPECTED)
# Test that limit and marker are popped when they are in the URL
response = self.app.get(
('/volume/v2/%s/volumes?limit=1&marker=%s' %
(self.auth.get_project_id(), uuid.uuid4().hex)),
headers=self.auth.get_headers())
self.assertEqual(200, response.status_code)
def test_list_volumes_aggregation_detail(self):
self.config_fixture.load_raw_values(aggregation=True)