The cinder.interface.volume_snapshot_driver Module

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.


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.

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

A dict of database updates for the new volume.


Deletes a snapshot.

Parameters:snapshot – The snapshot to delete.
revert_to_snapshot(context, volume, snapshot)

Revert volume to snapshot.

Note: the revert process should not change the volume’s current size, that means if the driver shrank the volume during the process, it should extend the volume internally.

  • context – the context of the caller.
  • volume – The volume to be reverted.
  • snapshot – The snapshot used for reverting.
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.