cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [15/50] [abbrv] git commit: updated refs/heads/vmsync to f737019
Date Mon, 01 Jul 2013 21:24:59 GMT
CLOUDSTACK-3074: include support for vmwaredc mapping to zone

vmware dc can be mapped to the zone after CLOUDSTACK-1963. include
support in marvin for adding the vmwaredc.

vmwaredc : {
    name:
    username:
    vcenter:
    password:
    zoneid:
}

Will be sent during pod creation before cluster creation.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f3e30486
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f3e30486
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f3e30486

Branch: refs/heads/vmsync
Commit: f3e30486825c69670eec733517c8aa766c299dc1
Parents: 87c401a
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Sat Jun 29 00:38:52 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Sat Jun 29 10:03:51 2013 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/configGenerator.py  | 10 ++++++++++
 tools/marvin/marvin/deployDataCenter.py | 16 ++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f3e30486/tools/marvin/marvin/configGenerator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py
index 812bfec..a966ae0 100644
--- a/tools/marvin/marvin/configGenerator.py
+++ b/tools/marvin/marvin/configGenerator.py
@@ -105,10 +105,20 @@ class pod(object):
         self.endip = None
         self.zoneid = None
         self.clusters = []
+        self.vmwaredc = []
         '''Used in basic network mode'''
         self.guestIpRanges = []
 
 
+class VmwareDc(object):
+    def __init__(self):
+        self.zoneid = None
+        self.name = None
+        self.vcenter = None
+        self.username = None
+        self.password = None
+
+
 class cluster(object):
     def __init__(self):
         self.clustername = None

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f3e30486/tools/marvin/marvin/deployDataCenter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py
index 941b6e9..961718a 100644
--- a/tools/marvin/marvin/deployDataCenter.py
+++ b/tools/marvin/marvin/deployDataCenter.py
@@ -54,10 +54,22 @@ specify a valid config file" % cfgFile)
             hostcmd.hypervisor = hypervisor
             self.apiClient.addHost(hostcmd)
 
-    def createClusters(self, clusters, zoneId, podId):
+    def addVmWareDataCenter(self, vmwareDc):
+        vdc = addVmwareDc.addVmwareDcCmd()
+        vdc.zoneid = vmwareDc.zoneid
+        vdc.name = vmwareDc.name
+        vdc.vcenter = vmwareDc.vcenter
+        vdc.username = vmwareDc.username
+        vdc.password = vmwareDc.password
+        self.apiClient.addVmwareDc(vdc)
+
+    def createClusters(self, clusters, zoneId, podId, vmwareDc=None):
         if clusters is None:
             return
 
+        if vmwareDc:
+            self.addVmWareDataCenter(vmwareDc)
+
         for cluster in clusters:
             clustercmd = addCluster.addClusterCmd()
             clustercmd.clustername = cluster.clustername
@@ -108,7 +120,7 @@ specify a valid config file" % cfgFile)
                 self.createVlanIpRanges("Basic", pod.guestIpRanges, zoneId,
                                         podId, networkId)
 
-            self.createClusters(pod.clusters, zoneId, podId)
+            self.createClusters(pod.clusters, zoneId, podId, vmwareDc=pod.vmwaredc)
 
     def createVlanIpRanges(self, mode, ipranges, zoneId, podId=None,
                            networkId=None, forvirtualnetwork=None):


Mime
View raw message