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.
For FAST, add volume to default storage group.
Parameters: |
|
---|
Add a volume to the default replication group.
SE_ReplicationGroups are actually VMAX storage groups under the covers, so we can use our normal storage group operations. :param conn: the connection to the ecom served :param controllerConfigService: the controller config service :param volumeInstance: the volume instance :param volumeName: the name of the volume :param extraSpecs: extra specifications :return: storageGroupInstanceName
Check if an initiator group instance is on the array.
Parameters: | initiatorGroupInstanceName – initiator group instance name |
---|---|
Returns: | initiator group name, or None if deleted |
Cleanup target volume on delete.
Extra logic if target is last in group. :param conn: the connection to the ecom server :param volume: the volume object :param volumeName: the volume name :param sourceInstance: the source volume instance :param extraSpecs: extra specification
Creates a cgsnapshot.
Parameters: |
|
---|---|
Returns: | dict – modelUpdate |
Returns: | list – list of snapshots |
Raises: | VolumeBackendAPIException |
Creates a clone of the specified volume.
Parameters: |
|
---|---|
Returns: | model_update, dict |
Creates a consistency group.
Parameters: |
|
---|---|
Returns: | dict – modelUpdate = {‘status’: ‘available’} |
Raises: | VolumeBackendAPIException |
Creates the consistency 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 |
Create a replication relationship with a target volume.
Parameters: |
|
---|---|
Returns: | rc, rdfDict - the target volume dictionary |
Creates a snapshot.
For VMAX, replace snapshot with clone.
Parameters: |
|
---|---|
Returns: | dict – the cloned volume dictionary |
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: | model_update, dict |
Creates a volume from a snapshot.
For VMAX, replace snapshot with clone.
Parameters: |
|
---|---|
Returns: | model_update, dict |
Raises: | VolumeBackendAPIException |
Delete a cgsnapshot.
Parameters: |
|
---|---|
Returns: | dict – modelUpdate |
Returns: | list – list of snapshots |
Raises: | VolumeBackendAPIException |
Deletes a consistency group.
Parameters: |
|
---|---|
Returns: | dict – modelUpdate |
Returns: | list – list of volume objects |
Raises: | VolumeBackendAPIException |
Deletes a snapshot.
Parameters: |
|
---|
Deletes a EMC(VMAX) volume.
Parameters: | volume – volume Object |
---|
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 |
Returns: | dict – modifiedVolumeDict - the extended volume Object |
Raises: | VolumeBackendAPIException |
Extend a replication-enabled volume.
Cannot extend volumes in a synchronization pair. Must first break the relationship, extend them separately, then recreate the pair :param volume: the volume objcet :param volumeInstance: the volume instance :param volumeName: the volume name :param newSize: the new size the volume should be :param extraSpecs: extra specifications :return: rc, volumeDict
Fails over the volume 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 context: the context :param volumes: the list of volumes to be failed over :param secondary_id: the target backend :return: secondary_id, volume_update_list
Given the volume dict find a device number.
Find a device number that a host can see for a volume.
Parameters: |
|
---|---|
Returns: | dict – the data dict |
Get the initiator group in a masking view.
Parameters: | maskingViewInstanceName – masking view instance name |
---|---|
Returns: | initiatorGroupInstanceName |
Get ip and iqn from the endpoint.
Parameters: |
|
---|---|
Returns: | endpoint |
Given volume, retrieve the masking view instance name.
Parameters: |
|
---|---|
Returns: | maskingviewInstanceName |
Given initiator group, retrieve the masking view instance name.
Parameters: | initiatorGroupInstanceName – initiator group instance name |
---|---|
Returns: | list – maskingViewInstanceNames |
Given port group, retrieve the masking view instance name.
Parameters: | portGroupInstanceName – port group instance name |
---|---|
Returns: | list – maskingViewInstanceNames |
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: |
|
---|---|
Returns: | int – numVolumesMapped |
Raises: | VolumeBackendAPIException |
Get the port groups in a masking view.
Parameters: | maskingViewInstanceName – masking view instance name |
---|---|
Returns: | portGroupInstanceName |
Retrieves an SRDF group instance.
Parameters: |
|
---|---|
Returns: |
On failover, report on secondary array statistics.
Parameters: |
|
---|---|
Returns: | secondaryInfo - dict |
Create a replication target for a given source volume.
Parameters: |
|
---|---|
Returns: | the target instance |
Find target WWNs.
Parameters: |
|
---|---|
Returns: | list – targetWwns, the target WWN list |
Raises: | VolumeBackendAPIException |
Find target WWNs via the masking view.
Parameters: |
|
---|---|
Returns: | list – the target WWN list |
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:
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 an error will be returned to the user
maskingView = OS-<shortHostName>-<poolName>-<shortProtocol>-MV
e.g OS-myShortHost-SATA_BRONZ1-I-MV
Parameters: |
|
---|---|
Returns: | dict – deviceInfoDict - device information dict |
Raises: | VolumeBackendAPIException |
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.
Parameters: |
|
---|---|
Returns: | dict – model_update |
Raises: | VolumeBackendAPIException |
Return size of an existing VMAX volume to manage_existing.
Parameters: |
|
---|---|
Returns: | size of the volume in GB |
Migrate volume to another host.
Parameters: |
|
---|---|
Returns: | boolean – Always returns True |
Returns: | dict – Empty dict {} |
Recover volumes on failback.
On failback, attempt to recover non RE(replication enabled) volumes from primary array.
Parameters: | volume – |
---|---|
Returns: | volume_update |
For FAST, remove volume from default storage group.
Parameters: |
|
---|---|
Raises: | VolumeBackendAPIException |
Migrate volume to another host using retype.
Parameters: |
|
---|---|
Returns: | boolean – True if retype succeeded, False if error |
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.
Parameters: |
|
---|---|
Returns: | rep_update - dict |
Disallow connection from connector.
Params volume: | the volume Object |
---|---|
Params connector: | |
the connector Object |
Export VMAX volume from Cinder.
Leave the volume intact on the backend array.
Parameters: | volume – the volume object |
---|---|
Raises: | VolumeBackendAPIException |
Updates LUNs in consistency group.
Parameters: |
|
---|
Retrieve stats info.