diff options
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/script-example.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/script-example.py b/examples/script-example.py index 5e14823..6cfaf42 100755 --- a/examples/script-example.py +++ b/examples/script-example.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # An example script leveraging the storyboard scripting functionality +from functools import partial from rumba.storyboard import * from rumba.model import * @@ -83,6 +84,11 @@ server_c = Server( s_id='server_c' ) +typewriter = Client( + "touch test_file", + shutdown="" +) + if __name__ == '__main__': story = StoryBoard(30) @@ -98,6 +104,11 @@ if __name__ == '__main__': 'example-script.rsb' ) story.parse_script_file(script_file) + cb = partial(story.run_command, node_a, "ls -l test_file") + # This will return a file, because it will run after + # Triggering_event + action = partial(story.run_client, typewriter, 0.2, node=node_a, callback=cb) + story.add_event(Event(action, ev_time=12, ev_id='Triggering_event')) log.flush_log() with ExperimentManager(exp): exp.swap_in() |