The nova.virt.libvirt.storage.rbd_utils Module

class RADOSClient(driver, pool=None)

Bases: object

Context manager to simplify error handling for connecting to ceph.

features
class RBDDriver(pool, ceph_conf, rbd_user)

Bases: object

ceph_args()

List of command line parameters to be passed to ceph commands to reflect RBDDriver configuration such as RBD user name and location of ceph.conf.

cleanup_volumes(instance)
clone(image_location, dest_name)
create_snap(volume, name)

Create a snapshot on an RBD object.

Volume:Name of RBD object
Name:Name of snapshot
exists(name, pool=None, snapshot=None)
get_mon_addrs()
get_pool_info()
import_image(base, name)

Import RBD volume from image file.

Uses the command line import instead of librbd since rbd import command detects zeroes to preserve sparseness in the image.

Base:Path to image file
Name:Name of RBD volume
is_cloneable(image_location, image_meta)
parse_url(url)
remove_image(name)

Remove RBD volume

Name:Name of RBD volume
remove_snap(volume, name, ignore_errors=False)

Remove a snapshot from an RBD volume.

Volume:Name of RBD object
Name:Name of snapshot
Ignore_errors:whether or not to log warnings on failures
resize(name, size)

Resize RBD volume.

Name:Name of RBD object
Size:New size in bytes
rollback_to_snap(volume, name)

Revert an RBD volume to its contents at a snapshot.

Volume:Name of RBD object
Name:Name of snapshot
size(name)
class RBDVolumeProxy(driver, name, pool=None, snapshot=None, read_only=False)

Bases: object

Context manager for dealing with an existing rbd volume.

This handles connecting to rados and opening an ioctx automatically, and otherwise acts like a librbd Image object.

The underlying librados client and ioctx can be accessed as the attributes ‘client’ and ‘ioctx’.

Previous topic

The nova.virt.libvirt.storage.lvm Module

Next topic

The nova.virt.libvirt.utils Module

Project Source

This Page