The cinder.volume.drivers.srb Module

Volume driver for the Scality REST Block storage system

This driver provisions Linux SRB volumes leveraging RESTful storage platforms (e.g. Scality CDMI).

class LVM(vg_name, root_helper, create_vg=False, physical_volumes=None, lvm_type='default', executor=<function execute at 0x7f98707f8e60>, lvm_conf=None)

Bases: cinder.brick.local_dev.lvm.LVM

activate_vg()

Activate the Volume Group associated with this instantiation.

Raises:putils.ProcessExecutionError
deactivate_vg()

Deactivate the Volume Group associated with this instantiation.

This forces LVM to release any reference to the device.

Raises:putils.ProcessExecutionError
destroy_vg()

Destroy the Volume Group associated with this instantiation.

Raises:putils.ProcessExecutionError
extend_thin_pool()

Extend the size of the thin provisioning pool.

This method extends the size of a thin provisioning pool to 95% of the size of the VG, if the VG is configured as thin and owns a thin provisioning pool.

Raises:putils.ProcessExecutionError
pv_resize(pv_name, new_size_str)

Extend the size of an existing PV (for virtual PVs).

Raises:putils.ProcessExecutionError
class SRBDriver(*args, **kwargs)

Bases: cinder.volume.driver.VolumeDriver

Scality SRB volume driver

This driver manages volumes provisioned by the Scality REST Block driver Linux kernel module, backed by RESTful storage providers (e.g. Scality CDMI).

OVER_ALLOC_RATIO = 2
SNAPSHOT_PREFIX = 'snapshot'
VERSION = '1.1.0'
check_for_setup_error()

Returns an error if prerequisites aren’t met.

copy_image_to_volume(context, volume, image_service, image_id)

Fetch the image from image_service and write it to the volume.

copy_volume_to_image(context, volume, image_service, image_meta)

Copy the volume to the specified image.

create_cloned_volume(volume, src_vref)

Creates a clone of the specified volume.

create_snapshot(snapshot)

Creates a snapshot.

create_volume(volume)

Creates a 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 volume.

do_setup(context)

Any initialization the volume driver does while starting.

extend_volume(volume, new_size)
get_volume_stats(refresh=False)

Return the current state of the volume service.

class SRBISCSIDriver(*args, **kwargs)

Bases: cinder.volume.drivers.srb.SRBDriver, cinder.volume.driver.ISCSIDriver

Scality SRB volume driver with ISCSI support

This driver manages volumes provisioned by the Scality REST Block driver Linux kernel module, backed by RESTful storage providers (e.g. Scality CDMI), and exports them through ISCSI to Nova.

VERSION = '1.0.0'
create_export(context, volume, connector)

Creates an export for a logical volume.

ensure_export(context, volume)
remove_export(context, volume)
handle_process_execution_error(*args, **kwds)

Consistently handle putils.ProcessExecutionError exceptions

This context-manager will catch any putils.ProcessExecutionError exceptions raised in the managed block, and generate logging output accordingly.

The value of the message argument will be logged at logging.ERROR level, and the info_message argument at logging.INFO level. Finally the command string, exit code, standard output and error output of the process will be logged at logging.DEBUG level.

The reraise argument specifies what should happen when a putils.ProcessExecutionError is caught. If it’s equal to True, the exception will be re-raised. If it’s some other non-False object, this object will be raised instead (so you most likely want it to be some Exception). Any False value will result in the exception to be swallowed.

patched(*args, **kwds)

Context manager to locally patch a method.

Within the managed context, the attr method of obj will be replaced by a method which calls fun passing in the original attr attribute of obj as well as any positional and keyword arguments.

At the end of the context, the original method is restored.

class retry(exceptions, count, sleep_mechanism='increment', sleep_factor=1)

Bases: object

SLEEP_DOUBLE = 'double'
SLEEP_INCREMENT = 'increment'
SLEEP_NONE = 'none'
temp_lvm_device(*args, **kwds)
temp_raw_device(*args, **kwds)
temp_snapshot(*args, **kwds)

Previous topic

The cinder.volume.drivers.solidfire Module

Next topic

The cinder.volume.drivers.tintri Module

Project Source

This Page