diff options
author | Mark McLoughlin <markmc@redhat.com> | 2012-11-04 21:32:45 +0000 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2012-11-04 21:46:35 +0000 |
commit | 637e805634b5179ffacad57ee26d4175449537f5 (patch) | |
tree | c0ff2f32d3f2957ae7b96a2eedc35b0029917048 /nova/wsgi.py | |
parent | 8ce58defbe560b1da34d991b38ac64a9b4c8d654 (diff) | |
download | nova-637e805634b5179ffacad57ee26d4175449537f5.tar.gz nova-637e805634b5179ffacad57ee26d4175449537f5.tar.xz nova-637e805634b5179ffacad57ee26d4175449537f5.zip |
Switch from FLAGS to CONF in misc modules
Use the global CONF variable instead of FLAGS. This is purely a cleanup
since FLAGS is already just another reference to CONF.
We leave the nova.flags imports until a later cleanup commit since
removing them may cause unpredictable problems due to config options not
being registered.
Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
Diffstat (limited to 'nova/wsgi.py')
-rw-r--r-- | nova/wsgi.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nova/wsgi.py b/nova/wsgi.py index 0aee50ea7..b8880dfde 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -30,6 +30,7 @@ import routes.middleware import webob.dec import webob.exc +from nova import config from nova import exception from nova import flags from nova.openstack.common import cfg @@ -44,8 +45,8 @@ wsgi_opts = [ 'into it: client_ip, date_time, request_line, status_code, ' 'body_length, wall_seconds.') ] -FLAGS = flags.FLAGS -FLAGS.register_opts(wsgi_opts) +CONF = config.CONF +CONF.register_opts(wsgi_opts) LOG = logging.getLogger(__name__) @@ -95,7 +96,7 @@ class Server(object): protocol=self._protocol, custom_pool=self._pool, log=self._wsgi_logger, - log_format=FLAGS.wsgi_log_format) + log_format=CONF.wsgi_log_format) def stop(self): """Stop this server. @@ -362,11 +363,11 @@ class Loader(object): :returns: None """ - config_path = config_path or FLAGS.api_paste_config + config_path = config_path or CONF.api_paste_config if os.path.exists(config_path): self.config_path = config_path else: - self.config_path = FLAGS.find_file(config_path) + self.config_path = CONF.find_file(config_path) if not self.config_path: raise exception.ConfigNotFound(path=config_path) |