EMC VMAX - Changing PercentSynced to CopyState in isSynched

In SE 8.x PercentSynced no longer works for VMAX3 as a criteria to
determine whether a device is synched or not. Luckily 'CopyState'
works for both VMAX2 and VMAX3 and is backward compatible with 7.6.x.

Change-Id: I443e5f17f3c0e779ebdfd868bcd05cb85b52f525
Closes-Bug: #1517103
This commit is contained in:
Helen Walsh
2015-11-18 15:40:11 +00:00
parent 0f5e61bf6e
commit cfba8b3584
4 changed files with 24 additions and 8 deletions

View File

@@ -53,6 +53,7 @@ INTERVAL = 'storagetype:interval'
RETRIES = 'storagetype:retries'
CIM_ERR_NOT_FOUND = 6
VOLUME_ELEMENT_NAME_PREFIX = 'OS-'
SYNCHRONIZED = 4
class EMCVMAXUtils(object):
@@ -439,15 +440,11 @@ class EMCVMAXUtils(object):
"""
syncInstance = conn.GetInstance(syncName,
LocalOnly=False)
percentSynced = syncInstance['PercentSynced']
copyState = syncInstance['CopyState']
LOG.debug("CopyState is %(copyState)lu.",
{'copyState': copyState})
LOG.debug("Percent synced is %(percentSynced)lu.",
{'percentSynced': percentSynced})
if percentSynced < 100:
return False
else:
return True
return copyState == SYNCHRONIZED
def get_num(self, numStr, datatype):
"""Get the ecom int from the number.