Re: [openstack-dev] [cinder] [nova] [glance] Consistency in client side sorting
On Mon, 05 Jan 2015 11:10:41 -0500 Jay Pipes jaypi...@gmail.com wrote: Thoughts on getting consistency across all 3 projects (and possibly others)? Yeah, I personally like the second option as well, but agree that consistency is the key (pun intended) here. I would say let's make a decision on the standard to go with (possibly via the API or SDK working groups?) and then move forward with support for that option in all three clients (and continue to support the old behaviour for 2 release cycles, with deprecation markings as appropriate). +1 to making this available in a consistent way. We need need to support the old client behaviour for at least a couple of cycles (maybe a bit longer) and the burden of doing so is pretty low. I don't think however that we can drop the REST API behaviour that quickly. 2 cycles for API deprecation in the past has been considered an insufficent length of time because of app breakage Regards, Chris __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [cinder] [nova] [glance] Consistency in client side sorting
I've got no strong preferences on which we go for, but agree they should be consistent. The internal python library options should also be consistent. On 5 January 2015 at 20:52, Mike Perez thin...@gmail.com wrote: On 09:13 Mon 05 Jan , Steven Kaufer wrote: Giving that each of these 3 clients will be supporting client-side sorting in kilo, it seems that we should get this implemented in a consistent manner. It seems that the 2 options are either: --sort-key key1 --sort-dir desc --sort-key key2 --sort-dir asc --sort key1:asc,key2:desc Personally, I favor option 2 but IMO it is more important that these are made consistent. I like option 2 better. -- Mike Perez ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev -- Duncan Thomas ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [cinder] [nova] [glance] Consistency in client side sorting
On 01/05/2015 10:13 AM, Steven Kaufer wrote: The nova, cinder, and glance REST APIs support listing instances, volumes, and images in a specific order. In general, the REST API supports something like: ?sort_key=key1sort_dir=ascsort_key=key2sort_dir=desc This sorts the results using 'key1' as the primary key (in ascending order), 'key2' as the secondary key (in descending order), etc. Note that this behavior is not consistent across the projects. Nova supports multiple sort keys and multiple sort directions, glance supports multiple sort keys but a single direction, and cinder only supports a single sort key and a single sort direction (approved kilo BP to support multiple sort keys and directions is here: https://blueprints.launchpad.net/cinder/+spec/cinder-pagination). The purpose of this thread is to discuss how the sort information should be inputted to the client. In nova, (committed in kilo https://review.openstack.org/#/c/117591/) the syntax is: --sort key1:asc,key2:desc In cinder, the syntax is: --sort_key key1 --sort_dir desc In glance, the proposed syntax (from https://review.openstack.org/#/c/120777/) is: --sort-key key1 --sort-key key2 --sort-dir desc Note that the keys are different for cinder and glance (--sort_key vs. --sort-key). Also, client side sorting does not actually work in cinder (fix under review at https://review.openstack.org/#/c/141964/). Giving that each of these 3 clients will be supporting client-side sorting in kilo, it seems that we should get this implemented in a consistent manner. It seems that the 2 options are either: --sort-key key1 --sort-dir desc --sort-key key2 --sort-dir asc --sort key1:asc,key2:desc Personally, I favor option 2 but IMO it is more important that these are made consistent. Thoughts on getting consistency across all 3 projects (and possibly others)? Yeah, I personally like the second option as well, but agree that consistency is the key (pun intended) here. I would say let's make a decision on the standard to go with (possibly via the API or SDK working groups?) and then move forward with support for that option in all three clients (and continue to support the old behaviour for 2 release cycles, with deprecation markings as appropriate). Best, -jay ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [cinder] [nova] [glance] Consistency in client side sorting
On 09:13 Mon 05 Jan , Steven Kaufer wrote: Giving that each of these 3 clients will be supporting client-side sorting in kilo, it seems that we should get this implemented in a consistent manner. It seems that the 2 options are either: --sort-key key1 --sort-dir desc --sort-key key2 --sort-dir asc --sort key1:asc,key2:desc Personally, I favor option 2 but IMO it is more important that these are made consistent. I like option 2 better. -- Mike Perez ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] [cinder] [nova] [glance] Consistency in client side sorting
The nova, cinder, and glance REST APIs support listing instances, volumes, and images in a specific order. In general, the REST API supports something like: ?sort_key=key1sort_dir=ascsort_key=key2sort_dir=desc This sorts the results using 'key1' as the primary key (in ascending order), 'key2' as the secondary key (in descending order), etc. Note that this behavior is not consistent across the projects. Nova supports multiple sort keys and multiple sort directions, glance supports multiple sort keys but a single direction, and cinder only supports a single sort key and a single sort direction (approved kilo BP to support multiple sort keys and directions is here: https://blueprints.launchpad.net/cinder/+spec/cinder-pagination). The purpose of this thread is to discuss how the sort information should be inputted to the client. In nova, (committed in kilo https://review.openstack.org/#/c/117591/) the syntax is: --sort key1:asc,key2:desc In cinder, the syntax is: --sort_key key1 --sort_dir desc In glance, the proposed syntax (from https://review.openstack.org/#/c/120777/) is: --sort-key key1 --sort-key key2 --sort-dir desc Note that the keys are different for cinder and glance (--sort_key vs. --sort-key). Also, client side sorting does not actually work in cinder (fix under review at https://review.openstack.org/#/c/141964/). Giving that each of these 3 clients will be supporting client-side sorting in kilo, it seems that we should get this implemented in a consistent manner. It seems that the 2 options are either: --sort-key key1 --sort-dir desc --sort-key key2 --sort-dir asc --sort key1:asc,key2:desc Personally, I favor option 2 but IMO it is more important that these are made consistent. Thoughts on getting consistency across all 3 projects (and possibly others)? Thanks, Steven Kaufer___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev