[openstack-dev] [api] [sdk] Proposal to achieve consistency in client side sorting
kaufer at us.ibm.com
Tue Jan 6 16:03:09 UTC 2015
This is a follow up thread to 
In order to have consistency across clients, I am proposing that the client
side sorting has the following syntax: --sort <key>[:<direction>]
Where the --sort parameter is comma-separated and is used to specify one or
more sort keys and directions. The direction defaults to 'desc' for each
sort key and the user can supply 'asc' to override.
nova list --sort display_name
nova list --sort display_name,vm_state
nova list --sort display_name:asc,vm_state:asc
If approved, then the following changes are needed for glance and cinder
(note that nova already uses this syntax):
Cinder: Deprecate --sort_key and --sort_dir and add support for --sort
Glance: Modify  to this new syntax
I have not verified how all other projects handle sorting, there may be
other projects that would also need to be changed.
Also, if there is a more formal way to propose/review this standard please
let me know.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev