From cce1c217eb39998c5390d37ba61f2c7f0056b25e Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Tue, 21 Feb 2012 20:50:08 +0800 Subject: Nova options tool enhancements Fixes bug #936898 1. Just import the modules and only look at nova.flags.FLAGS when they're all imported 2. ConfigOpts is iterable, there should be no need to iterate the private FLAGS._opts dict 3. Output should be .ini style 4. The output should only contain comments i.e. each option default should be commented out Change-Id: I15835bb437bc6d575e8311d7c55b3a29d67b006d --- nova/flags.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova') diff --git a/nova/flags.py b/nova/flags.py index 42169eafd..fb7b57cd8 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -44,6 +44,10 @@ class NovaConfigOpts(cfg.CommonConfigOpts): with flagfile.handle_flagfiles_managed(argv[1:]) as args: return argv[:1] + super(NovaConfigOpts, self).__call__(args) + def retrieve_opt(self, opt_name, group=None): + return self._get_opt_info(opt_name, group) + + FLAGS = NovaConfigOpts() -- cgit