cleanup monitoring commands
[osm/vim-emu.git] / src / emuvim / cli / son_emu_cli.py
1 #!/usr/bin/python
2 """
3 Simple CLI client to interact with a running emulator.
4
5 (c) 2016 by Manuel Peuster <manuel.peuster@upb.de>
6
7 The CLI offers different tools, e.g., compute, network, ...
8 Each of these tools is implemented as an independent Python
9 module.
10
11 cli compute start dc1 my_name flavor_a
12 cli network create dc1 11.0.0.0/24
13 """
14
15 import sys
16 from emuvim.cli import compute
17 from emuvim.cli import network
18 from emuvim.cli import datacenter
19 from emuvim.cli import monitor
20
21 def main():
22 if len(sys.argv) < 2:
23 print("Usage: son-emu-cli <toolname> <arguments>")
24 exit(0)
25 if sys.argv[1] == "compute":
26 compute.main(sys.argv[2:])
27 elif sys.argv[1] == "network":
28 network.main(sys.argv[2:])
29 elif sys.argv[1] == "datacenter":
30 datacenter.main(sys.argv[2:])
31 elif sys.argv[1] == "monitor":
32 monitor.main(sys.argv[2:])
33
34 if __name__ == '__main__':
35 main()