diff options
author | Mark McLoughlin <markmc@redhat.com> | 2012-11-17 22:50:17 +0000 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2012-11-20 00:00:21 +0000 |
commit | 94d87bce212f91c54370784a5544f1a07625938a (patch) | |
tree | cfc91dedd5f26f53b3824603763bc63878607d1e /nova/tests/scheduler | |
parent | e60d593b5ec254bb74fca39db7164f57db90be47 (diff) | |
download | nova-94d87bce212f91c54370784a5544f1a07625938a.tar.gz nova-94d87bce212f91c54370784a5544f1a07625938a.tar.xz nova-94d87bce212f91c54370784a5544f1a07625938a.zip |
Remove nova.config.CONF
Modules import nova.config for two reasons right now - firstly, to
reference nova.config.CONF and, secondly, if they use one of the
options defined in nova.config.
Often modules import nova.openstack.common.cfg and nova.config
which is a bit pointless since they could just use cfg.CONF if
they just want to nova.config in order to reference CONF.
Let's just use cfg.CONF everywhere and we can explicitly state
where we actually require options defined in nova.config.
Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
Diffstat (limited to 'nova/tests/scheduler')
-rw-r--r-- | nova/tests/scheduler/test_host_filters.py | 3 | ||||
-rw-r--r-- | nova/tests/scheduler/test_least_cost.py | 3 | ||||
-rw-r--r-- | nova/tests/scheduler/test_rpcapi.py | 3 | ||||
-rw-r--r-- | nova/tests/scheduler/test_scheduler.py | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/nova/tests/scheduler/test_host_filters.py b/nova/tests/scheduler/test_host_filters.py index 84667eb9e..a052757e8 100644 --- a/nova/tests/scheduler/test_host_filters.py +++ b/nova/tests/scheduler/test_host_filters.py @@ -22,6 +22,7 @@ from nova import config from nova import context from nova import db from nova import exception +from nova.openstack.common import cfg from nova.openstack.common import jsonutils from nova.scheduler import filters from nova.scheduler.filters import extra_specs_ops @@ -30,7 +31,7 @@ from nova import test from nova.tests.scheduler import fakes from nova import utils -CONF = config.CONF +CONF = cfg.CONF DATA = '' diff --git a/nova/tests/scheduler/test_least_cost.py b/nova/tests/scheduler/test_least_cost.py index f8ed20b43..d159d8f4c 100644 --- a/nova/tests/scheduler/test_least_cost.py +++ b/nova/tests/scheduler/test_least_cost.py @@ -15,7 +15,6 @@ """ Tests For Least Cost functions. """ -from nova import config from nova import context from nova.openstack.common import cfg from nova.scheduler import weights @@ -33,7 +32,7 @@ test_least_cost_opts = [ help='How much weight to give the fake_weigher2 function'), ] -CONF = config.CONF +CONF = cfg.CONF CONF.import_opt('least_cost_functions', 'nova.scheduler.weights.least_cost') CONF.import_opt('compute_fill_first_cost_fn_weight', 'nova.scheduler.weights.least_cost') diff --git a/nova/tests/scheduler/test_rpcapi.py b/nova/tests/scheduler/test_rpcapi.py index 05a792a53..bb6465d3c 100644 --- a/nova/tests/scheduler/test_rpcapi.py +++ b/nova/tests/scheduler/test_rpcapi.py @@ -20,11 +20,12 @@ Unit Tests for nova.scheduler.rpcapi from nova import config from nova import context +from nova.openstack.common import cfg from nova.openstack.common import rpc from nova.scheduler import rpcapi as scheduler_rpcapi from nova import test -CONF = config.CONF +CONF = cfg.CONF class SchedulerRpcAPITestCase(test.TestCase): diff --git a/nova/tests/scheduler/test_scheduler.py b/nova/tests/scheduler/test_scheduler.py index 76d438f2e..78f2c7b9e 100644 --- a/nova/tests/scheduler/test_scheduler.py +++ b/nova/tests/scheduler/test_scheduler.py @@ -26,7 +26,6 @@ from nova.compute import power_state 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 from nova import context from nova import db from nova import exception |