The caller should be able to invoke the "next" link (without
having to re-format it) in order to get the next page of data.
The documentation states "Subsequent links will honor the
initial page size. Thus, a client may follow links to traverse
a paginated collection without having to input the marker parameter."
The problem is that the "next" link is always scoped to the non-
detailed query.
For example, if you execute "/v2/<tenant>/volumes/detail?limit=1",
the "next" link does not have the URL for a detailed query and is
formatted as "/v2/<tenant>/volumes?limit=1&marker=<marker>". In this
case the "next" link needs to be scoped to "/v2/<tenant>/volumes/detail".
The user could work around this issue my manually inserting '/details'
into the "next" link URL.
Test code is included to verify that the '/details' URL is correctly added
when the "next" link is included in a detailed pagination query. Also,
existing tests were changed to ensure that the correct controller function
(ie, 'index' vs. 'detail) are invoked for the appropriate query
(ie, non-detailed or detailed) -- 'index' was previously alwayed invoked
for detailed URL requests.
Reviewed: https:/ /review. openstack. org/84237 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=2981cdbb03c 6f1239a58fedb26 0796667b8154ab
Committed: https:/
Submitter: Jenkins
Branch: master
commit 2981cdbb03c6f12 39a58fedb260796 667b8154ab
Author: Steven Kaufer <email address hidden>
Date: Mon Mar 31 20:32:39 2014 +0000
GET details REST API next link missing 'details'
When executing a pagination query a "next" link is included in the
API reply when there are more items then the specified limit.
See pagination documentation for more information: docs.openstack. org/api/ openstack- compute/ 2/content/ Collections- d1e664. html
http://
Paginated_
The caller should be able to invoke the "next" link (without
having to re-format it) in order to get the next page of data.
The documentation states "Subsequent links will honor the
initial page size. Thus, a client may follow links to traverse
a paginated collection without having to input the marker parameter."
The problem is that the "next" link is always scoped to the non-
detailed query.
For example, if you execute "/v2/<tenant> /volumes/ detail? limit=1" , /volumes? limit=1& marker= <marker> ". In this /volumes/ detail" .
the "next" link does not have the URL for a detailed query and is
formatted as "/v2/<tenant>
case the "next" link needs to be scoped to "/v2/<tenant>
The user could work around this issue my manually inserting '/details'
into the "next" link URL.
Test code is included to verify that the '/details' URL is correctly added
when the "next" link is included in a detailed pagination query. Also,
existing tests were changed to ensure that the correct controller function
(ie, 'index' vs. 'detail) are invoked for the appropriate query
(ie, non-detailed or detailed) -- 'index' was previously alwayed invoked
for detailed URL requests.
Change-Id: Ib00d6deb25255f ac1db0f7bf4ecd3 c8d30e1c39d
Closes-bug: 1299247