Config options: remove import_opts from completed section
The config options of the "nova.conf" sections got moved to the new central location "nova/conf/". Otherwise, some modules are still using import_opts method from these sections, instead of CONF.<option>. This patch aim to eliminate all import_opts from below completed sections: - floating_ips - cloudpipe - compute - key_manager - network Change-Id: I7192bf629d3292f9f6501b9d8e3c15545a1f815f Implements: blueprint centralize-config-options-newton
This commit is contained in:
parent
be22885793
commit
5252f337f4
@ -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'
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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(
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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")
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user