Bases: object
Base class for providing image search and retrieval services.
ImageService exposes two concepts of metadata:
- First-class attributes: This is metadata that is common to all ImageService subclasses and is shared across all hypervisors. These attributes are defined by IMAGE_ATTRS.
- Properties: This is metdata that is specific to an ImageService, and Image, or a particular hypervisor. Any attribute not present in BASE_IMAGE_ATTRS should be considered an image property.
This means that ImageServices will return BASE_IMAGE_ATTRS as keys in the metadata dict, all other attributes will be returned as keys in the nested ‘properties’ dict.
Store the image metadata and data.
Returns: | the new image metadata. |
---|---|
Raises : | AlreadyExists if the image already exist. |
Delete the given image.
Raises : | NotFound if the image does not exist. |
---|
Detailed information about an images.
Returns: | a sequence of mappings with the following signature
{‘id’: opaque id of image,
|
---|
If the service does not implement a method that provides a detailed set of information about images, then the method should raise NotImplementedError, in which case Nova will emulate this method with repeated calls to show() for each image received from the index() method.
Get an image.
Parameters: | data – a file-like object to hold binary image data |
---|---|
Returns: | a dict containing image metadata, writes image data to data. |
Raises : | NotFound if the image does not exist |
List images.
Returns: | a sequence of mappings with the following signature {‘id’: opaque id of image, ‘name’: name of image} |
---|
Detailed information about an image.
Returns: | a mapping with the following signature:
{‘id’: opaque id of image,
|
---|---|
Raises : | NotFound if the image does not exist |
Update the given image metadata and data and return the metadata.
Raises : | NotFound if the image does not exist. |
---|