summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/manager.py
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-11-04 21:32:51 +0000
committerMark McLoughlin <markmc@redhat.com>2012-11-04 22:33:01 +0000
commit7931f9a2a556bf38e19f501cac345264ff771d5c (patch)
tree53c74d6ba844bd787670ec113239864e289b9cf9 /nova/scheduler/manager.py
parent8ce58defbe560b1da34d991b38ac64a9b4c8d654 (diff)
downloadnova-7931f9a2a556bf38e19f501cac345264ff771d5c.tar.gz
nova-7931f9a2a556bf38e19f501cac345264ff771d5c.tar.xz
nova-7931f9a2a556bf38e19f501cac345264ff771d5c.zip
Switch from FLAGS to CONF in nova.scheduler
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: Ia3f66aec300fd88e91cef926da735f9e95aa2cc2
Diffstat (limited to 'nova/scheduler/manager.py')
-rw-r--r--nova/scheduler/manager.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py
index 531c54726..77f5a0259 100644
--- a/nova/scheduler/manager.py
+++ b/nova/scheduler/manager.py
@@ -26,6 +26,7 @@ import sys
from nova.compute import rpcapi as compute_rpcapi
from nova.compute import utils as compute_utils
from nova.compute import vm_states
+from nova import config
import nova.context
from nova import db
from nova import exception
@@ -46,8 +47,8 @@ scheduler_driver_opt = cfg.StrOpt('scheduler_driver',
default='nova.scheduler.filter_scheduler.FilterScheduler',
help='Default driver to use for the scheduler')
-FLAGS = flags.FLAGS
-FLAGS.register_opt(scheduler_driver_opt)
+CONF = config.CONF
+CONF.register_opt(scheduler_driver_opt)
QUOTAS = quota.QUOTAS
@@ -59,7 +60,7 @@ class SchedulerManager(manager.Manager):
def __init__(self, scheduler_driver=None, *args, **kwargs):
if not scheduler_driver:
- scheduler_driver = FLAGS.scheduler_driver
+ scheduler_driver = CONF.scheduler_driver
self.driver = importutils.import_object(scheduler_driver)
super(SchedulerManager, self).__init__(*args, **kwargs)