This Page

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

The nova.volume.driver Module

Drivers for volumes.

class nova.volume.driver.AOEDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.driver.VolumeDriver

Implements AOE specific volume commands.

check_for_export(context, volume_id)

Make sure volume is exported.

create_export(context, volume)

Creates an export for a logical volume.

discover_volume(context, _volume)

Discover volume on a remote host.

ensure_export(context, volume)
remove_export(context, volume)

Removes an export for a logical volume.

undiscover_volume(_volume)

Undiscover volume on a remote host.

class nova.volume.driver.FakeAOEDriver(*args, **kwargs)

Bases: nova.volume.driver.AOEDriver

Logs calls instead of executing.

check_for_setup_error()

No setup necessary in fake mode.

static fake_execute(cmd, *_args, **_kwargs)

Execute that simply logs the command.

class nova.volume.driver.FakeISCSIDriver(*args, **kwargs)

Bases: nova.volume.driver.ISCSIDriver

Logs calls instead of executing.

check_for_setup_error()

No setup necessary in fake mode.

static fake_execute(cmd, *_args, **_kwargs)

Execute that simply logs the command.

class nova.volume.driver.ISCSIDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.driver.VolumeDriver

Executes commands relating to ISCSI volumes.

We make use of model provider properties as follows:

Provider_location :
 if present, contains the iSCSI target information in the same format as an ietadm discovery i.e. ‘<ip>:<port>,<portal> <target IQN>’
Provider_auth :if present, contains a space-separated triple: ‘<auth method> <auth username> <auth password>’. CHAP is the only auth_method in use at the moment.
check_for_export(context, volume_id)

Make sure volume is exported.

create_export(context, volume)

Creates an export for a logical volume.

discover_volume(context, volume)

Discover volume on a remote host.

ensure_export(context, volume)

Synchronously recreates an export for a logical volume.

remove_export(context, volume)

Removes an export for a logical volume.

undiscover_volume(volume)

Undiscover volume on a remote host.

class nova.volume.driver.LoggingVolumeDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.driver.VolumeDriver

Logs and records calls, for unit tests.

static all_logs()
check_for_export(context, volume_id)
check_for_setup_error()
static clear_logs()
create_export(context, volume)
create_volume(volume)
delete_volume(volume)
discover_volume(context, volume)
ensure_export(context, volume)
local_path(volume)
static log_action(action, parameters)

Logs the command.

static logs_like(action, **kwargs)
remove_export(context, volume)
undiscover_volume(volume)
class nova.volume.driver.RBDDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.driver.VolumeDriver

Implements RADOS block device (RBD) volume commands

check_for_setup_error()

Returns an error if prerequisites aren’t met

create_export(context, volume)

Exports the volume

create_volume(volume)

Creates a logical volume.

delete_volume(volume)

Deletes a logical volume.

discover_volume(context, volume)

Discover volume on a remote host

ensure_export(context, volume)

Synchronously recreates an export for a logical volume.

local_path(volume)

Returns the path of the rbd volume.

remove_export(context, volume)

Removes an export for a logical volume

undiscover_volume(volume)

Undiscover volume on a remote host

class nova.volume.driver.SheepdogDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.driver.VolumeDriver

Executes commands relating to Sheepdog Volumes

check_for_setup_error()

Returns an error if prerequisites aren’t met

create_export(context, volume)

Exports the volume

create_volume(volume)

Creates a sheepdog volume

delete_volume(volume)

Deletes a logical volume

discover_volume(context, volume)

Discover volume on a remote host

ensure_export(context, volume)

Safely and synchronously recreates an export for a logical volume

local_path(volume)
remove_export(context, volume)

Removes an export for a logical volume

undiscover_volume(volume)

Undiscover volume on a remote host

class nova.volume.driver.VolumeDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: object

Executes commands relating to Volumes.

check_for_export(context, volume_id)

Make sure volume is exported.

check_for_setup_error()

Returns an error if prerequisites aren’t met

create_export(context, volume)

Exports the volume. Can optionally return a Dictionary of changes to the volume object to be persisted.

create_volume(volume)

Creates a logical volume. Can optionally return a Dictionary of changes to the volume object to be persisted.

delete_volume(volume)

Deletes a logical volume.

discover_volume(context, volume)

Discover volume on a remote host.

ensure_export(context, volume)

Synchronously recreates an export for a logical volume.

local_path(volume)
remove_export(context, volume)

Removes an export for a logical volume.

undiscover_volume(volume)

Undiscover volume on a remote host.