[openstack-dev] [python-cinderclient] Supported client-side sort keys

Steven Kaufer kaufer at us.ibm.com
Wed Dec 17 21:23:35 UTC 2014


The cinder client supports passing a sort key via the --sort_key argument.
The client restricts the sort keys that the user can supply to the
following:
https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/volumes.py#L28-L29

This list of sort keys is not complete.  As far I know, all attributes on
this class are valid:
https://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/models.py#L104

I noticed that the 'name' key is incorrect and it should instead be
'display_name'.  Before I create a bug/fix to address this, I have the
following questions:

Does anyone know the rational behind the client restricting the possible
sort keys?
Why not allow the user to supply any sort key (assuming that invalid keys
are gracefully handled)?

Note, if you try this out at home, you'll notice that the client table is
not actually sorted, fixed under:  https://review.openstack.org/#/c/141964/

Thanks,
Steven Kaufer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141217/6465dee6/attachment.html>


More information about the OpenStack-dev mailing list