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: | ‘True’, ‘False’ or ‘Undetermined’ |
Checks if a volume is concatenated or not.
Check underlying CIM_StorageExtent to see if the volume is concatenated or not. If isConcatenated is true then it is a composite If isConcatenated is False and isVolumeComposite is True then
it is a striped
Parameters: |
|
---|---|
Returns: | ‘True’, ‘False’ or ‘Undetermined’ |
Check the space consumed of a volume.
Parameters: |
|
---|---|
Returns: | spaceConsumed |
Compare the bit sizes to an approximate.
Parameters: |
|
---|---|
Returns: | size1GBs - size2GBs (int) |
Convert Bits(string) to GB(string).
Parameters: | strBitSize – string – The size in bits |
---|---|
Returns: | gbSize string – The size in GB |
Convert GB(string) to bits(string).
Parameters: | strGB – string – The size in GB |
---|---|
Returns: | strBitsSize string – The size in bits |
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: | memberCount - string |
Returns: | 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 |
Given the storage system name, get the element composition service.
Parameters: |
|
---|---|
Returns: | foundElementCompositionService |
Find the IP protocol endpoint for ISCSI.
Parameters: |
|
---|---|
Returns: | foundIpAddress |
Given the storage system name, get the replication service.
Parameters: |
|
---|---|
Returns: | foundRepService |
Given the storage system name, get the storage configuration service
Parameters: |
|
---|---|
Returns: | foundconfigService |
Given the storage system name, get the storage hardware service.
Parameters: |
|
---|---|
Returns: | foundStorageRelocationService |
Given the storage group name get the storage group.
Parameters: |
|
---|
Given the storage system name, get the storage relocation service.
Parameters: |
|
---|---|
Returns: | foundStorageRelocationService |
Finds the storage system for a particular config service.
Given the storage configuration service get the CIM_StorageSystem from it.
Parameters: |
|
---|---|
Returns: | rc - the return code of the job |
Returns: | jobDict - the job dict |
Given any service get the storage system name from it.
Parameters: | configService – the configuration service |
---|---|
Returns: | configService[‘SystemName’] - storage system name (String) |
Given the volumeDict get the instance from it.
Parameters: |
|
---|---|
Returns: | foundVolumeInstance - the volume instance |
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: | compositeType = 2 or 3 |
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 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 |
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 all the hardware ids from an array.
Parameters: | conn – connection to the ecom server |
---|---|
Param : | hardwareIdManagementService - hardware id management service |
Returns: | hardwareIdInstanceNames - the list of hardware id instance names |
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: |
|
---|
Get the instance from the classname and bindings.
NOTE: This exists in common too...will be moving it to other file where both common and masking can access it
Parameters: |
|
---|---|
Returns: | foundVolumeInstance - the volume instance |
Get the ecom int from the number.
Parameters: |
|
---|---|
Returns: | result |
Returns the instance name associated with a storage pool name.
Parameters: |
|
---|---|
Returns: | poolInstanceName - 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: | total_capacity_gb - total capacity of the storage pool in GB |
Returns: | free_capacity_gb - remaining capacity of the storage pool in GB |
Given the protocol type, return I for iscsi and F for fc
Parameters: | protocol – iscsi or fc |
---|---|
Returns: | ‘I’ or ‘F’ |
Check the space consumed of a volume.
Parameters: |
|
---|---|
Returns: | spaceConsumed |
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 - the storage group instance name |
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 |
Get the volume size.
ConsumableBlocks * BlockSize
Parameters: |
|
---|---|
Returns: | volumeSizeOut |
Get the volume type name.
Parameters: | volume – the volume dictionary |
---|---|
Returns: | volumeTypeName - the volume type name |
Check the space consumed of a volume.
Parameters: |
|
---|---|
Returns: | spaceConsumed |
Compare the bit sizes to an approximate.
Parameters: | volume – the volume dictionary |
---|---|
Returns: | extraSpecs - the extra specs |
Check if volume is bound to a pool.
Parameters: |
|
---|---|
Returns: | foundIsSupportsTieringPolicies - true/false |
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: | 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 portGroups and choose one randomly.
Parameters: | fileName – the path and name of the file |
---|---|
Returns: | portGroupName - the name of the port group chosen |
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: | poolName - the pool name |
Parse the volume type from the file (if it exists).
Parameters: | emcConfigFile – the EMC configuration file |
---|---|
Returns: | volumeTypeName - the volume type name |
Given the job wait for it to complete.
Parameters: |
|
---|---|
Returns: | rc - the return code |
Returns: | errorDesc - the error description string |
Given the sync name wait for it to fully synchronize.
Parameters: |
|
---|