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.volume.driver Module

Drivers for volumes.

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

Bases: nova.volume.driver.VolumeDriver

WARNING! Deprecated. This driver will be removed in Essex. Its use is not recommended.

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.

discover_volume(context, volume)

Discover volume on a remote host.

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

Execute that simply logs the command.

undiscover_volume(volume)

Undiscover volume on a remote host.

class nova.volume.driver.ISCSIDriver(*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.

set_execute(execute)
undiscover_volume(volume)

Undiscover volume on a remote host.

class nova.volume.driver.LoggingVolumeDriver(execute=<function execute at 0x55cd0144>, *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 0x55cd0144>, *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_snapshot(snapshot)

Creates an rbd snapshot

create_volume(volume)

Creates a logical volume.

delete_snapshot(snapshot)

Deletes an rbd snapshot

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 0x55cd0144>, *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_snapshot(snapshot)

Creates a sheepdog snapshot

create_volume(volume)

Creates a sheepdog volume

create_volume_from_snapshot(volume, snapshot)

Creates a sheepdog volume from a snapshot.

delete_snapshot(snapshot)

Deletes a sheepdog snapshot

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 0x55cd0144>, *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_snapshot(snapshot)

Creates a snapshot.

create_volume(volume)

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

create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot.

delete_snapshot(snapshot)

Deletes a snapshot.

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.

get_volume_stats(refresh=False)

Return the current state of the volume service. If ‘refresh’ is True, run the update first.

local_path(volume)
remove_export(context, volume)

Removes an export for a logical volume.

set_execute(execute)
undiscover_volume(volume)

Undiscover volume on a remote host.

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

Bases: nova.volume.driver.ISCSIDriver

Performs actions to configure Zadara BE module.

check_for_setup_error()

No setup necessary for Zadara BE.

create_export(context, volume)

create BE export for a volume

create_snapshot(snapshot)

Nothing required for snapshot

create_volume(volume)

Creates BE volume.

delete_snapshot(snapshot)

Nothing required to delete a snapshot

delete_volume(volume)

Deletes BE volume.

ensure_export(context, volume)

ensure BE export for a volume

get_volume_stats(refresh=False)

Return the current state of the volume service. If ‘refresh’ is True, run the update first.

local_path(volume)
remove_export(context, volume)

Removes BE export for a volume.