Pop out 'offset' and 'limit' before use for filter
In previous code of _items() from api/v{1,2}/snapshots.py,
and also the _items)_ from api/v1/volume.py.we didn't pop
out the 'offset' and 'limit' fields from HTTP get params
before we use such params for filter.This is the root cause
for bug #1205956
For non-admin user, since 'offset' and 'limit' is not in the
allowed_search_options, so the volumes.remove_invalid_options
will help to filter them out. As a result, it walks around this
bug.
But for admin user,the volumes.remove_invalid_options will not
try to filter the search_options.So for admin user, the 'limit'
will appear in search_options, then obviously get no result.
Reviewed: https:/ /review. openstack. org/48556 github. com/openstack/ cinder/ commit/ 9e94ef8422ea137 63d3c6ce9f34a96 ccff56796d
Committed: http://
Submitter: Jenkins
Branch: stable/grizzly
commit 9e94ef8422ea137 63d3c6ce9f34a96 ccff56796d
Author: xiaoxi_chen <email address hidden>
Date: Mon Jul 29 14:21:25 2013 +0800
Pop out 'offset' and 'limit' before use for filter
In previous code of _items() from api/v{1, 2}/snapshots. py,
and also the _items)_ from api/v1/volume.py.we didn't pop
out the 'offset' and 'limit' fields from HTTP get params
before we use such params for filter.This is the root cause
for bug #1205956
For non-admin user, since 'offset' and 'limit' is not in the search_ options, so the volumes. remove_ invalid_ options
allowed_
will help to filter them out. As a result, it walks around this
bug.
But for admin user,the volumes. remove_ invalid_ options will not
try to filter the search_options.So for admin user, the 'limit'
will appear in search_options, then obviously get no result.
fixed bug #1205956
Change-Id: Ib1a66c9d104ac5 2d6eae18be7f06d 02985d4c2fd cb836c1b674e1d7 3724eeaf88)
(cherry picked from commit 08af981ffc104d7