When querying against a Juno glance-registry, we found that having the
--sort option defaulting to 'name:asc" results in querying the registry
with additional SQL parameters like the following:
WHERE image_properties_2.name = :name_1 AND image_properties_2.value =
:value_1
as a result of handling the newer 'sort' filter. This results in a
blank list being returned as the output of glance image-list.
This patch sets the --sort-key and --sort-dir instead of --sort when
neither --sort-key nor --sort-dir are specified, so as to maintain
backwards compatibility with Juno glance-registry.
Reviewed: https:/ /review. openstack. org/221234 /git.openstack. org/cgit/ openstack/ python- glanceclient/ commit/ ?id=c8c8964ddd5 a49de6eb4794fba 68ab4ec0400b08
Committed: https:/
Submitter: Jenkins
Branch: master
commit c8c8964ddd5a49d e6eb4794fba68ab 4ec0400b08
Author: Jake Yip <email address hidden>
Date: Tue Sep 8 20:04:11 2015 +1000
Updates default --sort behaviour
When querying against a Juno glance-registry, we found that having the
--sort option defaulting to 'name:asc" results in querying the registry
with additional SQL parameters like the following:
WHERE image_propertie s_2.name = :name_1 AND image_propertie s_2.value =
:value_1
as a result of handling the newer 'sort' filter. This results in a
blank list being returned as the output of glance image-list.
This patch sets the --sort-key and --sort-dir instead of --sort when
neither --sort-key nor --sort-dir are specified, so as to maintain
backwards compatibility with Juno glance-registry.
Change-Id: I8bd64cca7f1b7a bdbabf4c09e3dbb cb4044e51b4
Closes-bug: #1492887