diff options
author | Marco Capitani <m.capitani@nextworks.it> | 2017-10-23 14:14:17 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-11-17 15:17:30 +0000 |
commit | 134eae6b986709a6524afa1e1f18527cbe900eea (patch) | |
tree | 642b300eb0f6e785ec52334995a517f95f7f784d /examples | |
parent | c884a5b8c1e2a2f4d610cae7b9aa547b95424210 (diff) | |
download | rumba-134eae6b986709a6524afa1e1f18527cbe900eea.tar.gz rumba-134eae6b986709a6524afa1e1f18527cbe900eea.zip |
storyboard: decouple from experiment
+ Node no longer has "client" attribute
+ Client has a "nodes" attribute instead
+ servers, server nodes and the experiment can be added
to a storyboard after instantiation to allow reuse of a SB
+ moved storyboard machinery to a separate module rumba.storyboard
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/example.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/example.py b/examples/example.py index dd18a07..8d17ff2 100755 --- a/examples/example.py +++ b/examples/example.py @@ -4,6 +4,7 @@ from rumba.model import * from rumba.utils import ExperimentManager +from rumba.storyboard import * # import testbed plugins import rumba.testbeds.emulab as emulab @@ -34,8 +35,7 @@ a = Node("a", b = Node("b", difs = [e1, n1], - dif_registrations = {n1 : [e1]}, - client = True) + dif_registrations = {n1 : [e1]}) tb = jfed.Testbed(exp_name = "example1", username = "user1", @@ -48,8 +48,8 @@ print(exp) with ExperimentManager(exp): exp.swap_in() exp.bootstrap_prototype() - c1 = Client("rinaperf", options ="-t perf -i 1000 -s 1000 -c 0") + c1 = Client("rinaperf", options ="-t perf -s 1000 -c 0", nodes=[b]) s1 = Server("rinaperf", arrival_rate=2, mean_duration=5, options = "-l", nodes = [a], clients = [c1]) - sb = StoryBoard(exp, duration=20, servers = [s1]) + sb = StoryBoard(duration=3600, experiment=exp, servers=[s1]) sb.start() |