X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fcli%2Fson-emu-cli;fp=src%2Femuvim%2Fcli%2Fson-emu-cli;h=61cbd43824345c0f0235bde6893374198be4da4a;hb=3eef9fde234a4379d80e0435bac9ce650407a895;hp=0000000000000000000000000000000000000000;hpb=a38de012a7a59661484805036eb9cce3c5cddf16;p=osm%2Fvim-emu.git diff --git a/src/emuvim/cli/son-emu-cli b/src/emuvim/cli/son-emu-cli new file mode 100755 index 0000000..61cbd43 --- /dev/null +++ b/src/emuvim/cli/son-emu-cli @@ -0,0 +1,35 @@ +#!/usr/bin/python +""" + Simple CLI client to interact with a running emulator. + + (c) 2016 by Manuel Peuster + + 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 +import compute +import network +import datacenter +import monitor + +def main(): + if len(sys.argv) < 2: + print "Usage: son-emu-cli " + 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()