Support for source and destination for traceNG.

This commit is contained in:
grossmj committed 2018-03-27 16:58:49 +07:00
1 parent 8e695c8af1
commit d08c08617c
10 files changed
+117 -93

No files matched your search

+2 -2
View File
@@ -454,7 +454,7 @@ class Node:
yield from self.delete()
@asyncio.coroutine
def start(self):
def start(self, data=None):
"""
Start a node
"""
@@ -467,7 +467,7 @@ class Node:
raise aiohttp.web.HTTPConflict(text="IOU licence is not configured")
yield from self.post("/start", timeout=240, data={"iourc_content": licence})
else:
yield from self.post("/start", timeout=240)
yield from self.post("/start", data=data, timeout=240)
except asyncio.TimeoutError:
raise aiohttp.web.HTTPRequestTimeout(text="Timeout when starting {}".format(self._name))
+3
View File
@@ -905,6 +905,9 @@ class Project:
"""
pool = Pool(concurrency=3)
for node in self.nodes.values():
if node.node_type == "traceng":
#FIXME: maybe not the right place to do this...
continue
pool.append(node.start)
yield from pool.join()