aboutsummaryrefslogtreecommitdiff
path: root/examples/vpn.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/vpn.py')
-rwxr-xr-xexamples/vpn.py35
1 files changed, 14 insertions, 21 deletions
diff --git a/examples/vpn.py b/examples/vpn.py
index 6aa8db6..8aac916 100755
--- a/examples/vpn.py
+++ b/examples/vpn.py
@@ -6,46 +6,39 @@ from rumba.model import *
from rumba.utils import ExperimentManager
# import testbed plugins
-import rumba.testbeds.emulab as emulab
-import rumba.testbeds.jfed as jfed
import rumba.testbeds.local as local
-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
import rumba.log as log
log.set_logging_level('DEBUG')
-n1 = NormalDIF("n1")
-n2 = NormalDIF("n2")
-e1 = ShimEthDIF("e1")
-e2 = ShimEthDIF("e2")
-e3 = ShimEthDIF("e3")
+n1 = UnicastLayer("n1")
+n2 = UnicastLayer("n2")
+e1 = EthDixLayer("e1")
+e2 = EthDixLayer("e2")
+e3 = EthDixLayer("e3")
a = Node("a",
- difs = [e1, n1, n2],
- dif_registrations = {n1 : [e1], n2 : [n1]})
+ layers = [e1, n1, n2],
+ registrations = {n1 : [e1], n2 : [n1]})
b = Node("b",
- difs = [e1, e2, n1],
- dif_registrations = {n1 : [e1, e2]})
+ layers = [e1, e2, n1],
+ registrations = {n1 : [e1, e2]})
c = Node("c",
- difs = [e2, e3, n1],
- dif_registrations = {n1 : [e2, e3]})
+ layers = [e2, e3, n1],
+ registrations = {n1 : [e2, e3]})
d = Node("d",
- difs = [e3, n1, n2],
- dif_registrations = {n1 : [e3], n2 : [n1]})
+ layers = [e3, n1, n2],
+ registrations = {n1 : [e3], n2 : [n1]})
-tb = qemu.Testbed(exp_name = 'example1',
- username = 'root',
- password = 'root')
+tb = local.Testbed(exp_name="example1")
exp = our.Experiment(tb, nodes = [a, b, c, d])