From 8dd4197cd89993929071b2de0d2d5ec4fecd13a2 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Fri, 22 Jun 2012 13:19:04 -0700 Subject: [PATCH] From: Jason Bausewein [jason.bausewein@tier3.com] I would like to add an command line option to choose between advanced or basic networking configuration. This would allow me or others to choose advanced networking without having to edit the python code. --- tools/marvin/marvin/configGenerator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py index aec253b73a2..1e84f900573 100644 --- a/tools/marvin/marvin/configGenerator.py +++ b/tools/marvin/marvin/configGenerator.py @@ -389,8 +389,14 @@ def get_setup_config(file): if __name__ == "__main__": parser = OptionParser() + parser.add_option("-a", "--advanced", action="store_true", default=False, dest="advanced", help="use advanced networking") parser.add_option("-o", "--output", action="store", default="./datacenterCfg", dest="output", help="the path where the json config file generated, by default is ./datacenterCfg") (options, args) = parser.parse_args() - config = describe_setup_in_basic_mode() + + if options.advanced: + config = describe_setup_in_advanced_mode() + else: + config = describe_setup_in_basic_mode() + generate_setup_config(config, options.output)