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)¶ Add a child storage group to a parent storage group.
Parameters: - 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_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
-
check_if_rollback_action_for_masking_required
(serial_number, 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 device_id: the device id :param rollback_dict: the rollback dict :return: 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
-
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)¶ 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
Returns: storagegroup_name
Raises: VolumeBackendAPIException
-
get_or_create_masking_view_and_map_lun
(serial_number, 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 maskingview_name: the masking view name :param masking_view_dict: the masking view dict :param extra_specs: the extra specifications :return: 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
-
remove_and_reset_members
(serial_number, device_id, volume_name, extra_specs, reset=True)¶ This is called on a delete, unmap device or rollback.
Parameters: - serial_number – the array serial number
- device_id – the volume device id
- volume_name – the volume name
- extra_specs – additional info
- reset – reset, return to original SG (optional)
-
remove_volume_from_sg
(serial_number, device_id, vol_name, storagegroup_name, extra_specs)¶ 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
-
return_volume_to_default_storage_group
(serial_number, device_id, volume_name, extra_specs)¶ 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
-
setup_masking_view
(serial_number, masking_view_dict, extra_specs)¶
-