Merge "VMAX driver - shapshot will fail if default storage group is missing" into stable/newton
This commit is contained in:
commit
f64c4f0a7b
|
@ -231,6 +231,26 @@ class EMCVMAXProvisionV3(object):
|
||||||
|
|
||||||
return volumeDict
|
return volumeDict
|
||||||
|
|
||||||
|
def get_or_create_default_sg(self, conn, extraSpecs, storageSystemName):
|
||||||
|
"""Get or create default storage group for a replica.
|
||||||
|
|
||||||
|
:param conn: the connection to the ecom server
|
||||||
|
:param extraSpecs: the extra specifications
|
||||||
|
:param storageSystemName: the storage system name
|
||||||
|
:returns: sgInstanceName, instance of storage group
|
||||||
|
"""
|
||||||
|
pool = extraSpecs[self.utils.POOL]
|
||||||
|
slo = extraSpecs[self.utils.SLO]
|
||||||
|
workload = extraSpecs[self.utils.WORKLOAD]
|
||||||
|
storageGroupName, controllerConfigService, sgInstanceName = (
|
||||||
|
self.utils.get_v3_default_sg_instance_name(
|
||||||
|
conn, pool, slo, workload, storageSystemName))
|
||||||
|
if sgInstanceName is None:
|
||||||
|
sgInstanceName = self.create_storage_group_v3(
|
||||||
|
conn, controllerConfigService, storageGroupName,
|
||||||
|
pool, slo, workload, extraSpecs)
|
||||||
|
return sgInstanceName
|
||||||
|
|
||||||
def create_element_replica(
|
def create_element_replica(
|
||||||
self, conn, repServiceInstanceName,
|
self, conn, repServiceInstanceName,
|
||||||
cloneName, syncType, sourceInstance, extraSpecs,
|
cloneName, syncType, sourceInstance, extraSpecs,
|
||||||
|
@ -256,11 +276,9 @@ class EMCVMAXProvisionV3(object):
|
||||||
'syncType': syncType,
|
'syncType': syncType,
|
||||||
'source': sourceInstance.path})
|
'source': sourceInstance.path})
|
||||||
storageSystemName = sourceInstance['SystemName']
|
storageSystemName = sourceInstance['SystemName']
|
||||||
__, __, sgInstanceName = (
|
sgInstanceName = (
|
||||||
self.utils.get_v3_default_sg_instance_name(
|
self.get_or_create_default_sg(
|
||||||
conn, extraSpecs[self.utils.POOL],
|
conn, extraSpecs, storageSystemName))
|
||||||
extraSpecs[self.utils.SLO],
|
|
||||||
extraSpecs[self.utils.WORKLOAD], storageSystemName))
|
|
||||||
try:
|
try:
|
||||||
storageGroupInstance = conn.GetInstance(sgInstanceName)
|
storageGroupInstance = conn.GetInstance(sgInstanceName)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue