Previous topic

The nova.virt.xenapi.volumeops Module

Next topic

The nova.vnc.xvp_proxy 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.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

class VolumeHelper

Bases: nova.virt.xenapi.HelperBase

The class that wraps the helper methods together.

classmethod create_iscsi_storage(session, info, label, description)

Create an iSCSI storage repository that will be used to mount the volume for the specified instance

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

Return the storage repository given a uuid.

classmethod find_sr_from_vbd(session, vbd_ref)

Find the SR reference from the VBD reference

classmethod forget_sr(session, sr_uuid)

Forgets the storage repository without destroying the VDIs within

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

Introduce VDI in the host

classmethod mountpoint_to_number(mountpoint)

Translate a mountpoint like /dev/sdc into a numeric

classmethod parse_volume_info(connection_info, mountpoint)

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. FIXME(armando): As for device_path, currently cannot be used as it is, because it does not contain target information. As for interim solution, target details are passed either via Flags or obtained by iscsiadm. Long-term solution is to add a few more fields to the db in the iscsi_target table with the necessary info and modify the iscsi driver to set them.

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