aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincenzo Maffione <v.maffione@gmail.com>2017-04-13 23:21:39 +0200
committerVincenzo Maffione <v.maffione@gmail.com>2017-04-13 23:21:39 +0200
commit50d708a09395fbed2d2d75dd07c0fa6a360f59c0 (patch)
treec690911feb5c4232bad52367e02f7f54633de5f0
parentc807556fcd39085c66136a8a628c60ea67f5d852 (diff)
downloadrumba-50d708a09395fbed2d2d75dd07c0fa6a360f59c0.tar.gz
rumba-50d708a09395fbed2d2d75dd07c0fa6a360f59c0.zip
prototype: rlite: implement enroll_ipcps()
-rw-r--r--rumba/prototypes/rlite.py15
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")