diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-05-29 08:57:58 +0100 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-05-30 21:24:53 +0100 |
| commit | 00786bc554a2dfacb3c6f02fbb7e9c98f35d4262 (patch) | |
| tree | 93cc4a0cd0af8a9db30eb5fa02365f0f01207627 /nova/utils.py | |
| parent | d7e613dabc2dbc28d9405a5b450dc2b4dfa9d47b (diff) | |
Use cfg's new global CONF object
Implements blueprint cfg-global-object
Replace nova.flags.FLAGS with openstack.common.cfg.CONF.
In future, we can do a s/FLAGS/CONF/ across the codebase.
Change-Id: Ib293873089a5399febd7a3b0410f66e9bef115f1
Diffstat (limited to 'nova/utils.py')
| -rw-r--r-- | nova/utils.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/nova/utils.py b/nova/utils.py index 46118a718..d194695ab 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -284,27 +284,6 @@ def novadir(): return os.path.abspath(nova.__file__).split('nova/__init__.py')[0] -def default_cfgfile(filename='nova.conf', args=None): - if args is None: - args = sys.argv - for arg in args: - if arg.find('config-file') != -1: - return arg[arg.index('config-file') + len('config-file') + 1:] - else: - if not os.path.isabs(filename): - # turn relative filename into an absolute path - script_dir = os.path.dirname(inspect.stack()[-1][1]) - filename = os.path.abspath(os.path.join(script_dir, filename)) - if not os.path.exists(filename): - filename = "./nova.conf" - if not os.path.exists(filename): - filename = '/etc/nova/nova.conf' - if os.path.exists(filename): - cfgfile = '--config-file=%s' % filename - args.insert(1, cfgfile) - return filename - - def debug(arg): LOG.debug(_('debug in callback: %s'), arg) return arg |
