aboutsummaryrefslogtreecommitdiff
path: root/examples/example.py
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-05-09 11:50:17 +0200
committerSander Vrijders <[email protected]>2017-05-09 11:50:17 +0200
commita34a5d7ec2e6aa59a0a0aa0daba62f7738a1749a (patch)
tree1b362bf2bb2bfda4eb32bdf46dcd3e4e546eab22 /examples/example.py
parentbf9a98603c8fc8dd8f15a7d54ffb2111fc6428a9 (diff)
downloadrumba-a34a5d7ec2e6aa59a0a0aa0daba62f7738a1749a.tar.gz
rumba-a34a5d7ec2e6aa59a0a0aa0daba62f7738a1749a.zip
rumba: model: Add StoryBoard for automated testing
This adds an initial draft of the API to automate tests on a RINA network.
Diffstat (limited to 'examples/example.py')
-rwxr-xr-xexamples/example.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/example.py b/examples/example.py
index 56193c2..383dbf1 100755
--- a/examples/example.py
+++ b/examples/example.py
@@ -17,7 +17,6 @@ import rumba.prototypes.irati as irati
import rumba.log as log
-
log.set_logging_level('DEBUG')
n1 = NormalDIF("n1", policies = {"rmt.pff": "lfa",
@@ -27,19 +26,16 @@ e1 = ShimEthDIF("e1")
a = Node("a",
difs = [n1, e1],
- dif_registrations = {n1 : [e1]},
- registrations = {"a.crap" : [n1]},
- bindings = {"a.crap" : "/usr/bin/crap"})
+ dif_registrations = {n1 : [e1]})
b = Node("b",
difs = [e1, n1],
- dif_registrations = {n1 : [e1]})
+ dif_registrations = {n1 : [e1]},
+ end_user = True)
-tb = qemu.Testbed(exp_name = "example1",
- username = "root",
- password = "root",
- bzimage = '/home/vmaffione/git/rlite/demo/buildroot/bzImage',
- initramfs = '/home/vmaffione/git/rlite/demo/buildroot/rootfs.cpio')
+tb = jfed.Testbed(exp_name = "example1",
+ username = "user1",
+ cert_file = "/home/user1/cert.pem")
exp = rl.Experiment(tb, nodes = [a, b])
@@ -48,5 +44,9 @@ print(exp)
try:
exp.swap_in()
exp.bootstrap_prototype()
+ c1 = Client("rinaperf", options = "-t perf -s 1000 -c 10000")
+ s1 = Server("rinaperf", options = "-l", nodes = [a], clients = [c1])
+ sb = StoryBoard(exp, 3600, servers = [s1])
+ sb.start()
finally:
exp.swap_out()