Previous topic

The nova.virt.libvirt.firewall Module

Next topic

The nova.virt.libvirt.imagecache Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.virt.libvirt.imagebackend Module

class Backend(use_cow)

Bases: object

image(instance, name, suffix=None, image_type=None)

Constructs image for selected backend

Instance :Instance name.
Name :Image name.
Suffix :Suffix for image name (optional).
Image_type :Image type.

Optional, is FLAGS.libvirt_images_type by default.

class Image(instance, name, suffix)

Bases: object

cache(fn, fname, size=None, *args, **kwargs)

Creates image from template.

Ensures that template and image not already exists. Ensures that base directory exists. Synchronizes on template fetching.

Fn :function, that creates template.

Should accept target argument. :fname: Template name :size: Size of created image in bytes (optional)

create_image(prepare_template, base, size, *args, **kwargs)

Create image from template.

Contains specific behavior for each image type.

Prepare_template :
 function, that creates template.

Should accept target argument. :base: Template name :size: Size of created image in bytes

libvirt_info(device_type)

Get LibvirtConfigGuestDisk filled for this image.

Device_type :Device type for this image.
class Lvm(instance, name, suffix)

Bases: nova.virt.libvirt.imagebackend.Image

create_image(prepare_template, base, size, *args, **kwargs)
static escape(fname)
libvirt_info(device_type)
remove_volume_on_error(*args, **kwds)
class Qcow2(instance, name, suffix)

Bases: nova.virt.libvirt.imagebackend.Raw

create_image(prepare_template, base, size, *args, **kwargs)
libvirt_info(device_type)
class Raw(instance, name, suffix)

Bases: nova.virt.libvirt.imagebackend.Image

create_image(prepare_template, base, size, *args, **kwargs)
libvirt_info(device_type)