cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [1/2] git commit: updated refs/heads/4.4 to 34f3a5f
Date Wed, 30 Jul 2014 10:31:39 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 a05007489 -> 34f3a5fd4


Added fix for CLOUDSTACK-6529

Fixed to continue adding all hosts, even if any addition fails and remove
unused args from host class.

Signed-off-by: santhosh <santhosh.edukulla@gmail.com>
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
(cherry picked from commit 6f3ff068270f48e00531c462de4f7d76395658ff)

Conflicts:
	tools/marvin/marvin/deployDataCenter.py


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

Branch: refs/heads/4.4
Commit: 25a78acee127e7b195e4508bd8c1740d9fe227ed
Parents: a050074
Author: santhosh <santhosh.edukulla@gmail.com>
Authored: Fri May 23 22:35:58 2014 +1000
Committer: Daan Hoogland <daan@onecht.net>
Committed: Wed Jul 30 12:30:51 2014 +0200

----------------------------------------------------------------------
 tools/marvin/marvin/configGenerator.py  |  5 +---
 tools/marvin/marvin/deployDataCenter.py | 39 +++++++++++++++++++---------
 2 files changed, 28 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/25a78ace/tools/marvin/marvin/configGenerator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py
index 4e48c22..8daaaa9 100644
--- a/tools/marvin/marvin/configGenerator.py
+++ b/tools/marvin/marvin/configGenerator.py
@@ -154,11 +154,8 @@ class host(object):
         self.podid = None
         self.clusterid = None
         self.clustername = None
-        self.cpunumber = None
-        self.cpuspeed = None
-        self.hostmac = None
         self.hosttags = None
-        self.memory = None
+        self.allocationstate = None
 
 
 class physicalNetwork(object):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/25a78ace/tools/marvin/marvin/deployDataCenter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py
index 9cbb95d..c097238 100644
--- a/tools/marvin/marvin/deployDataCenter.py
+++ b/tools/marvin/marvin/deployDataCenter.py
@@ -117,18 +117,16 @@ class DeployDataCenters(object):
             self.__cleanUp["order"].append(type)
 
     def addHosts(self, hosts, zoneId, podId, clusterId, hypervisor):
-        try:
-            if hosts is None:
-                return
-            for host in hosts:
+        if hosts is None:
+            print "\n === Invalid Hosts Information ===="
+            return
+        failed_cnt = 0
+        for host in hosts:
+            try:
                 hostcmd = addHost.addHostCmd()
                 hostcmd.clusterid = clusterId
-                hostcmd.cpunumber = host.cpunumer
-                hostcmd.cpuspeed = host.cpuspeed
-                hostcmd.hostmac = host.hostmac
                 hostcmd.hosttags = host.hosttags
                 hostcmd.hypervisor = host.hypervisor
-                hostcmd.memory = host.memory
                 hostcmd.password = host.password
                 hostcmd.podid = podId
                 hostcmd.url = host.url
@@ -139,10 +137,15 @@ class DeployDataCenters(object):
                 if ret:
                     self.__tcRunLogger.debug("=== Add Host Successful ===")
                     self.__addToCleanUp("Host", ret[0].id)
-        except Exception as e:
-            print "Exception Occurred %s" % GetDetailExceptionInfo(e)
-            self.__tcRunLogger.exception("=== Adding Host Failed ===")
-            self.__cleanAndExit()
+            except Exception as e:
+                failed_cnt = failed_cnt + 1
+                print "Exception Occurred :%s" % GetDetailExceptionInfo(e)
+                self.__tcRunLogger.exception(
+                    "=== Adding Host Failed :%s===" % str(
+                        host.url))
+                if failed_cnt == len(hosts):
+                    self.__cleanAndExit()
+                continue
 
     def addVmWareDataCenter(self, vmwareDc):
         try:
@@ -517,6 +520,14 @@ class DeployDataCenters(object):
                         self.enableProvider(pnetprovres[0].id)
                     elif provider.name == 'SecurityGroupProvider':
                         self.enableProvider(pnetprovres[0].id)
+                elif provider.name in ['JuniperContrailRouter',
+                                       'JuniperContrailVpcRouter']:
+                    netprov = addNetworkServiceProvider.\
+                        addNetworkServiceProviderCmd()
+                    netprov.name = provider.name
+                    netprov.physicalnetworkid = phynetwrk.id
+                    result = self.apiClient.addNetworkServiceProvider(netprov)
+                    self.enableProvider(result.id)
                 elif provider.name in ['Netscaler', 'JuniperSRX', 'F5BigIp']:
                     netprov = addNetworkServiceProvider.\
                         addNetworkServiceProviderCmd()
@@ -1067,6 +1078,10 @@ if __name__ == "__main__":
     '''
     Step1: Create the Logger
     '''
+    if (options.input) and not (os.path.isfile(options.input)):
+        print "\n=== Invalid Input Config File Path, Please Check ==="
+        exit(1)
+
     log_obj = MarvinLog("CSLog")
     cfg = configGenerator.getSetupConfig(options.input)
     log = cfg.logger


Mime
View raw message