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
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to