The nova.virt.disk.mount.api Module

Support for mounting virtual image files.

class Mount(image, mount_dir, partition=None, device=None)

Bases: object

Standard mounting operations, that can be overridden by subclasses.

The basic device operations provided are get, map and mount, to be called in that order.

do_mount()

Call the get, map and mnt operations.

do_teardown()

Call the umnt, unmap, and unget operations.

do_umount()

Call the unmnt operation.

get_dev()

Make the image available as a block device in the file system.

static instance_for_device(imgfile, mountdir, partition, device)
static instance_for_format(imgfile, mountdir, partition, imgfmt)
map_dev()

Map partitions of the device to the file system namespace.

mnt_dev()

Mount the device into the file system.

mode = None
reset_dev()

Reset device paths to allow unmounting.

unget_dev()

Release the block device from the file system namespace.

unmap_dev()

Remove partitions of the device from the file system namespace.

unmnt_dev()

Unmount the device from the file system.

Previous topic

The nova.virt.disk.api Module

Next topic

The nova.virt.disk.mount.loop Module

This Page