]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
restful: Add pagination support
authorBoris Ranto <branto@redhat.com>
Fri, 19 May 2017 13:58:40 +0000 (15:58 +0200)
committerBoris Ranto <branto@redhat.com>
Mon, 22 May 2017 17:21:28 +0000 (19:21 +0200)
commit884dfc2d043eaaa2c50a7e4391d3d6563b4d1b23
treec56179382881e07ae1b0da4860b966ae882ce432
parentf45a282be0df1e786a76573e6e3f6fead3469956
restful: Add pagination support

This commit adds a pagination support via paginate decorator. The
decorator will paginate the output if it is told to. The first page is
0, the last page is -1. The decorator was applied to /request endpoint
so you can get requests in hunderds if you supply the endpoint with
?page=N. If no ?page=N is supplied, the decorator will output the full
list.

Signed-off-by: Boris Ranto <branto@redhat.com>
src/pybind/mgr/restful/api/request.py
src/pybind/mgr/restful/decorators.py