From 134eae6b986709a6524afa1e1f18527cbe900eea Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Mon, 23 Oct 2017 14:14:17 +0200 Subject: 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 --- examples/example.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') 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() -- cgit v1.2.3