aboutsummaryrefslogtreecommitdiff
path: root/examples/rumba_example.py
blob: 2027ffaa22b1aa85627825a3f2c7defcc886dcdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from rumba.model import Node, UnicastLayer, EthDixLayer
from rumba.topologies import build_star

# import testbed plugins
import rumba.testbeds.local as local

# import Ouroboros prototype plugin
import rumba.prototypes.ouroboros as our

__all__ = ["exp", "nodes"]

n1 = UnicastLayer("n1")

leaves, routerNode = build_star(
    ["client1", "client2", "server"], n1, hub_name="router")
clientNode1, clientNode2, serverNode = leaves

nodes = ["client1", "client2", "router", "server"]

tb = local.Testbed()
exp = our.Experiment(tb,
                     nodes=[clientNode1, clientNode2,
                            routerNode, serverNode])