So far, if we request to list 500 out of 1500 volumes via the parameter 'limit', for example, we will get a reference link 'next' returned in the response to contain the link to request the next page. The size of the next page remains the same to the previous one, till we reach the last page. I guess what we need to do is to extend the support to other list operation for snapshot, backup, etc.
The method _get_collection_links in cinder/api/common.py is used to provide the 'next' link, and 'volumes = self._view_builder.detail_list(req, limited_list)' and 'volumes = self._view_builder.summary_list(req, limited_list)' in the method _get_volumes in cinder/api/v2/volumes.py, will make sure the 'next' link is returned if available.
So far, if we request to list 500 out of 1500 volumes via the parameter 'limit', for example, we will get a reference link 'next' returned in the response to contain the link to request the next page. The size of the next page remains the same to the previous one, till we reach the last page. I guess what we need to do is to extend the support to other list operation for snapshot, backup, etc.
The pagination spec can be found here: http:// docs.openstack. org/api/ openstack- compute/ 2/content/ Paginated_ Collections- d1e664. html
The method _get_collection _links in cinder/ api/common. py is used to provide the 'next' link, and 'volumes = self._view_ builder. detail_ list(req, limited_list)' and 'volumes = self._view_ builder. summary_ list(req, limited_list)' in the method _get_volumes in cinder/ api/v2/ volumes. py, will make sure the 'next' link is returned if available.
Please check: /github. com/openstack/ cinder/ blob/master/ cinder/ api/common. py#L251 /github. com/openstack/ cinder/ blob/master/ cinder/ api/v2/ volumes. py#L247 /github. com/openstack/ cinder/ blob/master/ cinder/ api/v2/ volumes. py#L249
https:/
https:/
https:/
Duncan, Gerry, Mike... do you think it makes sense?