The cinder.volume.drivers.emc.emc_vmax_common Module

class EMCVMAXCommon(prtcl, configuration=None)

Bases: object

Common class for SMI-S based EMC volume drivers.

This common class is for EMC volume drivers based on SMI-S. It supports VNX and VMAX arrays.

add_to_default_SG(conn, volumeInstance, storageSystemName, targetFastPolicyName, volumeName)

For FAST, add volume to default storage group

Parameters:
  • conn – connection info to ECOM
  • volumeInstance – the volume instance
  • storageSystemName – the storage system name
  • targetFastPolicyName – the target FAST policy name
  • volumeName – the volume Name
Returns:

boolean True/False

Returns:

int, the return code from migrate operation

create_cloned_volume(cloneVolume, sourceVolume)

Creates a clone of the specified volume.

:param CloneVolume - clone volume Object :param sourceVolume - volume object :returns: cloneVolumeDict - the cloned volume dictionary

create_snapshot(snapshot, volume)

Creates a snapshot.

For VMAX, replace snapshot with clone

Parameters:
  • snapshot – snapshot object
  • volume – volume Object to create snapshot from
Returns:

cloneVolumeDict,the cloned volume dictionary

create_volume(volume)

Creates a EMC(VMAX) volume from a pre-existing storage pool.

For a concatenated compositeType: If the volume size is over 240GB then a composite is created EMCNumberOfMembers > 1, otherwise it defaults to a non composite

For a striped compositeType: The user must supply an extra spec to determine how many metas will make up the striped volume.If the meta size is greater than 240GB an error is returned to the user. Otherwise the EMCNumberOfMembers is what the user specifies.

Parameters:volume – volume Object
Returns:volumeInstance, the volume instance
Raises :VolumeBackendAPIException
create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot.

For VMAX, replace snapshot with clone.

:param volume - volume Object :param snapshot - snapshot object :returns: cloneVolumeDict - the cloned volume dictionary

delete_snapshot(snapshot, volume)

Deletes a snapshot.

Parameters:
  • snapshot – snapshot object
  • volume – volume Object to create snapshot from
delete_volume(volume)

Deletes a EMC(VMAX) volume

Parameters:volume – volume Object
extend_volume(volume, newSize)

Extends an existing volume.

Prequisites: 1. The volume must be composite e.g StorageVolume.EMCIsComposite=True 2. The volume can only be concatenated

e.g StorageExtent.IsConcatenated=True
Params volume:the volume Object
Params newSize:the new size to increase the volume to
Raises :VolumeBackendAPIException
find_device_number(volume, connector)

Given the volume dict find a device number.

Find a device number that a host can see for a volume

Parameters:
  • volume – the volume dict
  • connector – the connector dict
Returns:

data, the data dict

get_masking_view_by_volume(volume)

Given volume, retrieve the masking view instance name

Parameters:
  • volume – the volume
  • mvInstanceName – masking view instance name

:returns maskingviewInstanceName

get_masking_views_by_port_group(portGroupInstanceName)

Given port group, retrieve the masking view instance name

:param : the volume :param mvInstanceName: masking view instance name :returns: maksingViewInstanceNames

get_num_volumes_mapped(volume, connector)

Returns how many volumes are in the same zone as the connector.

Find out how many volumes are mapped to a host associated to the LunMaskingSCSIProtocolController

Parameters:
  • volume – volume object to be deleted
  • connector – volume object to be deleted
Returns:

int numVolumesMapped

get_port_group_from_masking_view(maskingViewInstanceName)

Find port group that is part of a masking view.

Parameters:maskingViewInstanceName – the owning masking view
Returns:port group instance name
get_target_wwns(storageSystem, connector)

Find target WWNs.

Parameters:
  • storageSystem – the storage system name
  • connector – the connector dict
Returns:

targetWwns, the target WWN list

get_target_wwns_from_masking_view(storageSystem, volume, connector)

Find target WWNs via the masking view.

Parameters:
  • storageSystem – the storage system name
  • volume – volume to be attached
  • connector – the connector dict
Returns:

targetWwns, 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 to an existing storage group within an already existing maskingview.

The naming convention is the following: initiatorGroupName = OS-<shortHostName>-<shortProtocol>-IG

e.g OS-myShortHost-I-IG
storageGroupName = OS-<shortHostName>-<poolName>-<shortProtocol>-SG
e.g OS-myShortHost-SATA_BRONZ1-I-SG
portGroupName = OS-<target>-PG The portGroupName will come from
the EMC configuration xml file. These are precreated. If the portGroup does not exist then a error will be returned to the user
maskingView = OS-<shortHostName>-<poolName>-<shortProtocol>-MV
e.g OS-myShortHost-SATA_BRONZ1-I-MV
Parameters:
  • volume – volume Object
  • connector – the connector Object
Returns:

deviceInfoDict, device information tuple

Raises :

VolumeBackendAPIException

migrate_volume(ctxt, volume, host, new_type=None)

Migrate volume to another host

Parameters:
  • ctxt – context
  • volume – the volume object including the volume_type_id
  • host – the host dict holding the relevant target(destination) information
  • new_type – None
Returns:

boolean True/False

Returns:

list

remove_from_default_SG(conn, volumeInstance, storageSystemName, sourceFastPolicyName, volumeName)

For FAST, remove volume from default storage group

Parameters:
  • conn – connection info to ECOM
  • volumeInstance – the volume instance
  • storageSystemName – the storage system name
  • sourceFastPolicyName – the source FAST policy name
  • volumeName – the volume Name
Returns:

boolean True/False

Returns:

int, the return code from migrate operation

retype(ctxt, volume, new_type, diff, host)

Migrate volume to another host using retype.

Parameters:
  • ctxt – context
  • volume – the volume object including the volume_type_id
  • new_type – the new volume type.
  • host – The host dict holding the relevant target(destination) information
Returns:

boolean True/False

Returns:

list

stats = {'volume_backend_name': None, 'free_capacity_gb': 0, 'driver_version': '1.0', 'total_capacity_gb': 0, 'reserved_percentage': 0, 'vendor_name': 'EMC', 'storage_protocol': None}
terminate_connection(volume, connector)

Disallow connection from connector.

Params volume:the volume Object

:params connectorL the connector Object

update_volume_stats()

Retrieve stats info.

Previous topic

The cinder.volume.drivers.emc.emc_cli_iscsi Module

Next topic

The cinder.volume.drivers.emc.emc_vmax_fast Module

This Page