[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22716 - gnunet-planetlab/gplmt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22716 - gnunet-planetlab/gplmt |
Date: |
Tue, 17 Jul 2012 14:58:15 +0200 |
Author: wachs
Date: 2012-07-17 14:58:15 +0200 (Tue, 17 Jul 2012)
New Revision: 22716
Added:
gnunet-planetlab/gplmt/Worker.py
Modified:
gnunet-planetlab/gplmt/Tasks.py
gnunet-planetlab/gplmt/gplmt.py
Log:
- worker
Modified: gnunet-planetlab/gplmt/Tasks.py
===================================================================
--- gnunet-planetlab/gplmt/Tasks.py 2012-07-17 12:54:03 UTC (rev 22715)
+++ gnunet-planetlab/gplmt/Tasks.py 2012-07-17 12:58:15 UTC (rev 22716)
@@ -154,4 +154,4 @@
return False
for child in root:
handle_child (child, self.l)
- print_sequence (self.l)
+ #print_sequence (self.l)
Added: gnunet-planetlab/gplmt/Worker.py
===================================================================
--- gnunet-planetlab/gplmt/Worker.py (rev 0)
+++ gnunet-planetlab/gplmt/Worker.py 2012-07-17 12:58:15 UTC (rev 22716)
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+#
+# This file is part of GNUnet.
+# (C) 2010 Christian Grothoff (and other contributing authors)
+#
+# GNUnet is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; either version 2, or (at your
+# option) any later version.
+#
+# GNUnet is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNUnet; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# GNUnet Planetlab deployment and automation toolset
+#
+# Nodes
+
+class NodeWorker:
+ def __init__(self, logger, node, tasks):
+ assert (None != logger)
+ assert (None != node)
+ assert (None != tasks)
+ self.logger = logger
+ self.node = node
+ self.tasks = tasks
+ def start (self):
+ self.logger.log ("Starting execution for node " + self.node)
+
+class Worker:
+ def __init__(self, logger, nodes, tasks):
+ assert (None != logger)
+ assert (None != nodes)
+ assert (None != tasks)
+ self.logger = logger
+ self.nodes = nodes
+ self.tasks = tasks
+ def start (self):
+ self.logger.log ("Starting execution")
+ for n in self.nodes.nodes:
+ nw = NodeWorker (self.logger, n, self.tasks)
+ nw.start()
Modified: gnunet-planetlab/gplmt/gplmt.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt.py 2012-07-17 12:54:03 UTC (rev 22715)
+++ gnunet-planetlab/gplmt/gplmt.py 2012-07-17 12:58:15 UTC (rev 22716)
@@ -28,6 +28,7 @@
import Configuration;
import Nodes;
import Tasks;
+import Worker;
# Checking dependencies
# ElementTree XML Parser
@@ -121,8 +122,9 @@
if (tasks.load() == False):
sys.exit(2)
-# Start parallel ssh execution
-
+# Start execution
+ worker = Worker.Worker (main.logger, nodes, tasks)
+ worker.start()
# Clean up
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22716 - gnunet-planetlab/gplmt,
gnunet <=