diff options
author | Vincenzo Maffione <v.maffione@gmail.com> | 2017-04-13 23:21:39 +0200 |
---|---|---|
committer | Vincenzo Maffione <v.maffione@gmail.com> | 2017-04-13 23:21:39 +0200 |
commit | 50d708a09395fbed2d2d75dd07c0fa6a360f59c0 (patch) | |
tree | c690911feb5c4232bad52367e02f7f54633de5f0 | |
parent | c807556fcd39085c66136a8a628c60ea67f5d852 (diff) | |
download | rumba-50d708a09395fbed2d2d75dd07c0fa6a360f59c0.tar.gz rumba-50d708a09395fbed2d2d75dd07c0fa6a360f59c0.zip |
prototype: rlite: implement enroll_ipcps()
-rw-r--r-- | rumba/prototypes/rlite.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py index 25ae943..9568d7e 100644 --- a/rumba/prototypes/rlite.py +++ b/rumba/prototypes/rlite.py @@ -80,6 +80,7 @@ class Experiment(mod.Experiment): # Generate the command to configure the interface # name for the shim-eth if type(ipcp.dif) is mod.ShimEthDIF: + ipcp.ifname = 'eth1' cmds.append("rlite-ctl ipcp-config %s netdev %s" \ % (ipcp.name, ipcp.ifname)) @@ -96,6 +97,18 @@ class Experiment(mod.Experiment): self.execute_commands(node, cmds) + def enroll_ipcps(self): + for el in self.enrollments: + for e in el: + d = {'enrollee': e['enrollee'].name, + 'dif': e['dif'].name, + 'lower_dif': e['lower_dif'].name, + 'enroller': e['enroller'].name + } + cmd = "rlite-ctl ipcp-enroll %(enrollee)s %(dif)s "\ + "%(lower_dif)s %(enroller)s" % d + self.execute_commands(e['enrollee'], [cmd]) + def run_prototype(self): print("rlite: setting up") self.init() @@ -104,3 +117,5 @@ class Experiment(mod.Experiment): print("rlite: IPCPs created on all nodes") self.register_ipcps() print("rlite: IPCPs registered to their lower DIFs on all nodes") + self.enroll_ipcps() + print("rlite: enrollment completed in all DIFs") |