Remove unused CONF imports
While reviewing config centralization patches I realized that we have a fair few files where we import cfg or setup CONF, but never actually use config variables. This patch cleans those up, but I am sure we'll add more as we move more flags around. Change-Id: I5851bbae2fa198a4e9be149a5836bea813848d89
This commit is contained in:
parent
dd03245bf1
commit
50a9550999
|
@ -14,7 +14,6 @@
|
|||
|
||||
"""The rescue mode extension."""
|
||||
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
from webob import exc
|
||||
|
||||
|
@ -26,7 +25,6 @@ from nova import exception
|
|||
from nova import utils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
authorize = exts.extension_authorizer('compute', 'rescue')
|
||||
|
||||
|
||||
|
|
|
@ -13,14 +13,12 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import stevedore.driver
|
||||
import stevedore.extension
|
||||
|
||||
from nova.i18n import _LE
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import sys
|
|||
|
||||
from neutronclient.common import exceptions as n_exc
|
||||
from neutronclient.neutron import v2_0 as neutronv20
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -33,7 +32,6 @@ from nova import objects
|
|||
from nova import utils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# NOTE: Neutron client has a max URL length of 8192, so we have
|
||||
|
|
|
@ -19,14 +19,10 @@
|
|||
|
||||
import urllib
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class SecurityGroupBase(object):
|
||||
|
||||
|
|
|
@ -13,15 +13,12 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from nova.i18n import _LW
|
||||
from nova.scheduler import filters
|
||||
from nova import servicegroup
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ import os
|
|||
|
||||
from migrate.versioning import repository
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_db.sqlalchemy import test_base
|
||||
from oslo_db.sqlalchemy import test_migrations
|
||||
from oslo_db.sqlalchemy import utils as db_utils
|
||||
|
@ -47,9 +46,6 @@ from nova.db.sqlalchemy import migration as sa_migration
|
|||
from nova import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class NovaAPIModelsSync(test_migrations.ModelsMigrationsSync):
|
||||
"""Test that the models match the database after migrations are run."""
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
import mock
|
||||
|
||||
import fixtures
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from nova.tests.functional.api import client
|
||||
|
@ -26,7 +25,6 @@ from nova.tests.unit.virt.libvirt import fake_libvirt_utils
|
|||
from nova.tests.unit.virt.libvirt import fakelibvirt
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from nova.api.openstack.compute import attach_interfaces \
|
||||
as attach_interfaces_v21
|
||||
|
@ -31,8 +30,6 @@ from nova.tests.unit import fake_network_cache_model
|
|||
from webob import exc
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
FAKE_UUID1 = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
|
||||
FAKE_UUID2 = 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb'
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
import copy
|
||||
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from nova.api.openstack.compute import console_auth_tokens \
|
||||
|
@ -26,8 +25,6 @@ from nova.consoleauth import rpcapi as consoleauth_rpcapi
|
|||
from nova import test
|
||||
from nova.tests.unit.api.openstack import fakes
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
_FAKE_CONNECT_INFO = {'instance_uuid': 'fake_instance_uuid',
|
||||
'host': 'fake_host',
|
||||
'port': 'fake_port',
|
||||
|
|
|
@ -13,15 +13,12 @@
|
|||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from nova.api.openstack import api_version_request as api_version
|
||||
from nova import test
|
||||
from nova.tests.unit.api.openstack import fakes
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class MicroversionsTest(test.NoDBTestCase):
|
||||
|
||||
|
|
|
@ -13,14 +13,11 @@
|
|||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from nova import test
|
||||
from nova.tests.unit.api.openstack import fakes
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class PluginTest(test.NoDBTestCase):
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from nova.api.openstack.compute.legacy_v2.contrib import \
|
||||
|
@ -27,9 +26,6 @@ from nova import test
|
|||
from nova.tests.unit.api.openstack import fakes
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class AttrDict(dict):
|
||||
def __getattr__(self, k):
|
||||
return self[k]
|
||||
|
|
|
@ -20,9 +20,6 @@ import mock
|
|||
from nova.console import websocketproxy
|
||||
from nova import exception
|
||||
from nova import test
|
||||
from oslo_config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class NovaProxyRequestHandlerBaseTestCase(test.NoDBTestCase):
|
||||
|
|
|
@ -18,7 +18,6 @@ Tests For Scheduler Utils
|
|||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
||||
from nova.compute import flavors
|
||||
|
@ -32,8 +31,6 @@ from nova import test
|
|||
from nova.tests.unit import fake_instance
|
||||
from nova.tests.unit.objects import test_flavor
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class SchedulerUtilsTestCase(test.NoDBTestCase):
|
||||
"""Test case for scheduler utils methods."""
|
||||
|
|
|
@ -24,7 +24,6 @@ from oslo_context import fixture as o_fixture
|
|||
from nova.compute import flavors
|
||||
from nova.compute import task_states
|
||||
from nova.compute import vm_states
|
||||
import nova.conf
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova import notifications
|
||||
|
@ -34,8 +33,6 @@ from nova import test
|
|||
from nova.tests.unit import fake_network
|
||||
from nova.tests.unit import fake_notifier
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
|
||||
|
||||
class NotificationsTestCase(test.TestCase):
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import tempfile
|
|||
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from nova import exception
|
||||
from nova import test
|
||||
|
@ -26,7 +25,6 @@ from nova.virt.disk.mount import nbd
|
|||
from nova.virt.disk.vfs import localfs as vfsimpl
|
||||
from nova.virt.image import model as imgmodel
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
dirs = []
|
||||
files = {}
|
||||
|
|
|
@ -16,13 +16,10 @@
|
|||
import urllib
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from nova import test
|
||||
from nova.virt.vmwareapi import read_write_util
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class ReadWriteUtilTestCase(test.NoDBTestCase):
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_vmware import exceptions as vexc
|
||||
from oslo_vmware import vim_util
|
||||
|
||||
|
@ -29,8 +28,6 @@ from nova.virt.vmwareapi import network_util
|
|||
from nova.virt.vmwareapi import vif
|
||||
from nova.virt.vmwareapi import vm_util
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class VMwareVifTestCase(test.NoDBTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
@ -20,7 +20,6 @@ import os
|
|||
|
||||
from os_win import exceptions as os_win_exc
|
||||
from os_win import utilsfactory
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from nova.compute import task_states
|
||||
|
@ -30,7 +29,6 @@ from nova.image import glance
|
|||
from nova import utils
|
||||
from nova.virt.hyperv import pathutils
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue