Go to file
Flavio Percoco 47423ebbb2 Check if v2 is available and fallback
We have a basic implementation for a fallback mechanism that will use v1
rather than v2 when downloading schema files from glance-api fails.
However, this is not sound. If the schemas are cached already, we won't
check if v2 is available and fail to fallback.

This patch fixes the aforementioned issue by getting the list of
available versions from the server only when the API versions was not
explicitly specified through the CLI. That is, for all commands that
don't pass `--os-image-api-version 2`, we'll check v2's availability and
we'll fallback to v1 if it isn't available.

This patch also changes how we handle `/versions` calls in the client.
The server has been, incorrectly, replying to requests to `/version`
with a 300 error, which ended up in the client re-raising such
exception. While I think 300 shouldn't raise an exception, I think we
should handle that in a spearate patch. Therefore, this patch just
avoids raising such exception when `/version` is explicitly called.

This fallback behaviour and the check on `/versions` will be removed in
future versions of the client. The later depends on this bug[0] being
fixed.

[0] https://bugs.launchpad.net/glance/+bug/1491350

Closes-bug: #1489381
Change-Id: Ibeba6bc86db2a97b8a2b4bd042248464cd792e5e
2015-09-04 13:31:55 +02:00
2015-08-27 20:02:30 +00:00
2013-02-06 16:47:06 +02:00
2015-07-09 12:52:18 +00:00
2012-04-03 20:50:44 -06:00
2013-11-11 10:52:07 -08:00
2012-03-26 22:48:48 -07:00
2013-02-07 05:10:08 -06:00
2013-06-22 16:00:26 +02:00
2014-06-30 08:53:29 +02:00
2015-08-10 01:10:04 +00:00
2015-07-21 17:08:27 +03:00

Python bindings to the OpenStack Images API

This is a client library for Glance built on the OpenStack Images API. It provides a Python API (the glanceclient module) and a command-line tool (glance). This library fully supports the v1 Images API, while support for the v2 API is in progress.

Development takes place via the usual OpenStack processes as outlined in the developer guide. The master repository is in Git.

See release notes and more at http://docs.openstack.org/developer/python-glanceclient/.

Description
OpenStack Image Management (Glance) Client
Readme 18 MiB
Languages
Python 99.7%
Shell 0.3%