Main abstraction layer for retrieving and storing information about disk images used by the compute layer.
Bases: object
Responsible for exposing a relatively stable internal API for other modules in Nova to retrieve information about disk images. This API attempts to match the nova.volume.api and nova.network.api calling interface.
Creates a new image record, optionally passing the image bits to backend storage.
Parameters: |
|
---|
Delete the information about an image and mark the image bits for deletion.
Parameters: |
|
---|
Transfer image bits from Glance or a known source location to the supplied destination filepath.
Parameters: |
|
---|
Note that because of the poor design of the glance.ImageService.download method, the function returns different things depending on what arguments are passed to it. If a data argument is supplied but no dest_path is specified (only done in the XenAPI virt driver’s image.utils module) then None is returned from the method. If the data argument is not specified but a destination path is specified, then a writeable file handle to the destination path is constructed in the method and the image bits written to that file, and again, None is returned from the method. If no data argument is supplied and no dest_path argument is supplied (VMWare and XenAPI virt drivers), then the method returns an iterator to the image bits that the caller uses to write to wherever location it wants. Finally, if the allow_direct_url_schemes CONF option is set to something, then the nova.image.download modules are used to attempt to do an SCP copy of the image bits from a file location to the dest_path and None is returned after retrying one or more download locations (libvirt and Hyper-V virt drivers through nova.virt.images.fetch).
I think the above points to just how hacky/wacky all of this code is, and the reason it needs to be cleaned up and standardized across the virt driver callers.
Retrieves the information record for a single disk image. If the supplied identifier parameter is a UUID, the default driver will be used to return information about the image. If the supplied identifier is a URI, then the driver that matches that URI endpoint will be used to query for image information.
Parameters: |
|
---|
Retrieves all information records about all disk images available to show to the requesting user. If the requesting user is an admin, all images in an ACTIVE status are returned. If the requesting user is not an admin, the all public images and all private images that are owned by the requesting user in the ACTIVE status are returned.
Parameters: |
|
---|
Update the information about an image, optionally along with a file handle or bytestream iterator for image bits. If the optional file handle for updated image bits is supplied, the image may not have already uploaded bits for the image.
Parameters: |
|
---|