aboutsummaryrefslogtreecommitdiff
path: root/examples/script-example.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/script-example.py')
-rwxr-xr-xexamples/script-example.py50
1 files changed, 24 insertions, 26 deletions
diff --git a/examples/script-example.py b/examples/script-example.py
index 6cfaf42..e99ce78 100755
--- a/examples/script-example.py
+++ b/examples/script-example.py
@@ -6,59 +6,57 @@ from functools import partial
from rumba.storyboard import *
from rumba.model import *
import rumba.log as log
-import rumba.testbeds.qemu as qemu
-import rumba.prototypes.rlite as rl
+import rumba.testbeds.local as local
+import rumba.prototypes.ouroboros as our
from rumba.utils import ExperimentManager
import rumba.utils as utils
log.set_logging_level(log.DEBUG)
-n1 = NormalDIF("n1")
+n1 = UnicastLayer("n1")
n1.add_policy("rmt.pff", "lfa")
n1.add_policy("security-manager", "passwd")
-e1 = ShimEthDIF("e1")
+e1 = EthDixLayer("e1")
node_a = Node("node_a",
- difs=[n1, e1],
- dif_registrations={n1: [e1]})
+ layers=[n1, e1],
+ registrations={n1: [e1]})
node_b = Node("node_b",
- difs=[e1, n1],
- dif_registrations={n1: [e1]})
+ layers=[e1, n1],
+ registrations={n1: [e1]})
-tb = qemu.Testbed(exp_name="script_test",
- username="root",
- password="root")
+tb = local.Testbed(exp_name="script_test")
-exp = rl.Experiment(tb, nodes=[node_a, node_b])
+exp = our.Experiment(tb, nodes=[node_a, node_b])
client_a = Client(
- "rinaperf",
- options="-t perf -s 1000 -D <duration>",
+ "operf",
+ options="-d <duration> -s 1000",
shutdown="",
- c_id='rinaperf_a'
+ c_id='operf_a'
)
client_b = Client(
- "rinaperf",
- options="-t perf -s 1000 -D <duration> -z rinaperfb",
+ "operf",
+ options="-d <duration> -s 1000 -n operfb",
shutdown="",
- c_id='rinaperf_b'
+ c_id='operf_b'
)
client_c = Client(
- "rinaperf",
- options="-t perf -s 1000 -D <duration> -z rinaperfc",
+ "operf",
+ options="-d <duration> -s 1000 -n operfc",
shutdown="",
- c_id='rinaperf_c'
+ c_id='operf_c'
)
server_a = Server(
- "rinaperf",
+ "operf",
options="-l",
arrival_rate=1,
mean_duration=5,
@@ -67,8 +65,8 @@ server_a = Server(
)
server_b = Server(
- "rinaperf",
- options="-l -z rinaperfb",
+ "operf",
+ options="-l -n operfb",
arrival_rate=0.5,
mean_duration=10,
clients=[client_b],
@@ -76,8 +74,8 @@ server_b = Server(
)
server_c = Server(
- "rinaperf",
- options="-l -z rinaperfc",
+ "operf",
+ options="-l -n operfc",
arrival_rate=1.6,
mean_duration=3,
clients=[client_c],