From a123865fa20ac610530c005a9df583694967d250 Mon Sep 17 00:00:00 2001 From: pierventre Date: Tue, 31 Oct 2017 19:12:12 +0100 Subject: [PATCH] Adds no-cli param --- mininet_deployer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mininet_deployer.py b/mininet_deployer.py index 41bb9ce..05f756e 100755 --- a/mininet_deployer.py +++ b/mininet_deployer.py @@ -246,11 +246,10 @@ def topo(topology): my_info = net.start() store_overall_info(my_info) - if tf_version == 1: + if not no_cli: CLI(net) net.stop() - def store_overall_info(my_info): stro = json.dumps(my_info) @@ -270,6 +269,7 @@ def parse_cmd_line(): parser.add_argument('--nodeinfo', dest='nodeInfo', action='store', default= DEFAULT_OVERALL_INFO_FILE, help='file that stores the node info to be processed by node.js') parser.add_argument('--version', dest='version', action='store', default=1, help='topology format version') parser.add_argument('--stop-all', dest='clean_all',action='store_true', help='Clean all mininet environment') + parser.add_argument('--no-cli', dest='no_cli',action='store_true', help='Do not show Mininet CLI') args = parser.parse_args() @@ -284,8 +284,10 @@ def parse_cmd_line(): global overall_info_file global tf_version + global no_cli tf_version = args.version overall_info_file = args.nodeInfo + no_cli = args.no_cli return (topo_data) if __name__ == '__main__':