diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index d705330b846..4fcd6967f62 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -196,8 +196,7 @@ class DeployDataCenters(object): self.createPrimaryStorages(cluster.primaryStorages, zoneId, podId, - clusterId, - cluster.hypervisor) + clusterId) except Exception as e: print "Exception Occurred %s" % GetDetailExceptionInfo(e) self.__tcRunLogger.exception("====Cluster %s Creation Failed" @@ -230,9 +229,8 @@ class DeployDataCenters(object): def createPrimaryStorages(self, primaryStorages, zoneId, - podId, - clusterId, - hypervisor): + podId=None, + clusterId=None): try: if primaryStorages is None: return @@ -242,13 +240,14 @@ class DeployDataCenters(object): for key, value in vars(primary.details).iteritems(): primarycmd.details.append({ key: value}) primarycmd.name = primary.name - primarycmd.podid = podId + primarycmd.tags = primary.tags primarycmd.url = primary.url if primary.scope == 'zone': primarycmd.scope = primary.scope - primarycmd.hypervisor = hypervisor + primarycmd.hypervisor = primary.hypervisor else: + primarycmd.podid = podId primarycmd.clusterid = clusterId primarycmd.zoneid = zoneId @@ -786,6 +785,11 @@ class DeployDataCenters(object): '''Note: Swift needs cache storage first''' self.createCacheStorages(zone.cacheStorages, zoneId) self.createSecondaryStorages(zone.secondaryStorages, zoneId) + #add zone wide primary storages if any + if zone.primaryStorages: + self.createPrimaryStorages(zone.primaryStorages, + zoneId, + ) enabled = getattr(zone, 'enabled', 'True') if enabled == 'True' or enabled is None: self.enableZone(zoneId, "Enabled")