Add sort_key param for objects list

Bug #1336530 reported by Cindy Lu on 2014-07-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Wishlist
Unassigned

Bug Description

Enhancement:

It would be very useful to be able to sort the list in 'desc' or 'asc' order based on some key (e.g 'name', 'size', 'created_at').

Glance currently supports 'sort_dir' and 'sort_key' (and Nova and Cinder have approved blueprints to do this as well).

There was an abandoned blueprint/fix for a 'reverse' param a while back:
https://blueprints.launchpad.net/swift/+spec/reverse-object-listing
https://review.openstack.org/#/c/15985/4

This feature will allow us to 'page' backward in Horizon. Since right now, we can only progress forward with a 'Next' button based on the current implementation marker+limit (https://github.com/openstack/swift/blob/master/swift/common/internal_client.py#L500)

Tim Burke (1-tim-z) on 2017-09-11
tags: added: container-listings
Tim Burke (1-tim-z) wrote :

We did finally add a 'reverse' param in https://review.openstack.org/#/c/120709/ (available in Swift 2.6.0 [Mitaka] and later). I think this should be sufficient for reverse paging, though the results may need to be reversed again to maintain the expected presentation.

Adding a 'sort_key' will be more difficult, as we don't have indexes on 'bytes' or 'last_modified'. 'content_type' might also be an interesting field to sort/filter on.

See also: bug 1521363, which looks for just 'last_modified' support.

summary: - sort_dir and sort_key param for objects list
+ Add sort_key param for objects list
Changed in swift:
status: New → Confirmed
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers