aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/model.py16
-rw-r--r--rumba/prototypes/ouroboros.py82
2 files changed, 55 insertions, 43 deletions
diff --git a/rumba/model.py b/rumba/model.py
index b44da88..7ec4fd9 100644
--- a/rumba/model.py
+++ b/rumba/model.py
@@ -734,6 +734,22 @@ class Experiment:
e['lower_dif']))
logger.debug(log_string)
+ log_string = "Mgmt flows:\n"
+ for el in self.mgmt_flows:
+ for e in el:
+ log_string += (" %s --> %s \n"
+ % (e['src'].name,
+ e['dst'].name))
+ logger.debug(log_string)
+
+ log_string = "Dt flows:\n"
+ for el in self.dt_flows:
+ for e in el:
+ log_string += (" %s --> %s \n"
+ % (e['src'].name,
+ e['dst'].name))
+ logger.debug(log_string)
+
def compute_ipcps(self):
# For each node, compute the required IPCP instances, and associated
# registrations
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py
index 97cd05f..cb0bf08 100644
--- a/rumba/prototypes/ouroboros.py
+++ b/rumba/prototypes/ouroboros.py
@@ -51,8 +51,10 @@ class Experiment(mod.Experiment):
cmds.append("sudo apt-get update")
cmds.append("sudo apt-get install cmake protobuf-c-compiler " +
- "git libfuse-dev --yes")
- cmds.append("sudo rm -r ~/ouroboros/build")
+ "git libfuse-dev libgcrypt20-dev libssl-dev --yes")
+ cmds.append("sudo apt-get install libprotobuf-c-dev --yes || true")
+ cmds.append("sudo rm -r ~/ouroboros || true")
+ cmds.append("git clone -b be git://ouroboros.ilabt.imec.be/ouroboros")
cmds.append("cd ~/ouroboros; sudo ./install_debug.sh /")
for node in self.nodes:
@@ -104,44 +106,36 @@ class Experiment(mod.Experiment):
ssh.execute_commands(self.testbed, node.ssh_config, cmds,
time_out=None)
- def enroll_ipcps(self):
- for el in self.enrollments:
- for e in el:
- ipcp = e['enrollee']
- cmds = list()
- cmd = "irm i e n " + ipcp.name + " dif " + e['dif'].name
- cmds.append(cmd)
- cmd = "irm b i " + ipcp.name + " name " + ipcp.dif.name
- cmds.append(cmd)
- cmd = "irm r n " + ipcp.name
- for dif_b in e['enrollee'].node.dif_registrations[ipcp.dif]:
- cmd += " dif " + dif_b.name
- cmds.append(cmd)
- cmd = "irm r n " + ipcp.dif.name
- for dif_b in e['enrollee'].node.dif_registrations[ipcp.dif]:
- cmd += " dif " + dif_b.name
- cmds.append(cmd)
+ def enroll_dif(self, el):
+ for e in el:
+ ipcp = e['enrollee']
+ cmds = list()
+ cmd = "irm i e n " + ipcp.name + " dif " + e['dif'].name
+ cmds.append(cmd)
+ cmd = "irm b i " + ipcp.name + " name " + ipcp.dif.name
+ cmds.append(cmd)
+ cmd = "irm r n " + ipcp.name
+ for dif_b in e['enrollee'].node.dif_registrations[ipcp.dif]:
+ cmd += " dif " + dif_b.name
+ cmds.append(cmd)
+ cmd = "irm r n " + ipcp.dif.name
+ for dif_b in e['enrollee'].node.dif_registrations[ipcp.dif]:
+ cmd += " dif " + dif_b.name
+ cmds.append(cmd)
+
+ ssh.execute_commands(self.testbed,
+ e['enrollee'].node.ssh_config,
+ cmds, time_out=None)
- ssh.execute_commands(self.testbed,
- e['enrollee'].node.ssh_config,
- cmds, time_out=None)
-
- def setup_flows(self, flows):
- for el in flows:
- for e in el:
- ipcp = e['src']
- if flows == self.mgmt_flows:
- comp = 'mgmt'
- elif flows == self.dt_flows:
- comp = 'dt'
- else:
- assert(False)
+ def setup_flows(self, el, comp):
+ for e in el:
+ ipcp = e['src']
+ cmd = "irm i conn n " + ipcp.name + " comp " + \
+ comp + " dst " + e['dst'].name
- cmd = "irm i conn n " + ipcp.name + " comp " + \
- comp + " dst " + e['dst'].name
- ssh.execute_command(self.testbed,
- ipcp.node.ssh_config,
- cmd, time_out=None)
+ ssh.execute_command(self.testbed,
+ ipcp.node.ssh_config,
+ cmd, time_out=None)
def install_prototype(self):
logger.info("Installing Ouroboros...")
@@ -154,9 +148,11 @@ class Experiment(mod.Experiment):
logger.info("Creating IPCPs")
self.create_ipcps()
logger.info("Enrolling IPCPs...")
- self.enroll_ipcps()
- logger.info("Setting up management flows...")
- self.setup_flows(self.mgmt_flows)
- logger.info("Setting up data transfer flows...")
- self.setup_flows(self.dt_flows)
+ i = 0
+ for element in self.enrollments:
+ self.enroll_dif(element)
+ self.setup_flows(self.mgmt_flows[i], comp="mgmt")
+ self.setup_flows(self.dt_flows[i], comp="dt")
+ i = i + 1
+
logger.info("All done, have fun!")