Implementation of an image service that uses Glance as the backend
Bases: object
Glance client wrapper class that implements retries.
Call a glance client method.
If we get a connection error, retry the request according to CONF.glance_num_retries.
Bases: object
Provides storage and retrieval of disk image objects within Glance.
Add a backend location url to an image.
Returns a dict containing image metadata on success.
Store the image data and return the new image object.
Delete the given image.
Raises: | ImageNotFound if the image does not exist. |
---|---|
Raises: | NotAuthorized if the user is not an owner. |
Calls out to Glance for a list of detailed image information.
Calls out to Glance for data and writes data.
Get backend storage location url.
Returns a tuple containing the direct url and locations representing the backend storage location, or (None, None) if these attributes are not shown by Glance.
Returns a dict with image data for the given opaque image id.
Modify the given image with the new data.
Return Iterable over shuffled api servers.
Shuffle a list of glance_api_servers and return an iterator that will cycle through the list, looping around to the beginning if necessary. If CONF.glance_api_servers is None then they will be retrieved from the catalog.
Create an image_service and parse the id from the given image_href.
The image_href param can be an href of the form ‘http://example.com:9292/v1/images/b8b2c6f7-7345-4e2f-afa2-eedaba9cbbe3‘, or just an id such as ‘b8b2c6f7-7345-4e2f-afa2-eedaba9cbbe3’. If the image_href is a standalone id, then the default image service is returned.
Parameters: | image_href – href that describes the location of an image |
---|---|
Returns: | a tuple of the form (image_service, image_id) |