*** e0ne has joined #openstack-api | 07:34 | |
*** e0ne has quit IRC | 07:39 | |
*** cdent has joined #openstack-api | 09:52 | |
*** jamie_h has joined #openstack-api | 10:45 | |
*** terrylhowe has joined #openstack-api | 12:47 | |
*** openstackgerrit has quit IRC | 12:50 | |
*** openstackgerrit has joined #openstack-api | 12:50 | |
*** fifieldt has joined #openstack-api | 12:51 | |
*** kaufer has joined #openstack-api | 13:15 | |
*** sigmavirus24_awa is now known as sigmavirus24 | 14:25 | |
*** etoews has joined #openstack-api | 14:41 | |
kaufer | Anyone know if any projects implement a "previous" link for pagination? I know that a "next" link is common. | 15:18 |
---|---|---|
kaufer | I found a patch in nova for adding that support and it uses a "is_reverse" param to signify that the sorting should be reversed ... https://review.openstack.org/#/c/164169 | 15:20 |
kaufer | I'd like to have a guideline doc for this, but am curious what has already been implemented for a previous link | 15:21 |
sigmavirus24 | kaufer: you mean the Link header or something else? | 15:33 |
sigmavirus24 | Link headers tend to have first, previous, next, last | 15:33 |
kaufer | sigmavirus: I haven't seen projects implement this in headers, in nova there is a "server_links" key and then a "next" element that has the marker formatted | 15:36 |
kaufer | sigmavirus24: Here's an example from keystone: http://specs.openstack.org/openstack/keystone-specs/api/v2.0/identity-api-v2.0-paginated_collections.html | 15:36 |
sigmavirus24 | right, that's the other way that projects do it | 15:37 |
sigmavirus24 | same concept though | 15:37 |
sigmavirus24 | (Most of the APIs I'm thinking of live outside OpenStack though) | 15:37 |
stevelle | I suspect it may take experimenting to answer correct and fast. Docs may be lacking. | 15:38 |
kaufer | I'm just trying to understand how "previous" is determine today ... seems like the keystone example somehow magically knows the marker for the first element of the previous page (which seems odd to me) | 15:39 |
kaufer | I see that we have a big TODO in the pagination guideline doc: http://specs.openstack.org/openstack/api-wg/guidelines/pagination_filter_sort.html | 15:39 |
stevelle | I can't recall where in OpenStack I saw it but I know some APIs do a token to denote the first element per by page | 15:39 |
stevelle | not very helpful is that? :D | 15:40 |
kaufer | stevelle: Nope, had to guide with content like that :) | 15:41 |
kaufer | s/had/hard | 15:41 |
stevelle | I'd recommend playing with glance in devstack (make sure to specify v2 api to glance client ) to check the behavior there. | 15:41 |
stevelle | I think the docs are incomplete | 15:42 |
kaufer | stevelle: Ok, I'll start with glance and keystone ... I'll try and get enough of an understanding so that I can semi-intelligently fill-in the pagination guideline doc | 15:44 |
sigmavirus24 | kaufer: should be relatively easy to determine the previous page's marker | 15:44 |
stevelle | kaufer: I suspect cinder will behave a lot like glance but my memory could be faulty on that | 15:46 |
kaufer | sigmavirus24: How so? Unless the sort information is reversed somehow I don't see how that would be easy | 15:46 |
kaufer | stevelle: So nova and cinder only support "next" links | 15:46 |
kaufer | "next" seems pretty common across projects | 15:47 |
*** openstackgerrit has quit IRC | 16:11 | |
*** openstackgerrit has joined #openstack-api | 16:12 | |
*** kaufer has quit IRC | 16:45 | |
*** cdent has quit IRC | 16:52 | |
*** openstackgerrit has quit IRC | 16:54 | |
*** openstackgerrit has joined #openstack-api | 16:54 | |
*** kaufer has joined #openstack-api | 16:57 | |
*** sigmavirus24 is now known as sigmavirus24_awa | 17:51 | |
*** sigmavirus24_awa is now known as sigmavirus24 | 19:04 | |
*** e0ne has joined #openstack-api | 20:39 | |
*** e0ne has quit IRC | 20:49 | |
*** sigmavirus24 is now known as sigmavirus24_awa | 21:00 | |
*** jamie_h has quit IRC | 21:37 | |
*** cdent has joined #openstack-api | 21:38 | |
*** sigmavirus24_awa is now known as sigmavirus24 | 21:47 | |
*** cdent has quit IRC | 21:58 | |
*** sigmavirus24 is now known as sigmavirus24_awa | 22:43 | |
*** kaufer has quit IRC | 22:56 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!