cinder.volume.drivers.storpool Module¶StorPool block device driver
StorPoolDriver(*args, **kwargs)¶Bases: cinder.volume.driver.VolumeDriver
The StorPool block device driver.
Version history:
0.1.0 - Initial driver
0.2.0 - Bring the driver up to date with Kilo and Liberty:
- implement volume retyping and migrations
- use the driver.*VD ABC metaclasses
- bugfix: fall back to the configured StorPool template
1.0.0 - Imported into OpenStack Liberty with minor fixes
1.1.0 - Bring the driver up to date with Liberty and Mitaka:
- drop the CloneableVD and RetypeVD base classes
- enable faster volume copying by specifying
sparse_volume_copy=true in the stats report
1.1.1 - Fix the internal _storpool_client_id() method to
not break on an unknown host name or UUID; thus,
remove the StorPoolConfigurationMissing exception.
1.1.2 - Bring the driver up to date with Pike: do not
translate the error messages
1.2.0 - Inherit from VolumeDriver, implement get_pool()
1.2.1 - Implement interface.volumedriver, add CI_WIKI_NAME,
fix the docstring formatting
1.2.2 - Reintroduce the driver into OpenStack Queens,
add ignore_errors to the internal _detach_volume() method
CI_WIKI_NAME = 'StorPool_CI'¶VERSION = '1.2.1'¶backup_volume(context, backup, backup_service)¶check_for_setup_error()¶copy_image_to_volume(context, volume, image_service, image_id)¶Fetch image from image_service and write to unencrypted volume.
This does not attach an encryptor layer when connecting 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.
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.
create_export(context, volume, connector)¶Exports the volume.
Can optionally return a Dictionary of changes to the volume object to be persisted.
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.
If volume_type extra specs includes ‘capabilities:replication <is> True’ the driver needs to create a volume replica (secondary), and setup replication between the newly created volume and the secondary volume. Returned dictionary should include:
volume['replication_status'] = 'copying'
volume['replication_extended_status'] = <driver specific value>
volume['driver_data'] = <driver specific value>
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.
delete_snapshot(snapshot)¶Deletes a snapshot.
delete_volume(volume)¶Deletes a volume.
If volume_type extra specs includes ‘replication: <is> True’ then the driver needs to delete the volume replica too.
ensure_export(context, volume)¶Synchronously recreates an export for a volume.
extend_volume(volume, new_size)¶get_pool(volume)¶Return pool name where volume reside on.
| Parameters: | volume – The volume hosted by the driver. |
|---|---|
| Returns: | name of the pool where given volume is in. |
get_volume_stats(refresh=False)¶Return the current state of the volume service.
If ‘refresh’ is True, run the update first.
For replication the following state should be reported: replication = True (None or false disables replication)
initialize_connection(volume, connector)¶Allow connection to connector and return connection info.
| Parameters: |
|
|---|---|
| Returns conn_info: | |
A dictionary of connection information. |
|
remove_export(context, volume)¶Removes an export for a volume.
retype(context, volume, new_type, diff, host)¶terminate_connection(volume, connector, **kwargs)¶Disallow connection from connector
| Parameters: |
|
|---|
update_migrated_volume(context, volume, new_volume, original_volume_status)¶Return model update for migrated volume.
Each driver implementing this method needs to be responsible for the values of _name_id and provider_location. If None is returned or either key is not set, it means the volume table does not need to change the value(s) for the key(s). The return format is {“_name_id”: value, “provider_location”: value}.
| Parameters: |
|
|---|---|
| Returns: | model_update to update DB with any needed changes |
validate_connector(connector)¶Fail if connector doesn’t contain all the data needed by driver.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.