#!/usr/bin/python
"""
 Simple CLI client to interact with a running emulator.

 (c) 2016 by Manuel Peuster <manuel.peuster@upb.de>

 The CLI offers different tools, e.g., compute, network, ...
 Each of these tools is implemented as an independent Python
 module.

 cli compute start dc1 my_name flavor_a
 cli network create dc1 11.0.0.0/24
"""

import sys
from emuvim.cli import compute
from emuvim.cli import network
from emuvim.cli import datacenter
from emuvim.cli import monitor

def main():
    if len(sys.argv) < 2:
        print("Usage: son-emu-cli <toolname> <arguments>")
        exit(0)
    if sys.argv[1] == "compute":
        compute.main(sys.argv[2:])
    elif sys.argv[1] == "network":
        network.main(sys.argv[2:])
    elif sys.argv[1] == "datacenter":
        datacenter.main(sys.argv[2:])
    elif sys.argv[1] == "monitor":
        monitor.main(sys.argv[2:])

if __name__ == '__main__':
    main()

@@ -349,16 +349,17 @@
 ort sys%0A
+%0A
 from emu
@@ -385,39 +385,8 @@
 ute%0A
-from emuvim.cli import network%0A
 from
@@ -446,16 +446,145 @@
 monitor%0A
+from emuvim.cli import network%0Afrom emuvim.cli.rest import compute as restcom%0Afrom emuvim.cli.rest import datacenter as restdc%0A%0A%0A
 %0Adef mai
@@ -719,16 +719,21 @@
 %22compute
+-zapi
 %22:%0A     
@@ -794,16 +794,21 @@
 %22network
+-zapi
 %22:%0A     
@@ -872,16 +872,21 @@
 tacenter
+-zapi
 %22:%0A     
@@ -950,16 +950,21 @@
 %22monitor
+-zapi
 %22:%0A     
@@ -993,16 +993,159 @@
 gv%5B2:%5D)%0A
+    elif sys.argv%5B1%5D == %22compute%22:%0A        restcom.main(sys.argv%5B2:%5D)%0A    elif sys.argv%5B1%5D == %22datacenter%22:%0A        restdc.main(sys.argv%5B2:%5D)%0A%0A
 %0Aif __na

Add rest api