From 558504a4b8e7f9d50f554fc4fd0aebb1bcb9f99b Mon Sep 17 00:00:00 2001 From: hadik3r Date: Mon, 27 Jun 2016 17:59:04 +0200 Subject: [PATCH] Add rest api --- src/emuvim/cli/son_emu_cli.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/emuvim/cli/son_emu_cli.py b/src/emuvim/cli/son_emu_cli.py index 842d0a1..24cf5da 100755 --- a/src/emuvim/cli/son_emu_cli.py +++ b/src/emuvim/cli/son_emu_cli.py @@ -13,23 +13,33 @@ """ import sys + from emuvim.cli import compute -from emuvim.cli import network from emuvim.cli import datacenter from emuvim.cli import monitor +from emuvim.cli import network +from emuvim.cli.rest import compute as restcom +from emuvim.cli.rest import datacenter as restdc + + def main(): if len(sys.argv) < 2: print("Usage: son-emu-cli ") exit(0) - if sys.argv[1] == "compute": + if sys.argv[1] == "compute-zapi": compute.main(sys.argv[2:]) - elif sys.argv[1] == "network": + elif sys.argv[1] == "network-zapi": network.main(sys.argv[2:]) - elif sys.argv[1] == "datacenter": + elif sys.argv[1] == "datacenter-zapi": datacenter.main(sys.argv[2:]) - elif sys.argv[1] == "monitor": + elif sys.argv[1] == "monitor-zapi": monitor.main(sys.argv[2:]) + elif sys.argv[1] == "compute": + restcom.main(sys.argv[2:]) + elif sys.argv[1] == "datacenter": + restdc.main(sys.argv[2:]) + if __name__ == '__main__': main() -- 2.25.1