[openstack-dev] [api] [sdk] Proposal to achieve consistency in client side sorting
Anne Gentle
anne at openstack.org
Tue Jan 6 18:19:13 UTC 2015
On Tue, Jan 6, 2015 at 10:03 AM, Steven Kaufer <kaufer at us.ibm.com> wrote:
> This is a follow up thread to [1]
>
> 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.
>
> For example:
>
> 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 [2] 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.
>
> Thoughts? Objections?
>
> Also, if there is a more formal way to propose/review this standard please
> let me know.
>
I'm all for consistency. Sounds like a great case for the API Working Group
to document. You can propose a patch describing the way we want sorting to
work.
See https://review.openstack.org/#/q/project:openstack/api-wg,n,z
Anne
>
>
> [1]
> http://www.mail-archive.com/openstack-dev@lists.openstack.org/msg42854.html
> [2] https://review.openstack.org/#/c/120777/
>
> Thanks,
> Steven Kaufer
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150106/c98b81f7/attachment.html>
More information about the OpenStack-dev
mailing list