[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28144 - in gnunet-planetlab/gplmt: . gplmt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28144 - in gnunet-planetlab/gplmt: . gplmt |
Date: |
Thu, 18 Jul 2013 13:19:51 +0200 |
Author: wachs
Date: 2013-07-18 13:19:51 +0200 (Thu, 18 Jul 2013)
New Revision: 28144
Modified:
gnunet-planetlab/gplmt/gplmt.py
gnunet-planetlab/gplmt/gplmt/Configuration.py
gnunet-planetlab/gplmt/gplmt/Targets.py
Log:
target depending node loading
Modified: gnunet-planetlab/gplmt/gplmt/Configuration.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt/Configuration.py 2013-07-18 11:11:18 UTC
(rev 28143)
+++ gnunet-planetlab/gplmt/gplmt/Configuration.py 2013-07-18 11:19:51 UTC
(rev 28144)
@@ -46,8 +46,8 @@
self.pl_api_url = ""
self.pl_username = None
self.pl_password = None
- self.taskfile = ""
- self.nodesfile = ""
+ self.taskfile = None
+ self.nodesfile = None
self.ssh_username = ""
self.ssh_add_unkown_hostkeys = False
self.ssh_keyfile = None
Modified: gnunet-planetlab/gplmt/gplmt/Targets.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt/Targets.py 2013-07-18 11:11:18 UTC (rev
28143)
+++ gnunet-planetlab/gplmt/gplmt/Targets.py 2013-07-18 11:19:51 UTC (rev
28144)
@@ -39,10 +39,14 @@
return 'planetlab'
else:
return "undefined"
+ def __ne__(self,y):
+ if (self.value==y.value):
+ return False
+ else:
+ return True
def __cmp__(self,y):
return self.value==y.value
def __eq__(self,y):
- print "Compare "+ str (y) + " " + str (self) + " : " + str
(self.value==y.value)
return self.value==y.value
@staticmethod
def create (source_str):
Modified: gnunet-planetlab/gplmt/gplmt.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt.py 2013-07-18 11:11:18 UTC (rev 28143)
+++ gnunet-planetlab/gplmt/gplmt.py 2013-07-18 11:19:51 UTC (rev 28144)
@@ -58,7 +58,7 @@
def main():
global main
tasks_file = None
- single_host = False
+ single_host = None
nodes_file = None
pl_password = None
config_file = None
@@ -156,9 +156,10 @@
if ((target == undefined_target) and (tasklist.target ==
undefined_target)):
print "No target to run on defined!"
return
- if (target != undefined_target):
- tasklist.target = target
- print "Using target " + str (tasklist.target)
+ if (target != undefined_target) and (tasklist.target !=
undefined_target):
+ print "OVEr" + str (tasklist.target) + " " + str (target)
+ target = tasklist.target
+ print "Using target " + str (target)
if (target == Targets.Target (Targets.Target.planetlab)):
if (configuration.pl_password == None):
@@ -170,24 +171,28 @@
# Load hosts files: single host, nodes files, planetlab
# command line beats configuration
- if ((None == single_host) and ("" == configuration.nodesfile) and
- (target == Targets.Target (Targets.Target.planetlab))):
+
+ if ((None == single_host) and (None == configuration.nodesfile) and
+ (target != Targets.Target (Targets.Target.planetlab))):
print "No nodes to use given!\n"
usage()
sys.exit(4)
-
+
# Use a single host
if (single_host != None):
+ main.logger.log ("Using single node '" + single_host + "'")
nodes = Nodes.StringNodes (single_host, main.logger)
if (nodes.load() == False):
sys.exit(5)
# Use a nodes file
- elif (configuration.nodesfile != ""):
+ elif (None != configuration.nodesfile):
+ main.logger.log ("Using node file '" + configuration.nodesfile +
"'")
nodes = Nodes.Nodes (configuration.nodesfile, main.logger);
if (nodes.load() == False):
sys.exit(7)
elif (target == Targets.Target (Targets.Target.planetlab)):
# Load PlanetLab nodes
+ main.logger.log ("Using PlanetLab nodes")
nodes = Nodes.PlanetLabNodes (configuration, main.logger)
if (nodes.load() == False):
sys.exit(6)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28144 - in gnunet-planetlab/gplmt: . gplmt,
gnunet <=