blob: 771049bd23054b2a885873e67d6470fb548425f1 [file] [log] [blame]
peusterm9c252b62016-01-06 16:59:53 +01001"""
2 For now only a dummy client. Connects to the zerorpc interface of the
3 emulator and performs some actions (start/stop/list).
4"""
5import time
6import zerorpc
7
8
9def main():
10 print "Example CLI client"
11 # create connection to remote Mininet instance
12 c = zerorpc.Client()
13 c.connect("tcp://127.0.0.1:4242")
14
15 # do some API tests
16 print c.compute_action_start("dc2", "my_new_container1")
17
18 time.sleep(5)
19
20 print c.compute_action_stop("dc2", "my_new_container1")
21
22
23if __name__ == '__main__':
24 main()