You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ap...@apache.org on 2014/05/26 07:19:54 UTC
git commit: updated refs/heads/master to 8b39e2f
Repository: cloudstack
Updated Branches:
refs/heads/master 16bf065a0 -> 8b39e2ff7
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 <sa...@gmail.com>
Signed-off-by: Abhinandan Prateek <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8b39e2ff
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8b39e2ff
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8b39e2ff
Branch: refs/heads/master
Commit: 8b39e2ff71dd452fd4919450e427c851d2b8d1d6
Parents: 16bf065
Author: santhosh <sa...@gmail.com>
Authored: Fri May 23 22:35:58 2014 +1000
Committer: Abhinandan Prateek <ap...@apache.org>
Committed: Mon May 26 10:49:43 2014 +0530
----------------------------------------------------------------------
tools/marvin/marvin/configGenerator.py | 5 +---
tools/marvin/marvin/deployDataCenter.py | 34 +++++++++++++++++-----------
2 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b39e2ff/tools/marvin/marvin/configGenerator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py
index 66609da..191f08e 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/8b39e2ff/tools/marvin/marvin/deployDataCenter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py
index aab26e3..5b9c93b 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:
@@ -516,7 +519,8 @@ class DeployDataCenters(object):
self.enableProvider(pnetprovres[0].id)
elif provider.name == 'SecurityGroupProvider':
self.enableProvider(pnetprovres[0].id)
- elif provider.name in ['JuniperContrailRouter', 'JuniperContrailVpcRouter']:
+ elif provider.name in ['JuniperContrailRouter',
+ 'JuniperContrailVpcRouter']:
netprov = addNetworkServiceProvider.\
addNetworkServiceProviderCmd()
netprov.name = provider.name
@@ -1073,6 +1077,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