The cinder.volume.drivers.remotefs Module

class RemoteFSDriver(*args, **kwargs)

Bases: cinder.volume.driver.LocalVD, cinder.volume.driver.TransferVD, cinder.volume.driver.BaseVD

Common base for drivers that work like NFS.

SHARE_FORMAT_REGEX = '.+:/.+'
check_for_setup_error()

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(volume)

Creates a volume.

Parameters:volume – volume reference
Returns:provider_location update dict for database
delete_snapshot(snapshot)

Delete snapshot.

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

delete_volume(volume)

Deletes a logical volume.

Parameters:volume – volume reference
do_setup(context)

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(refresh=False)

Get volume stats.

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

initialize_connection(volume, connector)

Allow connection to connector and return connection info.

Parameters:
  • volume – volume reference
  • connector – connector reference
local_path(volume)

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.

secure_file_operations_enabled()

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.

set_nas_security_options(is_new_cinder_install)

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.

volume_backend_name = None
class RemoteFSSnapDriver(*args, **kwargs)

Bases: cinder.volume.drivers.remotefs.RemoteFSDriver, cinder.volume.driver.SnapshotVD

Base class for remotefs drivers implementing qcow2 snapshots.

Driver must implement:
_local_volume_dir(self, volume)
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)
do_setup(context)
get_active_image_from_info(volume)

Returns filename of the active image from the info file.

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.

Previous topic

The cinder.volume.drivers.rbd Module

Next topic

The cinder.volume.drivers.san.hp.hpmsa_client Module

Project Source

This Page