aboutsummaryrefslogtreecommitdiff
path: root/examples/square.py
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-03-01 11:02:25 +0100
committerDimitri Staessens <dimitri@ouroboros.rocks>2026-03-07 11:29:02 +0100
commit6cbcfb039e608419bd6ced673723918aca6fb278 (patch)
tree172061d95f50cda09c3872d32c5f77e459044cd8 /examples/square.py
parent4e35c6b445d0cfbad9cf15a48f2d341e29dbd806 (diff)
downloadrumba-6cbcfb039e608419bd6ced673723918aca6fb278.tar.gz
rumba-6cbcfb039e608419bd6ced673723918aca6fb278.zip
rumba: Remove irati/rlite, python2 and qemu support
Remove IRATI and rlite prototype plugins, keeping only Ouroboros. Delete .gitlab-ci.yml (only contained an irati test job and a Sphinx pages job). Clean up all irati/rlite imports and references from examples, documentation, and tools. Qemu was tied heavily with rlite and irati. As it's less useful for ouroboros it's removed rather than reworked. Updated README.md and AUTHORS Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Diffstat (limited to 'examples/square.py')
-rwxr-xr-xexamples/square.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/examples/square.py b/examples/square.py
new file mode 100755
index 0000000..ce5cc41
--- /dev/null
+++ b/examples/square.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+
+# An example script using the rumba package
+
+from rumba.model import *
+from rumba.utils import ExperimentManager
+
+# import testbed plugins
+import rumba.testbeds.local as local
+
+# import prototype plugins
+import rumba.prototypes.ouroboros as our
+
+import rumba.log as log
+
+log.set_logging_level('DEBUG')
+
+
+n01 = UnicastLayer("n01")
+n01.add_policy("routing", "ecmp")
+
+e01 = EthDixLayer("e01")
+e02 = EthDixLayer("e02")
+e03 = EthDixLayer("e03")
+e04 = EthDixLayer("e04")
+
+
+a = Node("a",
+ layers = [n01, e01, e02],
+ registrations = {n01 : [e01, e02]})
+
+b = Node("b",
+ layers = [n01, e02, e03],
+ registrations = {n01 : [e02, e03]})
+
+c = Node("c",
+ layers = [n01, e03, e04],
+ registrations = {n01 : [e03, e04]})
+
+d = Node("d",
+ layers = [n01, e01, e04],
+ registrations = {n01 : [e01, e04]})
+
+tb = local.Testbed(exp_name = "square")
+
+exp = our.Experiment(tb, nodes = [a, b, c, d])
+
+print(exp)
+
+with ExperimentManager(exp, swap_out_strategy=PROMPT_SWAPOUT):
+ exp.swap_in()
+ exp.bootstrap_prototype()