The cinder.volume.drivers.dell_emc.vmax.masking Module

The cinder.volume.drivers.dell_emc.vmax.masking Module

class VMAXMasking(prtcl, rest)

Bases: object

Masking class for Dell EMC VMAX.

Masking code to dynamically create a masking view. It supports VMAX arrays.

add_child_sg_to_parent_sg(serial_number, child_sg_name, parent_sg_name, extra_specs, default_version=True)

Add a child storage group to a parent storage group.

Parameters:
  • default_version – the default uv4 version
  • serial_number – the array serial number
  • child_sg_name – the name of the child storage group
  • parent_sg_name – the name of the aprent storage group
  • extra_specs – the extra specifications
add_volume_to_default_storage_group(serial_number, device_id, volume_name, extra_specs, src_sg=None, volume=None)

Return volume to its default storage group.

Parameters:
  • serial_number – the array serial number
  • device_id – the volume device id
  • volume_name – the volume name
  • extra_specs – the extra specifications
  • src_sg – the source storage group, if any
  • volume – the volume object
add_volume_to_storage_group(serial_number, device_id, storagegroup_name, volume_name, extra_specs)

Add a volume to a storage group.

Parameters:
  • serial_number – array serial number
  • device_id – volume device id
  • storagegroup_name – storage group name
  • volume_name – volume name
  • extra_specs – extra specifications
add_volumes_to_storage_group(serial_number, list_device_id, storagegroup_name, extra_specs)

Add a volume to a storage group.

Parameters:
  • serial_number – array serial number
  • list_device_id – list of volume device id
  • storagegroup_name – storage group name
  • extra_specs – extra specifications
attempt_ig_cleanup(connector, protocol, serial_number, force)

Attempt to cleanup an orphan initiator group

Parameters:
  • connector – connector object
  • protocol – iscsi or fc
  • serial_number – extra the array serial number
check_if_rollback_action_for_masking_required(serial_number, volume, device_id, rollback_dict)

Rollback action for volumes with an associated service level.

We need to be able to return the volume to the default storage group if anything has gone wrong. The volume can also potentially belong to a storage group that is not the default depending on where the exception occurred. We also may need to clean up any unused initiator groups. :param serial_number: the array serial number :param volume: the volume object :param device_id: the device id :param rollback_dict: the rollback dict :returns: error message – string, or None :raises: VolumeBackendAPIException

create_masking_view(serial_number, maskingview_name, storagegroup_name, port_group_name, init_group_name, extra_specs)

Create a new masking view.

Parameters:
  • serial_number – the array serial number
  • maskingview_name – the masking view name
  • storagegroup_name – the storage group name
  • port_group_name – the port group
  • init_group_name – the initiator group
  • extra_specs – extra specifications
Returns:

error_message – string or None

failed_live_migration(device_info_dict, source_storage_group_list, extra_specs)

This is run in the event of a failed live migration operation.

Parameters:
  • device_info_dict – the data dict
  • source_storage_group_list – list of storage groups associated with the device
  • extra_specs – extra specifications
find_initiator_names(connector)

Check the connector object for initiators(ISCSI) or wwpns(FC).

Parameters:connector – the connector object
Returns:list – list of found initiator names
Raises:VolumeBackendAPIException
get_or_create_default_storage_group(serial_number, srp, slo, workload, extra_specs, do_disable_compression=False, is_re=False, rep_mode=None)

Get or create a default storage group.

Parameters:
  • serial_number – the array serial number
  • srp – the SRP name
  • slo – the SLO
  • workload – the workload
  • extra_specs – extra specifications
  • do_disable_compression – flag for compression
  • is_re – is replication enabled
  • rep_mode – flag to indicate replication mode
Returns:

storagegroup_name

Raises:

VolumeBackendAPIException

get_or_create_masking_view_and_map_lun(serial_number, volume, maskingview_name, masking_view_dict, extra_specs)

Get or Create a masking view and add a volume to the storage group.

Given a masking view dict either get or create a masking view and add the volume to the associated storage group. :param serial_number: the array serial number :param volume: the volume object :param maskingview_name: the masking view name :param masking_view_dict: the masking view dict :param extra_specs: the extra specifications :returns: rollback_dict :raises: VolumeBackendAPIException

get_parent_sg_from_child(serial_number, storagegroup_name)

Given a storage group name, get its parent storage group, if any.

Parameters:
  • serial_number – the array serial number
  • storagegroup_name – the name of the storage group
Returns:

the parent storage group name, or None

move_volume_between_storage_groups(serial_number, device_id, source_storagegroup_name, target_storagegroup_name, extra_specs)

Move a volume between storage groups.

Parameters:
  • serial_number – the array serial number
  • device_id – the device id
  • source_storagegroup_name – the source sg
  • target_storagegroup_name – the target sg
  • extra_specs – the extra specifications
post_live_migration(device_info_dict, extra_specs)

Run after every live migration operation.

Parameters:
  • device_info_dict – : the data dict
  • extra_specs – extra specifications
pre_live_migration(source_nf_sg, source_sg, source_parent_sg, is_source_nf_sg, device_info_dict, extra_specs)

Run before any live migration operation.

Parameters:
  • source_nf_sg – The non fast storage group
  • source_sg – The source storage group
  • source_parent_sg – The parent storage group
  • is_source_nf_sg – if the non fast storage group already exists
  • device_info_dict – the data dict
  • extra_specs – extra specifications
remove_and_reset_members(serial_number, volume, device_id, volume_name, extra_specs, reset=True, connector=None, async_grp=None)

This is called on a delete, unmap device or rollback.

Parameters:
  • serial_number – the array serial number
  • volume – the volume object
  • device_id – the volume device id
  • volume_name – the volume name
  • extra_specs – additional info
  • reset – reset, return to original SG (optional)
  • connector – the connector object (optional)
  • async_grp – the async rep group (optional)
remove_vol_from_storage_group(serial_number, device_id, storagegroup_name, volume_name, extra_specs)

Remove a volume from a storage group.

Parameters:
  • serial_number – the array serial number
  • device_id – the volume device id
  • storagegroup_name – the name of the storage group
  • volume_name – the volume name
  • extra_specs – the extra specifications
Raises:

VolumeBackendAPIException

remove_volume_from_sg(serial_number, device_id, vol_name, storagegroup_name, extra_specs, connector=None, move=False)

Remove a volume from a storage group.

Parameters:
  • serial_number – the array serial number
  • device_id – the volume device id
  • vol_name – the volume name
  • storagegroup_name – the storage group name
  • extra_specs – the extra specifications
  • connector – the connector object
  • move – flag to indicate if move should be used instead of remove
remove_volumes_from_storage_group(serial_number, list_of_device_ids, storagegroup_name, extra_specs)

Remove multiple volumes from a storage group.

Parameters:
  • serial_number – the array serial number
  • list_of_device_ids – list of device ids
  • storagegroup_name – the name of the storage group
  • extra_specs – the extra specifications
Raises:

VolumeBackendAPIException

setup_masking_view(serial_number, volume, masking_view_dict, extra_specs)
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.