From: peusterm Date: Thu, 15 Jun 2017 12:27:46 +0000 (+0200) Subject: Better help for son-emu-cli X-Git-Tag: v3.1~20^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=68aaedbd06766e156b5ffd2b351de0fc818ee6ad;p=osm%2Fvim-emu.git Better help for son-emu-cli --- diff --git a/src/emuvim/cli/son_emu_cli.py b/src/emuvim/cli/son_emu_cli.py index c45a5f1..0223818 100755 --- a/src/emuvim/cli/son_emu_cli.py +++ b/src/emuvim/cli/son_emu_cli.py @@ -43,11 +43,19 @@ from emuvim.cli.rest import datacenter as restdc from emuvim.cli.rest import monitor as restmon from emuvim.cli.rest import network as restnetw +def help(): + print("Missing arguments.\n") + print("Usage: son-emu-cli compute|datacenter|network|monitor \n") + print("Get more help:") + print("\tson-emu-cli compute --help") + print("\tson-emu-cli datacenter --help") + print("\tson-emu-cli network --help") + print("\tson-emu-cli monitor --help") + exit(0) def main(): if len(sys.argv) < 2: - print("Usage: son-emu-cli compute|datacenter|network|monitor ") - exit(0) + help() elif sys.argv[1] == "monitor": restmon.main(sys.argv[2:]) elif sys.argv[1] == "network": @@ -56,6 +64,8 @@ def main(): restcom.main(sys.argv[2:]) elif sys.argv[1] == "datacenter": restdc.main(sys.argv[2:]) + else: + help() if __name__ == '__main__':