diff --git a/nova/api/openstack/compute/floating_ips_bulk.py b/nova/api/openstack/compute/floating_ips_bulk.py index 0e00309c2135..4e7ce40fa3d4 100644 --- a/nova/api/openstack/compute/floating_ips_bulk.py +++ b/nova/api/openstack/compute/floating_ips_bulk.py @@ -26,7 +26,6 @@ from nova.i18n import _ from nova import objects CONF = nova.conf.CONF -CONF.import_opt('default_floating_pool', 'nova.network.floating_ips') ALIAS = 'os-floating-ips-bulk' diff --git a/nova/api/openstack/compute/legacy_v2/contrib/floating_ips_bulk.py b/nova/api/openstack/compute/legacy_v2/contrib/floating_ips_bulk.py index 9a80a9587861..35632c4d6bec 100644 --- a/nova/api/openstack/compute/legacy_v2/contrib/floating_ips_bulk.py +++ b/nova/api/openstack/compute/legacy_v2/contrib/floating_ips_bulk.py @@ -24,7 +24,6 @@ from nova.i18n import _ from nova import objects CONF = nova.conf.CONF -CONF.import_opt('default_floating_pool', 'nova.network.floating_ips') authorize = extensions.extension_authorizer('compute', 'floating_ips_bulk') diff --git a/nova/api/openstack/compute/legacy_v2/contrib/hide_server_addresses.py b/nova/api/openstack/compute/legacy_v2/contrib/hide_server_addresses.py index 507123b79475..b6a9e89e5a12 100644 --- a/nova/api/openstack/compute/legacy_v2/contrib/hide_server_addresses.py +++ b/nova/api/openstack/compute/legacy_v2/contrib/hide_server_addresses.py @@ -15,16 +15,13 @@ """Extension for hiding server addresses in certain states.""" -from oslo_config import cfg - from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.compute import vm_states +import nova.conf -CONF = cfg.CONF -CONF.import_opt('osapi_hide_server_address_states', - 'nova.api.openstack.compute.hide_server_addresses') +CONF = nova.conf.CONF authorize = extensions.soft_extension_authorizer('compute', 'hide_server_addresses') diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py index 3562e87f19f9..dced77c50274 100644 --- a/nova/cmd/manage.py +++ b/nova/cmd/manage.py @@ -87,7 +87,6 @@ from nova import utils from nova import version CONF = nova.conf.CONF -CONF.import_opt('default_floating_pool', 'nova.network.floating_ips') CONF.import_opt('connection', 'oslo_db.options', group='database') QUOTAS = quota.QUOTAS diff --git a/nova/cmd/network.py b/nova/cmd/network.py index 3048cd7aa3b5..d813dd225fbc 100644 --- a/nova/cmd/network.py +++ b/nova/cmd/network.py @@ -35,7 +35,6 @@ from nova import utils from nova import version CONF = nova.conf.CONF -CONF.import_opt('network_topic', 'nova.network.rpcapi') LOG = logging.getLogger('nova.network') diff --git a/nova/network/floating_ips.py b/nova/network/floating_ips.py index 855d87b862d0..fd736f86c425 100644 --- a/nova/network/floating_ips.py +++ b/nova/network/floating_ips.py @@ -40,7 +40,6 @@ LOG = logging.getLogger(__name__) QUOTAS = quota.QUOTAS CONF = nova.conf.CONF -CONF.import_opt('network_topic', 'nova.network.rpcapi') class FloatingIP(object): diff --git a/nova/network/manager.py b/nova/network/manager.py index ff8202d938d2..2d53b6b63918 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -64,7 +64,6 @@ from nova import utils LOG = logging.getLogger(__name__) CONF = nova.conf.CONF -CONF.import_opt('network_topic', 'nova.network.rpcapi') class RPCAllocateFixedIP(object): diff --git a/nova/network/neutronv2/api.py b/nova/network/neutronv2/api.py index f615664466a3..59a5d0ac387c 100644 --- a/nova/network/neutronv2/api.py +++ b/nova/network/neutronv2/api.py @@ -43,7 +43,6 @@ from nova.pci import whitelist as pci_whitelist CONF = nova.conf.CONF -CONF.import_opt('default_floating_pool', 'nova.network.floating_ips') LOG = logging.getLogger(__name__) soft_external_network_attach_authorize = extensions.soft_core_authorizer( diff --git a/nova/tests/functional/api_sample_tests/test_floating_ips.py b/nova/tests/functional/api_sample_tests/test_floating_ips.py index bd4d25d4955d..c838e6e4d685 100644 --- a/nova/tests/functional/api_sample_tests/test_floating_ips.py +++ b/nova/tests/functional/api_sample_tests/test_floating_ips.py @@ -18,7 +18,6 @@ from nova import context from nova.tests.functional.api_sample_tests import api_sample_base CONF = nova.conf.CONF -CONF.import_opt('default_floating_pool', 'nova.network.floating_ips') CONF.import_opt('osapi_compute_extension', 'nova.api.openstack.compute.legacy_v2.extensions') diff --git a/nova/tests/functional/api_sample_tests/test_floating_ips_bulk.py b/nova/tests/functional/api_sample_tests/test_floating_ips_bulk.py index 661e15795f24..154fdf0bf55f 100644 --- a/nova/tests/functional/api_sample_tests/test_floating_ips_bulk.py +++ b/nova/tests/functional/api_sample_tests/test_floating_ips_bulk.py @@ -18,7 +18,6 @@ from nova import context from nova.tests.functional.api_sample_tests import api_sample_base CONF = nova.conf.CONF -CONF.import_opt('default_floating_pool', 'nova.network.floating_ips') CONF.import_opt('osapi_compute_extension', 'nova.api.openstack.compute.legacy_v2.extensions') diff --git a/nova/tests/functional/regressions/test_bug_1558866.py b/nova/tests/functional/regressions/test_bug_1558866.py index 378b629aa894..495e9063f43f 100644 --- a/nova/tests/functional/regressions/test_bug_1558866.py +++ b/nova/tests/functional/regressions/test_bug_1558866.py @@ -14,16 +14,14 @@ import datetime -from oslo_config import cfg - +import nova.conf from nova import test from nova.tests import fixtures as nova_fixtures from nova.tests.functional.api import client as api_client from nova.tests.unit.image import fake as fake_image from nova.tests.unit import policy_fixture -CONF = cfg.CONF -CONF.import_opt('null_kernel', 'nova.compute.api') +CONF = nova.conf.CONF class TestServerGet(test.TestCase): diff --git a/nova/tests/unit/api/openstack/compute/test_cloudpipe.py b/nova/tests/unit/api/openstack/compute/test_cloudpipe.py index b84aaa997cc7..57ae6ef5cbd3 100644 --- a/nova/tests/unit/api/openstack/compute/test_cloudpipe.py +++ b/nova/tests/unit/api/openstack/compute/test_cloudpipe.py @@ -15,12 +15,12 @@ import uuid as uuid_lib -from oslo_config import cfg from oslo_utils import timeutils from webob import exc from nova.api.openstack.compute import cloudpipe as cloudpipe_v21 from nova.compute import utils as compute_utils +import nova.conf from nova import exception from nova import objects from nova import test @@ -29,8 +29,7 @@ from nova.tests.unit import fake_network from nova.tests.unit import matchers from nova import utils -CONF = cfg.CONF -CONF.import_opt('vpn_image_id', 'nova.cloudpipe.pipelib') +CONF = nova.conf.CONF project_id = str(uuid_lib.uuid4().hex) diff --git a/nova/tests/unit/conf_fixture.py b/nova/tests/unit/conf_fixture.py index 09deadf7839d..aae836b756b5 100644 --- a/nova/tests/unit/conf_fixture.py +++ b/nova/tests/unit/conf_fixture.py @@ -24,9 +24,6 @@ from nova import ipv6 from nova.tests.unit import utils CONF = nova.conf.CONF -CONF.import_opt('floating_ip_dns_manager', 'nova.network.floating_ips') -CONF.import_opt('instance_dns_manager', 'nova.network.floating_ips') -CONF.import_opt('api_class', 'nova.keymgr', group='key_manager') class ConfFixture(config_fixture.Config): diff --git a/nova/tests/unit/keymgr/test_conf_key_mgr.py b/nova/tests/unit/keymgr/test_conf_key_mgr.py index 4dd3b0b7e624..0a2bb6964501 100644 --- a/nova/tests/unit/keymgr/test_conf_key_mgr.py +++ b/nova/tests/unit/keymgr/test_conf_key_mgr.py @@ -21,16 +21,15 @@ import binascii import codecs from castellan.common.objects import symmetric_key as key -from oslo_config import cfg +import nova.conf from nova import context from nova import exception from nova.keymgr import conf_key_mgr from nova import test -CONF = cfg.CONF -CONF.import_opt('fixed_key', 'nova.keymgr.conf_key_mgr', group='key_manager') +CONF = nova.conf.CONF decode_hex = codecs.getdecoder("hex_codec") diff --git a/nova/tests/unit/virt/libvirt/test_imagebackend.py b/nova/tests/unit/virt/libvirt/test_imagebackend.py index 92b1bad58a3f..56915d386c07 100644 --- a/nova/tests/unit/virt/libvirt/test_imagebackend.py +++ b/nova/tests/unit/virt/libvirt/test_imagebackend.py @@ -23,12 +23,12 @@ from castellan import key_manager import fixtures import mock from oslo_concurrency import lockutils -from oslo_config import cfg from oslo_config import fixture as config_fixture from oslo_utils import imageutils from oslo_utils import units from oslo_utils import uuidutils +import nova.conf from nova import context from nova import exception from nova import objects @@ -41,8 +41,7 @@ from nova.virt.libvirt import config as vconfig from nova.virt.libvirt import imagebackend from nova.virt.libvirt.storage import rbd_utils -CONF = cfg.CONF -CONF.import_opt('fixed_key', 'nova.keymgr.conf_key_mgr', group='key_manager') +CONF = nova.conf.CONF class FakeSecret(object):