The cinder.interface.volume_snapshot_driver Module

Snapshot capable volume driver interface.

class VolumeSnapshotDriver

Bases: cinder.interface.base.CinderInterface

Interface for drivers that support snapshots.

TODO(smcginnis) Merge into VolumeDriverBase once NFS driver supports snapshots.

create_snapshot(snapshot)

Creates a snapshot.

Parameters:snapshot – Information for the snapshot to be created.
create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot.

If volume_type extra specs includes ‘replication: <is> True’ the driver needs to create a volume replica (secondary), and setup replication between the newly created volume and the secondary volume.

An optional larger size for the new snapshot can be specified. Drivers should check this value and create or expand the new volume to match.

Parameters:
  • volume – The volume to be created.
  • snapshot – The snapshot from which to create the volume.
Returns:

A dict of database updates for the new volume.

delete_snapshot(snapshot)

Deletes a snapshot.

Parameters:snapshot – The snapshot to delete.

Previous topic

The cinder.interface.volume_management_driver Module

Next topic

The cinder.interface.volume_snapshotmanagement_driver Module

This Page