Bases: object
Utility class for SMI-S based EMC volume drivers.
This Utility class is for EMC volume drivers based on SMI-S. It supports VMAX arrays.
Check if the volume is composite.
Parameters: |
|
---|---|
Returns: | string – ‘True’, ‘False’ or ‘Undetermined’ |
Checks if a volume is extendable or not.
Check underlying CIM_StorageExtent to see if the volume is concatenated or not. If isConcatenated is true then it is a concatenated and extendable. If isConcatenated is False and isVolumeComposite is True then it is striped and not extendable. If isConcatenated is False and isVolumeComposite is False then it has one member only but is still extendable.
Parameters: |
|
---|---|
Returns: | string – ‘True’, ‘False’ or ‘Undetermined’ |
Check if a given Initiator Group Instance Name has been deleted.
Parameters: |
|
---|---|
Returns: | foundinitiatorGroupInstanceName or None if deleted |
Check the space consumed of a volume.
Parameters: |
|
---|---|
Returns: | string – ‘True’, ‘False’ or ‘Undetermined’ |
Compare the bit sizes to an approximate.
Parameters: |
|
---|---|
Returns: | int – size1GBs - size2GBs |
Convert bytes(string) to GB(string).
Parameters: | strBitSize – string – The size in bytes |
---|---|
Returns: | int – The size in GB |
Convert GB(string) to bytes(string).
Parameters: | strGB – string – The size in GB |
---|---|
Returns: | string – The size in bytes |
Create storage hardware ID instance name based on the WWPN/IQN.
Parameters: |
|
---|---|
Returns: | hardwareIdList |
Determines how many members a volume should contain.
Based on the size of the proposed volume, the compositeType and the memberCount, determine (or validate) how many meta members there should be in a volume.
Parameters: |
|
---|---|
Returns: | string – memberCount |
Returns: | string – errorDesc - the error description |
Given pool string determine the correct record.
The poolName and the serialNumber will determine the correct record to return in VMAX2. The poolName, SLO and the serialNumber will determine the correct record to return in VMAX3.
Parameters: |
|
---|---|
Returns: | single record |
Get the controller config by using the storage service name.
Given the storage system name, get the controller configuration service.
Parameters: |
|
---|---|
Returns: | foundconfigService |
Raises: | VolumeBackendAPIException |
Given the storage system name, get the element composition service.
Parameters: |
|
---|---|
Returns: | foundElementCompositionService |
Raises: | VolumeBackendAPIException |
Find the SE_GroupSynchronized_RG_RG instance name by target group.
Parameters: |
|
---|---|
Returns: | foundSyncInstanceName |
Given the storage system name, get the replication service.
Parameters: |
|
---|---|
Returns: | foundRepService |
Raises: | VolumeBackendAPIException |
Find the replication service capabilities instance name.
Parameters: |
|
---|---|
Returns: | foundRepServCapability |
Find an array instance name by the array name.
Parameters: |
|
---|---|
Returns: | foundPoolInstanceName, the CIM Instance Name of the Pool |
Raises: | VolumeBackendAPIException |
Get storage configuration service with given storage system name.
Parameters: |
|
---|---|
Returns: | foundConfigService |
Raises: | VolumeBackendAPIException |
Given the storage system name, get the storage hardware service.
Parameters: |
|
---|---|
Returns: | foundStorageRelocationService |
Raises: | VolumeBackendAPIException |
Given the storage group name get the storage group.
Parameters: |
|
---|---|
Returns: | foundStorageMaskingGroupInstanceName |
Given the storage system name, get the storage relocation service.
Parameters: |
|
---|---|
Returns: | foundStorageRelocationService |
Raises: | VolumeBackendAPIException |
Finds the storage system for a particular config service.
Given the storage configuration service get the CIM_StorageSystem from it.
Parameters: |
|
---|---|
Returns: | int – rc - the return code of the job |
Returns: | dict – jobDict - the job dict |
Given any service get the storage system name from it.
Parameters: | configService – the configuration service |
---|---|
Returns: | string – configService[‘SystemName’] - storage system name |
Find the storage synchronized name by target device ID.
Parameters: |
|
---|---|
Returns: | foundSyncInstanceName |
Find the volume by device ID on a specific array.
Parameters: |
|
---|---|
Returns: | foundVolumeInstanceName |
Given the volumeDict get the instance from it.
Parameters: |
|
---|---|
Returns: | foundVolumeInstance - the found volume instance |
Create a unique fast policy name under 14 chars
Parameters: | fastPolicyName – long fast policy name |
---|---|
Returns: | truncated fast policy name |
Create a unique short host name under 40 chars
Parameters: | sgName – long storage group name |
---|---|
Returns: | truncated storage group name |
Create a unique pool name under 16 chars
Parameters: | poolName – long pool name |
---|---|
Returns: | truncated pool name |
Extract the array from the host capabilites.
Parameters: | host – the host object |
---|---|
Returns: | storageSystem - storage system represents the array |
Helper function for manage volume to get array name and device ID.
Parameters: |
|
---|---|
Returns: | string value of the array name and device ID |
Give the volume instance get the associated pool instance
Parameters: |
|
---|---|
Returns: | foundPoolInstanceName |
Get associated replication from source volume.
Given the source volume device ID, find associated replication storage synchronized instance names.
Parameters: |
|
---|---|
Returns: | foundSyncName (String) |
Get the meta members of a composite volume.
Parameters: |
|
---|---|
Returns memberVolumes: | |
a list of meta members |
Get the int value of composite type.
The default is ‘2’ concatenated.
Parameters: | compositeTypeStr – ‘concatenated’ or ‘striped’. Cannot be None |
---|---|
Returns: | int – compositeType = 2 for concatenated, or 3 for striped |
Check that the instance name still exists and return the instance.
Parameters: |
|
---|---|
Returns: | instance or None |
Gets the extra specs associated with a volume type.
Given the string value of the volume type name, get the extra specs object associated with the volume type.
Parameters: | volumeTypeName – string value of the volume type name |
---|---|
Returns: | extra_specs - extra specs object |
Get the firmware version of array.
Parameters: |
|
---|---|
Returns: | string – firmwareVersion |
Get all the hardware ids from an array.
Parameters: | conn – connection to the ecom server |
---|---|
Param: | hardwareIdManagementService - hardware id management service |
Returns: | hardwareIdInstances - the list of hardware id instances |
Returns the short name for a given qualified host name.
Checks the host name to see if it is the fully qualified host name and returns part before the dot. If there is no dot in the hostName the full hostName is returned.
Parameters: | hostName – the fully qualified host name () |
---|---|
Returns: | string – the short hostName |
Get the instance from the classname and bindings.
Parameters: |
|
---|---|
Returns: | pywbem.CIMInstanceName – instanceName |
Get the ip protocol endpoints associated with an tcp endpoint
Parameters: |
|
---|---|
Returns: | ipendpoints |
Get the IPv4Address from the ip endpoint instance name
Parameters: |
|
---|---|
Returns: | foundIpAddress |
Get the iscsi protocol endpoints of a port group.
Parameters: |
|
---|---|
Returns: | iscsiendpoints |
Get the capacity in byte of all meta device member volumes.
Parameters: |
|
---|---|
Returns: | array contains capacities of each member device in bits |
Get the member volumes of a composite volume.
Parameters: |
|
---|---|
Returns: | an array containing instance names of member volumes |
Get the ecom int from the number.
Parameters: |
|
---|---|
Returns: | result |
Get pool instance and system name string for V2.
Parameters: |
|
---|---|
Returns: | foundPoolInstanceName |
Returns: | string – systemNameStr |
Get pool instance and system name string for V2.
Parameters: |
|
---|---|
Returns: | foundPoolInstanceName |
Returns: | string – systemNameStr |
Returns the instance name associated with a storage pool name.
Parameters: |
|
---|---|
Returns: | foundPoolInstanceName - instance name of storage pool |
Get the total and remaining capacity in GB for a storage pool.
Given the storage pool name, get the total capacity and remaining capacity in GB.
Parameters: |
|
---|---|
Returns: | tuple – (total_capacity_gb, free_capacity_gb) |
Get the pool name from the instance
Parameters: |
|
---|---|
Returns: | poolnameStr |
Get the front end protocol endpoints of a hardware instance
Parameters: |
|
---|---|
Returns: | protocolControllerInstanceName |
Raises: | VolumeBackendAPIException |
Get the replication setting data
Parameters: |
|
---|---|
Returns: | instance rsdInstance |
Given the protocol type, return I for iscsi and F for fc.
Parameters: | protocol – iscsi or fc |
---|---|
Returns: | string – ‘I’ for iscsi or ‘F’ for fc |
Get the SMI_S version.
Parameters: | conn – the connection to the ecom server |
---|---|
Returns: | string – version |
Check the space consumed of a volume.
Parameters: |
|
---|---|
Returns: | spaceConsumed |
Get the totalManagedSpace, remainingManagedSpace.
Parameters: |
|
---|---|
Returns: | totalCapacityGb |
Returns: | remainingCapacityGb |
Returns the storage group for a particular volume.
Given the volume instance name get the associated storage group if it is belong to one.
Parameters: |
|
---|---|
Returns: | foundStorageGroupInstanceName |
Returns all the storage group for a particular volume.
Given the volume instance name get all the associated storage groups.
Parameters: |
|
---|---|
Returns: | foundStorageGroupInstanceName |
Given the hardwareId get the target endpoints.
Parameters: |
|
---|---|
Returns: | targetEndpoints |
Raises: | VolumeBackendAPIException |
Get the tcp protocol endpoints associated with an iscsi endpoint
Parameters: |
|
---|---|
Returns: | tcpendpoints |
Gets the tier policy service for a given storage system instance.
Given the storage system instance name, get the existing tier policy service.
Parameters: |
|
---|---|
Returns: | foundTierPolicyService - the tier policy service instance name |
Raises: | VolumeBackendAPIException |
Get the delta between start and end time.
Parameters: |
|
---|---|
Returns: | string – delta in string H:MM:SS |
Get the V3 default instance name
Parameters: |
|
---|---|
Returns: | the storage group instance name |
Determine default v3 storage group from extraSpecs.
Parameters: |
|
---|---|
Returns: | storageGroupName |
Get volume element name follows naming convention, i.e. ‘OS-UUID’.
Parameters: | volumeId – volume id containing uuid |
---|---|
Returns: | volume element name in format of OS-UUID |
Get the head of a meta volume.
Parameters: |
|
---|---|
Returns: | the instance name of the meta volume head |
Update the volume model’s status and return it.
Parameters: |
|
---|---|
Returns: | volume_model_updates - updated volumes |
Get the volume size which is ConsumableBlocks * BlockSize.
Parameters: |
|
---|---|
Returns: | string – volumeSizeOut |
Get the volume type name.
Parameters: | volume – the volume dictionary |
---|---|
Returns: | string – volumeTypeName - the volume type name |
Check the space consumed of a volume.
Parameters: |
|
---|---|
Returns: | the volumes in the pool |
Compare the bit sizes to an approximate.
Parameters: |
|
---|---|
Returns: | dict – extraSpecs - the extra specs |
Check if the array is V2 or V3.
Parameters: |
|
---|---|
Returns: | boolean |
Check if the clone feature is licensed and enabled.
Parameters: |
|
---|
instance name :returns: True if licensed and enabled; False otherwise.
Check that volumeSize is in range.
Parameters: |
|
---|---|
Returns: | boolean |
Check if volume is bound to a pool.
Parameters: |
|
---|---|
Returns: | string – ‘True’ ‘False’ or ‘Undetermined’ |
Parses a file and gets array map.
Given a file, parse it to get array and any pool(s) or fast policy(s), SLOs, Workloads that might exist.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | list |
Given the instance Id parse the pool name and system name from it.
Example of pool InstanceId: Symmetrix+0001233455555+U+Pool 0
Parameters: | poolInstanceId – the path and name of the file |
---|---|
Returns: | string – poolName - the pool name |
Returns: | string – systemName - the system name |
Given the instance Id parse the pool name and system name from it.
Example of pool InstanceId: Symmetrix+0001233455555+U+Pool 0
Parameters: | poolInstanceId – the path and name of the file |
---|---|
Returns: | poolName - the pool name |
Returns: | systemName - the system name |
Parse the volume type from the file (if it exists).
Parameters: | emcConfigFile – the EMC configuration file |
---|---|
Returns: | volumeTypeName - the volume type name |
Process exception arguments.
Parameters: |
|
---|---|
Returns: | None |
Raises: | VolumeBackendAPIException |
Change the volume ElementName to specified new name.
Parameters: |
|
---|---|
Returns: | volumeInstance after rename |
Get the replication setting data
Parameters: |
|
---|---|
Returns: | instance rsdInstance |
Get the replication setting data
Parameters: |
|
---|---|
Returns: | instance rsdInstance |
Truncate a string by taking first and last characters.
Parameters: |
|
---|---|
Returns: | string – truncated string or original string |
Check if SLO and workload values are valid.
Parameters: |
|
---|---|
Returns: | boolean |
Given the job wait for it to complete.
Parameters: |
|
---|---|
Returns: | int – the return code |
Returns: | errorDesc - the error description string |
Given the sync name wait for it to fully synchronize.
Parameters: |
|
---|---|
Raises: | loopingcall.LoopingCallDone |
Raises: | VolumeBackendAPIException |
Unit test aid