glance --os-image-api-version 1 ... -> fail if version 1 is not available
glance --os-image-api-version 2 ... -> fail if version 2 is not available
glance ... -> The user has expressed no preference. Query the endpoint to see if v2 is available -- if so, use it. If not, is v1 available? If so, use it.
It's important that if a user explicitly selects an api version that we fail if that version is not available.
For example an operator may have monitoring scripts such as:
Overall, I think the behaviour should be:
glance --os-image- api-version 1 ... -> fail if version 1 is not available api-version 2 ... -> fail if version 2 is not available
glance --os-image-
glance ... -> The user has expressed no preference. Query the endpoint to see if v2 is available -- if so, use it. If not, is v1 available? If so, use it.
It's important that if a user explicitly selects an api version that we fail if that version is not available.
For example an operator may have monitoring scripts such as:
script 1: api-version 1 ...
# ensure v1 is responsive
glance --os-image-
script 2: api-version 2 ...
#ensure v2 is responsive
glance --os-image-
if 'script 2' works by falling back to v1 in this case there's no way for the operator to use the client cli to verify v2 is alive.