[openstack-dev] [nova] Sort order when filtering by changes-since

Matt Riedemann mriedemos at gmail.com
Fri Oct 20 02:13:34 UTC 2017

Nova has two specs approved for Queens for filtering instance actions 
and migrations by the 'changes-since' filter, which filters on the 
updated_at field.



Those APIs don't take a sort key like the servers API does. Since the 
default sort keys for instances are (created_at, id), we said we'd do 
the same for instance actions and migrations:


When you filter instances using the changes-since filter, it applies to 
the updated_at field but the default sort key is still created_at (in 
descending order):


Since we're not adding sorting ability to the instance actions and 
migrations APIs, we just said we'd use the same defaults as for listing 

During the spec review, Alex Xu was asking why we don't sort by the 
updated_at column if the changes-since filter is applied. The only 
response is that's not what we do, by default, when listing instances 
and applying the changes-since filter and we're being consistent with 
those defaults.

So my question is, does anyone have a strong opinion on if we should 
default to sort by created_at but if changes-since is specified, we sort 
by updated_at? Does it matter?

Talk among yourselves.




More information about the OpenStack-dev mailing list