diff options
author | Vincenzo Maffione <v.maffione@gmail.com> | 2017-04-21 23:12:42 +0200 |
---|---|---|
committer | Vincenzo Maffione <v.maffione@gmail.com> | 2017-04-21 23:45:06 +0200 |
commit | e4662a39489067f0d352d270e25df3da6ff478d8 (patch) | |
tree | 972cca8525819b26b633470b711e7a7e1ab280c9 /rumba/prototypes/ouroboros.py | |
parent | bec81866d4da33405c35c8eb4dc15d4fc5bfbfb7 (diff) | |
download | rumba-e4662a39489067f0d352d270e25df3da6ff478d8.tar.gz rumba-e4662a39489067f0d352d270e25df3da6ff478d8.zip |
model, prototypes: enrollment lists contain IPCP objects rather than Node ones
This fixes a conceptual bug, that was leading to unnecessary
workarounds in the prototype plugins.
All the plugins have been modified to use the correct format of
enrollment lists.
Diffstat (limited to 'rumba/prototypes/ouroboros.py')
-rw-r--r-- | rumba/prototypes/ouroboros.py | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index bbf8c75..9c164e7 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -119,26 +119,25 @@ class Experiment(mod.Experiment): def enroll_ipcps(self): for el in self.enrollments: for e in el: - for ipcp in e['enrollee'].ipcps: - if ipcp.dif == e['dif']: - 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'].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'].dif_registrations[ipcp.dif]: - cmd += " dif " + dif_b.name - cmds.append(cmd) - - ssh.execute_commands(self.testbed, - e['enrollee'].ssh_config, - cmds, time_out=None) - time.sleep(2) + 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) + time.sleep(2) def install_prototype(self): logger.info("Installing Ouroboros...") |