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 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 |
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 given the array name.
Parameters: |
|
---|---|
Returns: | foundPoolInstanceName, the CIM Instance Name of the Pool |
Raises: | VolumeBackendAPIException |
Given the storage system name, get the storage configuration service.
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 |
Given the volumeDict get the instance from it.
Parameters: |
|
---|---|
Returns: | foundVolumeInstance - the found volume instance |
Extract the array from the host capabilites.
Parameters: | host – the host object |
---|---|
Returns: | storageSystem - storage system represents the array |
Give the volume instance get the associated pool instance
Parameters: |
|
---|---|
Returns: | foundPoolInstanceName |
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 |
Given the filename get the ecomUser and ecomPasswd.
Parameters: | filename – the path and filename of the emc configuration file |
---|---|
Returns: | ecomUser - the ecom user |
Returns: | ecomPasswd - the ecom password |
Given the filename get the ecomUser and ecomPasswd.
Parameters: | filename – the path and filename of the emc configuration file |
---|---|
Returns: | string – ecomUseSSL |
Returns: | string – ecomCACert |
Returns: | string – ecomNoVerification |
Given the file name get the ecomPort and ecomIP from it.
Parameters: | filename – the path and file name of the emc configuration file |
---|---|
Returns: | ecomIp - the ecom IP address |
Returns: | ecomPort - the ecom port |
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 capacity in bits 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) |
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 |
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 |
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 |
Determine default v3 storage group from extraSpecs.
Parameters: |
|
---|---|
Returns: | storageGroupName |
Get the head of a meta volume.
Parameters: |
|
---|---|
Returns: | the instance name of the meta volume head |
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’ |
Parse the array name from config file.
If it is not there then there should only be one array configured to the ecom. If there is more than one then erroneous results can occur.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | string – arrayName - the array name |
Parse the fast policy name from config file.
If it is not there, then NON FAST is assumed.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | fastPolicyName - the fast policy name |
Parses a file and chooses a port group randomly.
Given a file, parse it to get all the possible portGroupElements and choose one randomly.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | string – portGroupName - the name of the port group chosen |
Raises: | VolumeBackendAPIException |
Parse the interval from config file.
If it is not there then the default will be used.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | interval - the interval in seconds |
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 pool name from config file.
If it is not there then we will attempt to get it from extra specs.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | string – poolName - the pool name |
Parse the retries from config file.
If it is not there then the default will be used.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | retries - the max number of retries |
Parse the slo from config file.
Please note that the string ‘NONE’ is returned if it is not found.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | string – the slo or ‘NONE’ |
Parse the volume type from the file (if it exists).
Parameters: | emcConfigFile – the EMC configuration file |
---|---|
Returns: | volumeTypeName - the volume type name |
Parse the workload from config file.
Please note that the string ‘NONE’ is returned if it is not found.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | string – the workload or ‘NONE’ |
Update cgsnapshot status in the cinder database.
Parameters: |
|
---|---|
Returns: | snapshots - updated snapshots |
Process exception arguments.
Parameters: |
|
---|---|
Returns: | None |
Raises: | VolumeBackendAPIException |
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