aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorvmaffione <v.maffione@gmail.com>2017-01-18 15:15:37 +0000
committervmaffione <v.maffione@gmail.com>2017-01-18 15:15:37 +0000
commite184e2838cc2b65fe9afe1cf7649b01ce4dcf73f (patch)
treecec479b4907b2d69eb8c78a83ed72392e684d339 /main.py
parenta9674f5a94525cc396141ce7c145bbe63324f368 (diff)
parentb52e886c9042650c70e734be9983614e438b39c8 (diff)
downloadrumba-e184e2838cc2b65fe9afe1cf7649b01ce4dcf73f.tar.gz
rumba-e184e2838cc2b65fe9afe1cf7649b01ce4dcf73f.zip
Merge branch 'master-ex' into 'master'
rhumba: Change example script See merge request !1
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/main.py b/main.py
index ea7ae17..1b61543 100755
--- a/main.py
+++ b/main.py
@@ -1,19 +1,26 @@
#!/usr/bin/env python
-# An example script using libarcfire.py
+# An example script using rhumba.py
-from libarcfire import *
+from rhumba import *
+n1 = NormalDIF("n1", policies = {"rmt.pff": "lfa",
+ "security-manager": "passwd"})
-exp = IRATIExperiment("prova")
-exp.dif_add(ShimEthDIF("300", 0, ["a", "b"]))
-exp.dif_add(ShimEthDIF("400", 0, ["b", "c"]))
+e1 = ShimEthDIF("e1")
-n1 = NormalDIF("n1", ["a", "b", "c"])
-n1.policy_add(Policy("rmt.pff", "lfa"))
-n1.policy_add(Policy("security-manager", "passwd", passwd="xyz"))
-n1.appmap_add("rina-echo-time.server")
-exp.dif_add(n1)
+a = Node("a",
+ difs = [n1, e1],
+ dif_registrations = {n1 : [e1]},
+ registrations = {"a.crap" : [n1]},
+ bindings = {"a.crap" : "/usr/bin/crap"})
+
+b = Node("b",
+ difs = [e1, n1],
+ dif_registrations = {n1 : [e1]})
+
+exp = IRATIExperiment("paperino",
+ nodes = [a, b])
print(exp)