You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Jason Bausewein <ja...@tier3.com> on 2012/06/22 20:27:38 UTC

patch for marvin configGenerator.py

Thank you for applying my last patch.  I started using the tools/marvin/marvin directory.

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.

Thanks,
Jason

diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py
index aec253b..1e84f90 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)

RE: patch for marvin configGenerator.py

Posted by Edison Su <Ed...@citrix.com>.
Applied, thanks!
BTW, better to write your own test configuration by importing configGenerator, other than modify configGenerator itself, if the default configuration is not fulfill with your test plan.
You are welcome to add more test cases/plans/configurations into Cloudstack. 
 

> -----Original Message-----
> From: Jason Bausewein [mailto:jason.bausewein@tier3.com]
> Sent: Friday, June 22, 2012 11:28 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: patch for marvin configGenerator.py
> 
> Thank you for applying my last patch.  I started using the
> tools/marvin/marvin directory.
> 
> 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.
> 
> Thanks,
> Jason
> 
> diff --git a/tools/marvin/marvin/configGenerator.py
> b/tools/marvin/marvin/configGenerator.py
> index aec253b..1e84f90 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)