The nova.virt.xenapi.volume_utils Module

Helper methods for operations related to the management of volumes, and storage repositories

exception StorageError(message=None)

Bases: exceptions.Exception

To raise errors related to SR, VDI, PBD, and VBD commands.

create_pbd(session, sr_ref, params)
create_sr(session, label, params)
find_sr_by_uuid(session, sr_uuid)

Return the storage repository given a uuid.

find_sr_from_vbd(session, vbd_ref)

Find the SR reference from the VBD reference.

forget_sr(session, sr_ref)

Forgets the storage repository without destroying the VDIs within

get_device_number(mountpoint)
introduce_sr(session, sr_uuid, label, params)
introduce_vdi(session, sr_ref, vdi_uuid=None, target_lun=None)

Introduce VDI in the host.

mountpoint_to_number(mountpoint)

Translate a mountpoint like /dev/sdc into a numeric.

parse_sr_info(connection_data, description='')
parse_volume_info(connection_data)

Parse device_path and mountpoint as they can be used by XenAPI. In particular, the mountpoint (e.g. /dev/sdc) must be translated into a numeric literal.

purge_sr(session, sr_ref)
unplug_pbds(session, sr_ref)

Previous topic

The nova.virt.xenapi.vmops Module

Next topic

The nova.virt.xenapi.volumeops Module

This Page