The cinder.volume.drivers.remotefs Module

The cinder.volume.drivers.remotefs Module

class RemoteFSDriver(*args, **kwargs)

Bases: cinder.volume.driver.BaseVD

Common base for drivers that work like NFS.


Just to override parent behavior.

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_export(ctx, volume, connector)

Exports the volume.

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

create_volume(*args, **kwargs)

Creates a volume.

Parameters:volume – volume reference
Returns:provider_location update dict for database

Delete snapshot.

Do nothing for this driver, but allow manager to handle deletion of snapshot in error state.

delete_volume(*args, **kwargs)

Deletes a logical volume.

Parameters:volume – volume reference

Any initialization the volume driver does while starting.

driver_prefix = 'remotefs'
driver_volume_type = None
ensure_export(ctx, volume)

Synchronously recreates an export for a logical volume.


Get volume stats.

If ‘refresh’ is True, update the stats first.

initialize_connection(*args, **kwargs)

Allow connection to connector and return connection info.

  • volume – volume reference
  • connector – connector reference

Get volume path (mounted locally fs path) for given volume.

Parameters:volume – volume reference
remove_export(ctx, volume)

Removes an export for a logical volume.


Determine if driver is operating in Secure File Operations mode.

The Cinder Volume driver needs to query if this driver is operating in a secure file mode; check our nas_secure_file_operations flag.


Determine the setting to use for Secure NAS options.

This method must be overridden by child wishing to use secure NAS file operations. This base method will set the NAS security options to false.

terminate_connection(volume, connector, **kwargs)

Disallow connection from connector.

vendor_name = 'Open Source'
volume_backend_name = None
class RemoteFSManageableVolumesMixin

Bases: object

get_manageable_volumes(cinder_volumes, marker, limit, offset, sort_keys, sort_dirs)
manage_existing(volume, existing_ref)
manage_existing_get_size(volume, existing_ref)
class RemoteFSPoolMixin

Bases: object

Drivers inheriting this will report each share as a pool.

class RemoteFSSnapDriver(*args, **kwargs)

Bases: cinder.volume.drivers.remotefs.RemoteFSSnapDriverBase

copy_volume_to_image(inst, *args, **kwargs)
create_cloned_volume(inst, *args, **kwargs)
create_snapshot(inst, *args, **kwargs)
create_volume_from_snapshot(inst, *args, **kwargs)
delete_snapshot(inst, *args, **kwargs)
extend_volume(inst, *args, **kwargs)
revert_to_snapshot(inst, *args, **kwargs)
class RemoteFSSnapDriverBase(*args, **kwargs)

Bases: cinder.volume.drivers.remotefs.RemoteFSDriver

Base class for remotefs drivers implementing qcow2 snapshots.

Driver must implement:
_local_volume_dir(self, volume)

Returns filename of the active image from the info file.

class RemoteFSSnapDriverDistributed(*args, **kwargs)

Bases: cinder.volume.drivers.remotefs.RemoteFSSnapDriverBase

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.


Apply locking to the create snapshot operation.

create_volume_from_snapshot(volume, snapshot)

Apply locking to the delete snapshot operation.

extend_volume(volume, size_gb)
revert_to_snapshot(context, volume, snapshot)

Revert to specified snapshot.

class RevertToSnapshotMixin

Bases: object

locked_volume_id_operation(f, external=False)

Lock decorator for volume operations.

Takes a named lock prior to executing the operation. The lock is named with the id of the volume. This lock can be used by driver methods to prevent conflicts with other operations modifying the same volume.

May be applied to methods that take a ‘volume’ or ‘snapshot’ argument.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.