cinder.volume.drivers.dell_emc.vmax.common
Module¶VMAXCommon
(prtcl, version, configuration=None, active_backend_id=None)¶Bases: object
Common class for Rest based VMAX volume drivers.
This common class is for Dell EMC VMAX volume drivers based on UniSphere Rest API. It supports VMAX 3 and VMAX All Flash arrays.
add_volume_to_replication_group
(array, device_id, volume_name, extra_specs)¶Add a volume to the default replication group.
Replication groups are VMAX storage groups that contain only RDF-paired volumes. We can use our normal storage group operations. :param array: array serial number :param device_id: the device id :param volume_name: the volume name :param extra_specs: the extra specifications :returns: storagegroup_name
cleanup_lun_replication
(volume, volume_name, device_id, extra_specs)¶Cleanup target volume on delete.
Extra logic if target is last in group, or is a metro volume. :param volume: the volume object :param volume_name: the volume name :param device_id: the device id :param extra_specs: extra specifications :raises: VolumeBackendAPIException
create_cloned_volume
(clone_volume, source_volume)¶Creates a clone of the specified volume.
Parameters: |
|
---|---|
Returns: | model_update, dict |
create_group
(context, group)¶Creates a generic volume group.
Parameters: |
|
---|---|
Returns: | dict – modelUpdate |
Raises: | VolumeBackendAPIException, NotImplementedError, InvalidInput |
create_group_from_src
(context, group, volumes, group_snapshot, snapshots, source_group, source_vols)¶Creates the volume group from source.
Parameters: |
|
---|---|
Returns: | model_update, volumes_model_update model_update is a dictionary of cg status volumes_model_update is a list of dictionaries of volume update |
Raises: | VolumeBackendAPIException, NotImplementedError |
create_group_snapshot
(context, group_snapshot, snapshots)¶Creates a generic volume group snapshot.
Parameters: |
|
---|---|
Returns: | dict – modelUpdate |
Returns: | list – list of snapshots |
Raises: | VolumeBackendAPIException, NotImplementedError |
create_snapshot
(snapshot, volume)¶Creates a snapshot.
Parameters: |
|
---|---|
Returns: | dict – the cloned volume dictionary |
create_volume
(volume)¶Creates a EMC(VMAX) volume from a storage group.
Parameters: | volume – volume object |
---|---|
Returns: | model_update - dict |
create_volume_from_snapshot
(volume, snapshot)¶Creates a volume from a snapshot.
Parameters: |
|
---|---|
Returns: | model_update |
Raises: | VolumeBackendAPIException: |
delete_group
(context, group, volumes)¶Deletes a generic volume group.
Parameters: |
|
---|---|
Returns: | dict – modelUpdate |
Returns: | list – list of volume model updates |
Raises: | NotImplementedError |
delete_group_snapshot
(context, group_snapshot, snapshots)¶Delete a volume group snapshot.
Parameters: |
|
---|---|
Returns: | model_update, snapshots_model_update |
delete_snapshot
(snapshot, volume)¶Deletes a snapshot.
Parameters: |
|
---|
delete_volume
(volume)¶Deletes a EMC(VMAX) volume.
Parameters: | volume – volume object |
---|
disable_replication
(context, group, volumes)¶Disable replication for a group.
Parameters: |
|
---|---|
Returns: | model_update, None |
enable_rdf
(array, volume, device_id, rdf_group_no, rep_config, target_name, remote_array, target_device, extra_specs)¶Create a replication relationship with a target volume.
Parameters: |
|
---|---|
Returns: | rdf_dict |
enable_replication
(context, group, volumes)¶Enable replication for a group.
Replication is enabled on replication-enabled groups by default. :param context: the context :param group: the group object :param volumes: the list of volumes :returns: model_update, None
extend_volume
(volume, new_size)¶Extends an existing volume.
Parameters: |
|
---|---|
Returns: | dict – modifiedVolumeDict - the extended volume Object |
Raises: | VolumeBackendAPIException: |
extend_volume_is_replicated
(array, volume, device_id, volume_name, new_size, extra_specs)¶Extend a replication-enabled volume.
Cannot extend volumes in a synchronization pair where the source and/or target arrays are running HyperMax versions < 5978. Must first break the relationship, extend them separately, then recreate the pair. Extending Metro protected volumes is not supported. :param array: the array serial number :param volume: the volume objcet :param device_id: the volume device id :param volume_name: the volume name :param new_size: the new size the volume should be :param extra_specs: extra specifications
failover_host
(volumes, secondary_id=None, groups=None)¶Fails over the volumes on a host back and forth.
Driver needs to update following info for failed-over volume: 1. provider_location: update array details 2. replication_status: new status for replication-enabled volume :param volumes: the list of volumes to be failed over :param secondary_id: the target backend :param groups: replication groups :returns: secondary_id, volume_update_list, group_update_list :raises: VolumeBackendAPIException
failover_replication
(context, group, volumes, secondary_backend_id=None, host=False)¶Failover replication for a group.
Parameters: |
|
---|---|
Returns: | model_update, vol_model_updates |
find_host_lun_id
(volume, host, extra_specs, rep_extra_specs=None)¶Given the volume dict find the host lun id for a volume.
Parameters: |
|
---|---|
Returns: | dict – the data dict |
get_attributes_from_cinder_config
()¶get_common_masking_views
(array, portgroup_name, initiator_group_name)¶Get common masking views, if any.
Parameters: |
|
---|---|
Returns: | list of masking views |
get_initiator_group_from_masking_view
(array, maskingview_name)¶Get the initiator group in a masking view.
Parameters: |
|
---|---|
Returns: | initiator group name |
get_masking_views_from_volume
(array, volume, device_id, host)¶Get all masking views from a volume.
Parameters: |
|
---|---|
Returns: | masking view list, is metro |
get_port_group_from_masking_view
(array, maskingview_name)¶Get the port groups in a masking view.
Parameters: |
|
---|---|
Returns: | port group name |
get_rdf_details
(array)¶Retrieves an SRDF group instance.
Parameters: | array – the array serial number |
---|---|
Returns: | rdf_group_no, remote_array |
get_remote_target_device
(array, volume, device_id)¶Get the remote target for a given volume.
Parameters: |
|
---|---|
Returns: | target_device, target_array, rdf_group, state |
get_secondary_stats_info
(rep_config, array_info)¶On failover, report on secondary array statistics.
Parameters: |
|
---|---|
Returns: | secondary_info - dict |
get_target_wwns_from_masking_view
(volume, connector)¶Find target WWNs via the masking view.
Parameters: |
|
---|---|
Returns: | list – the target WWN list |
initialize_connection
(volume, connector)¶Initializes the connection and returns device and connection info.
The volume may be already mapped, if this is so the deviceInfo tuple is returned. If the volume is not already mapped then we need to gather information to either 1. Create an new masking view or 2. Add the volume to an existing storage group within an already existing maskingview.
The naming convention is the following:
initiator_group_name = OS-<shortHostName>-<shortProtocol>-IG
e.g OS-myShortHost-I-IG
storage_group_name = OS-<shortHostName>-<srpName>-<shortProtocol>-SG
e.g OS-myShortHost-SRP_1-I-SG
port_group_name = OS-<target>-PG The port_group_name will come from
the EMC configuration xml file.
These are precreated. If the portGroup does not
exist then an error will be returned to the user
maskingview_name = OS-<shortHostName>-<srpName>-<shortProtocol>-MV
e.g OS-myShortHost-SRP_1-I-MV
Parameters: |
|
---|---|
Returns: | dict – device_info_dict - device information dict |
manage_existing
(volume, external_ref)¶Manages an existing VMAX Volume (import to Cinder).
Renames the existing volume to match the expected name for the volume. Also need to consider things like QoS, Emulation, account/tenant. :param volume: the volume object including the volume_type_id :param external_ref: reference to the existing volume :returns: dict – model_update
manage_existing_get_size
(volume, external_ref)¶Return size of an existing VMAX volume to manage_existing.
Parameters: |
|
---|---|
Returns: | size of the volume in GB |
manage_existing_snapshot
(snapshot, existing_ref)¶Manage an existing VMAX Snapshot (import to Cinder).
Renames the Snapshot to prefix it with OS- to indicate it is managed by Cinder
Parameters: |
|
---|---|
Raises: | VolumeBackendAPIException |
Returns: | model update |
manage_existing_snapshot_get_size
(snapshot)¶Return the size of the source volume for manage-existing-snapshot.
Parameters: | snapshot – the snapshot object |
---|---|
Returns: | size of the source volume in GB |
pool_info
= {'arrays_info': {}, 'backend_name': None, 'config_file': None, 'max_over_subscription_ratio': None, 'replication_enabled': False, 'reserved_percentage': 0}¶recover_volumes_on_failback
(volume, extra_specs)¶Recover volumes on failback.
On failback, attempt to recover non RE(replication enabled) volumes from primary array. :param volume: the volume object :param extra_specs: the extra specifications :returns: volume_update
retype
(volume, new_type, host)¶Migrate volume to another host using retype.
Parameters: |
|
---|---|
Returns: | boolean – True if retype succeeded, False if error |
revert_to_snapshot
(volume, snapshot)¶Revert volume to snapshot.
Parameters: |
|
---|
setup_volume_replication
(array, volume, device_id, extra_specs, target_device_id=None)¶Setup replication for volume, if enabled.
Called on create volume, create cloned volume, create volume from snapshot, manage_existing, and re-establishing a replication relationship after extending. :param array: the array serial number :param volume: the volume object :param device_id: the device id :param extra_specs: the extra specifications :param target_device_id: the target device id :returns: replication_status – str, replication_driver_data – dict
terminate_connection
(volume, connector)¶Disallow connection from connector.
Parameters: |
|
---|
unmanage
(volume)¶Export VMAX volume from Cinder.
Leave the volume intact on the backend array.
Parameters: | volume – the volume object |
---|
unmanage_snapshot
(snapshot)¶Export VMAX Snapshot from Cinder.
Leaves the snapshot intact on the backend VMAX
Parameters: | snapshot – the snapshot object |
---|---|
Raises: | VolumeBackendAPIException |
update_group
(group, add_volumes, remove_volumes)¶Updates LUNs in generic volume group.
Parameters: |
|
---|---|
Returns: | model_update |
Raises: | VolumeBackendAPIException, NotImplementedError |
update_volume_stats
()¶Retrieve stats info.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.