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/manager.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/manager.py')
-rw-r--r-- | nova/manager.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nova/manager.py b/nova/manager.py index 0e447c7c1..22a42d2d3 100644 --- a/nova/manager.py +++ b/nova/manager.py @@ -55,6 +55,7 @@ This module provides Manager, a base class for managers. import eventlet +from nova import config from nova.db import base from nova import flags from nova.openstack.common import log as logging @@ -63,10 +64,7 @@ from nova.openstack.common.rpc import dispatcher as rpc_dispatcher from nova.scheduler import rpcapi as scheduler_rpcapi from nova import version - -FLAGS = flags.FLAGS - - +CONF = config.CONF LOG = logging.getLogger(__name__) @@ -139,7 +137,7 @@ class Manager(base.Base): def __init__(self, host=None, db_driver=None): if not host: - host = FLAGS.host + host = CONF.host self.host = host self.load_plugins() super(Manager, self).__init__(db_driver) @@ -215,8 +213,8 @@ class Manager(base.Base): def service_config(self, context): config = {} - for key in FLAGS: - config[key] = FLAGS.get(key, None) + for key in CONF: + config[key] = CONF.get(key, None) return config |