cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [29/29] git commit: updated refs/heads/master-6-17-stable to 93712c2
Date Fri, 28 Jun 2013 19:22:50 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>
(cherry picked from commit 9f4b7dcff896810e2276e02fa034de283964bf49)

Conflicts:
	tools/marvin/marvin/configGenerator.py

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/93712c27
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/93712c27
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/93712c27

Branch: refs/heads/master-6-17-stable
Commit: 93712c2715c540150b86efdcc8e02c8f7facd0dc
Parents: 3789548
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 00:52:09 2013 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/configGenerator.py  | 13 ++++++++++++-
 tools/marvin/marvin/deployDataCenter.py | 16 ++++++++++++++--
 2 files changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93712c27/tools/marvin/marvin/configGenerator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py
index bd83efb..917e428 100644
--- a/tools/marvin/marvin/configGenerator.py
+++ b/tools/marvin/marvin/configGenerator.py
@@ -94,10 +94,21 @@ class pod():
         self.endip = None
         self.zoneid = None
         self.clusters = []
+        self.vmwaredc = []
         '''Used in basic network mode'''
         self.guestIpRanges = []
 
-class cluster():
+
+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
         self.clustertype = None

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93712c27/tools/marvin/marvin/deployDataCenter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py
index cf5cf78..f00b486 100644
--- a/tools/marvin/marvin/deployDataCenter.py
+++ b/tools/marvin/marvin/deployDataCenter.py
@@ -52,10 +52,22 @@ class deployDataCenters():
             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
@@ -106,7 +118,7 @@ class deployDataCenters():
                 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