From 2b155aa25a2f61ad9bb84c273781a0597c6cef76 Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Tue, 11 Apr 2017 17:44:47 +0200 Subject: Added Testing scripts and demonstrator conf to rumba converter --- examples/insane-stacking.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 examples/insane-stacking.py (limited to 'examples/insane-stacking.py') diff --git a/examples/insane-stacking.py b/examples/insane-stacking.py new file mode 100644 index 0000000..4a2f4e3 --- /dev/null +++ b/examples/insane-stacking.py @@ -0,0 +1,42 @@ +#!/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") +n2 = NormalDIF("n2") +n3 = NormalDIF("n3") +n5 = NormalDIF("n5") +n7 = NormalDIF("n7") +n4 = NormalDIF("n4") +n6 = NormalDIF("n6") + +a = Node("a", + difs=[300, n1, n2, n3, n4, n5, n6, n7], + dif_registrations={n1: [300], n2: [n1], n3: [n2], n5: [n4], n7: [n6], n4: [n3], n6: [n5]}) + +b = Node("b", + difs=[300, n1, n2, n3, n4, n5, n6, n7], + dif_registrations={n1: [300], n2: [n1], n3: [n2], n5: [n4], n7: [n6], n4: [n3], n6: [n5]}) + +tb = qemu.Testbed(exp_name = "insane-stacking", + 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() -- cgit v1.2.3