diff options
author | Marco Capitani <m.capitani@nextworks.it> | 2017-04-11 17:44:47 +0200 |
---|---|---|
committer | Marco Capitani <m.capitani@nextworks.it> | 2017-04-11 17:44:47 +0200 |
commit | 74da97b351c2de9ae1e74faec871927a92f9c6f6 (patch) | |
tree | 28a62564280dd1f4654b674a2ed98d61dad472a5 /examples/resilient-square.py | |
parent | 662c33bf7ce9ddf3bcc77f7d5f51c958d2b837ad (diff) | |
download | rumba-74da97b351c2de9ae1e74faec871927a92f9c6f6.tar.gz rumba-74da97b351c2de9ae1e74faec871927a92f9c6f6.zip |
Added Testing scripts and demonstrator conf to rumba converter
Diffstat (limited to 'examples/resilient-square.py')
-rw-r--r-- | examples/resilient-square.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/resilient-square.py b/examples/resilient-square.py new file mode 100644 index 0000000..82d5389 --- /dev/null +++ b/examples/resilient-square.py @@ -0,0 +1,48 @@ +#!/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 + +shim700 = ShimEthDIF("shim700", link_speed=100)) +shim400 = ShimEthDIF("shim400", link_speed=100)) +shim500 = ShimEthDIF("shim500", link_speed=100)) +shim600 = ShimEthDIF("shim600", link_speed=1)) +shim300 = ShimEthDIF("shim300", link_speed=100)) + +n1 = NormalDIF("n1") + +c = Node("c", + difs=[400, 500, 700, n1], + dif_registrations={n1: [400, 500, 700]}) + +b = Node("b", + difs=[300, 400, n1], + dif_registrations={n1: [300, 400]}) + +a = Node("a", + difs=[300, 600, 700, n1], + dif_registrations={n1: [300, 600, 700]}) + +d = Node("d", + difs=[500, 600, n1], + dif_registrations={n1: [500, 600]}) + +tb = qemu.Testbed(exp_name = "resilient-square", + 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() |