The cinder.volume.drivers.pure Module

The cinder.volume.drivers.pure Module

Volume driver for Pure Storage FlashArray storage system.

This driver requires Purity version 4.0.0 or later.

class PureBaseVolumeDriver(*args, **kwargs)

Bases: cinder.volume.drivers.san.san.SanDriver

Performs volume management on Pure Storage FlashArray.

CI_WIKI_NAME = 'Pure_Storage_CI'
SUPPORTED_REST_API_VERSIONS = ['1.2', '1.3', '1.4', '1.5']
check_for_setup_error()
create_cgsnapshot(*args, **kwargs)

Creates a cgsnapshot.

create_cloned_volume(*args, **kwargs)

Creates a clone of the specified volume.

create_consistencygroup(*args, **kwargs)

Creates a consistencygroup.

create_consistencygroup_from_src(*args, **kwargs)
create_export(context, volume, connector)
create_group(ctxt, group)

Creates a group.

Parameters:
  • ctxt – the context of the caller.
  • group – the Group object of the group to be created.
Returns:

model_update

create_group_from_src(ctxt, group, volumes, group_snapshot=None, snapshots=None, source_group=None, source_vols=None)

Creates a group from source.

Parameters:
  • ctxt – the context of the caller.
  • group – the Group object to be created.
  • volumes – a list of Volume objects in the group.
  • group_snapshot – the GroupSnapshot object as source.
  • snapshots – a list of snapshot objects in group_snapshot.
  • source_group – the Group object as source.
  • source_vols – a list of volume objects in the source_group.
Returns:

model_update, volumes_model_update

create_group_snapshot(ctxt, group_snapshot, snapshots)

Creates a group_snapshot.

Parameters:
  • ctxt – the context of the caller.
  • group_snapshot – the GroupSnapshot object to be created.
  • snapshots – a list of Snapshot objects in the group_snapshot.
Returns:

model_update, snapshots_model_update

create_snapshot(*args, **kwargs)

Creates a snapshot.

create_volume(*args, **kwargs)

Creates a volume.

create_volume_from_snapshot(*args, **kwargs)

Creates a volume from a snapshot.

delete_cgsnapshot(*args, **kwargs)

Deletes a cgsnapshot.

delete_consistencygroup(*args, **kwargs)

Deletes a consistency group.

delete_group(ctxt, group, volumes)

Deletes a group.

Parameters:
  • ctxt – the context of the caller.
  • group – the Group object of the group to be deleted.
  • volumes – a list of Volume objects in the group.
Returns:

model_update, volumes_model_update

delete_group_snapshot(ctxt, group_snapshot, snapshots)

Deletes a group_snapshot.

Parameters:
  • ctxt – the context of the caller.
  • group_snapshot – the GroupSnapshot object to be deleted.
  • snapshots – a list of snapshot objects in the group_snapshot.
Returns:

model_update, snapshots_model_update

delete_snapshot(*args, **kwargs)

Deletes a snapshot.

delete_volume(*args, **kwargs)

Disconnect all hosts and delete the volume

do_setup(context)

Performs driver initialization steps that could raise exceptions.

do_setup_replication()
ensure_export(context, volume)
extend_volume(*args, **kwargs)

Extend volume to new_size.

failover_host(*args, **kwargs)

Failover backend to a secondary array

This action will not affect the original volumes in any way and it will stay as is. If a subsequent failover is performed we will simply overwrite the original (now unmanaged) volumes.

get_manageable_snapshots(cinder_snapshots, marker, limit, offset, sort_keys, sort_dirs)

List snapshots on the backend available for management by Cinder.

get_manageable_volumes(cinder_volumes, marker, limit, offset, sort_keys, sort_dirs)

List volumes on the backend available for management by Cinder.

Rule out volumes that are attached to a Purity host or that are already in the list of cinder_volumes. We return references of the volume names for any others.

get_volume_stats(*args, **kwargs)

Return the current state of the volume service.

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

initialize_connection(volume, connector)

Connect the volume to the specified initiator in Purity.

This implementation is specific to the host type (iSCSI, FC, etc).

manage_existing(*args, **kwargs)

Brings an existing backend storage object under Cinder management.

We expect a volume name in the existing_ref that matches one in Purity.

manage_existing_get_size(*args, **kwargs)

Return size of volume to be managed by manage_existing.

We expect a volume name in the existing_ref that matches one in Purity.

manage_existing_snapshot(snapshot, existing_ref)

Brings an existing backend storage object under Cinder management.

We expect a snapshot name in the existing_ref that matches one in Purity.

manage_existing_snapshot_get_size(snapshot, existing_ref)

Return size of snapshot to be managed by manage_existing.

We expect a snapshot name in the existing_ref that matches one in Purity.

parse_replication_configs()
retype(context, volume, new_type, diff, host)

Retype from one volume type to another on the same backend.

For a Pure Array there is currently no differentiation between types of volumes other than some being part of a protection group to be replicated.

terminate_connection(*args, **kwargs)

Terminate connection.

unmanage(*args, **kwargs)

Removes the specified volume from Cinder management.

Does not delete the underlying backend storage object.

The volume will be renamed with “-unmanaged” as a suffix

unmanage_snapshot(snapshot)

Removes the specified snapshot from Cinder management.

Does not delete the underlying backend storage object.

We expect a snapshot name in the existing_ref that matches one in Purity.

update_consistencygroup(*args, **kwargs)
update_group(ctxt, group, add_volumes=None, remove_volumes=None)

Updates a group.

Parameters:
  • ctxt – the context of the caller.
  • group – the Group object of the group to be updated.
  • add_volumes – a list of Volume objects to be added.
  • remove_volumes – a list of Volume objects to be removed.
Returns:

model_update, add_volumes_update, remove_volumes_update

class PureFCDriver(*args, **kwargs)

Bases: cinder.volume.drivers.pure.PureBaseVolumeDriver, cinder.volume.driver.FibreChannelDriver

OpenStack Volume Driver to support Pure Storage FlashArray.

This version of the driver enables the use of Fibre Channel for the underlying storage connectivity with the FlashArray. It fully supports the Cinder Fibre Channel Zone Manager.

VERSION = '5.0.0'
initialize_connection(*args, **kwargs)
terminate_connection(*args, **kwargs)
class PureISCSIDriver(*args, **kwargs)

Bases: cinder.volume.drivers.pure.PureBaseVolumeDriver, cinder.volume.drivers.san.san.SanISCSIDriver

OpenStack Volume Driver to support Pure Storage FlashArray.

This version of the driver enables the use of iSCSI for the underlying storage connectivity with the FlashArray.

VERSION = '7.0.0'
initialize_connection(*args, **kwargs)

Allow connection to connector and return connection info.

pure_driver_debug_trace(f)

Log the method entrance and exit including active backend name.

This should only be used on VolumeDriver class methods. It depends on having a ‘self’ argument that is a PureBaseVolumeDriver.

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.