aboutsummaryrefslogtreecommitdiff
path: root/examples/star.py
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2017-04-11 17:44:47 +0200
committerMarco Capitani <m.capitani@nextworks.it>2017-04-12 15:19:09 +0200
commit2b155aa25a2f61ad9bb84c273781a0597c6cef76 (patch)
tree20ea8f127969ab9e4852c6ddd66e2a8637b27675 /examples/star.py
parent6d8d0d30d75b318650034470b376a57a37b57944 (diff)
downloadrumba-2b155aa25a2f61ad9bb84c273781a0597c6cef76.tar.gz
rumba-2b155aa25a2f61ad9bb84c273781a0597c6cef76.zip
Added Testing scripts and demonstrator conf to rumba converter
Diffstat (limited to 'examples/star.py')
-rw-r--r--examples/star.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/star.py b/examples/star.py
new file mode 100644
index 0000000..c00aab7
--- /dev/null
+++ b/examples/star.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env/python
+
+from rumba.model import *
+
+# import testbed plugins
+import rumba.testbeds.emulab as emulab
+import rumba.testbeds.jfed as jfed
+import rumba.testbeds.faketestbed as fake
+import rumba.testbeds.qemu as qemu
+
+# import prototype plugins
+import rumba.prototypes.ouroboros as our
+import rumba.prototypes.rlite as rl
+import rumba.prototypes.irati as irati
+
+shim300 = ShimEthDIF("shim300", link_speed=0))
+
+n1 = NormalDIF("n1")
+
+a = Node("a",
+ difs=[300, n1],
+ dif_registrations={n1: [300]})
+
+b = Node("b",
+ difs=[300, n1],
+ dif_registrations={n1: [300]})
+
+c = Node("c",
+ difs=[300, n1],
+ dif_registrations={n1: [300]})
+
+tb = qemu.Testbed(exp_name = "star",
+ bzimage = "/home/mcapitani/RINA/checkouts/rlite/demo/buildroot/bzImage",
+ initramfs = "/home/mcapitani/RINA/checkouts/rlite/demo/buildroot/rootfs.cpio")
+
+exp = rl.Experiment(tb, nodes = [a, b, c, d])
+
+print(exp)
+
+exp.run()