Cleanup unused conf variables
I noticed in nova that we had a lot of unused conf variables. I wondered if this was a thing in other projects as well. Turns out it is. Change-Id: I2424e32dd4ad61881d9b6a0449e12937ea8151e0
This commit is contained in:
parent
67dd18df5b
commit
fdc2c5d86a
@ -12,7 +12,6 @@
|
||||
# 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 oslo_utils import uuidutils
|
||||
from webob import exc
|
||||
@ -28,7 +27,6 @@ from cinder import volume as cinder_volume
|
||||
from cinder.volume import volume_types
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
authorize = extensions.extension_authorizer('volume', 'volume_manage')
|
||||
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
# 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 oslo_utils import versionutils
|
||||
from oslo_versionedobjects import fields
|
||||
@ -24,7 +23,6 @@ from cinder import objects
|
||||
from cinder.objects import base
|
||||
from cinder import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
# 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 oslo_versionedobjects import fields
|
||||
|
||||
@ -20,7 +19,6 @@ from cinder import db
|
||||
from cinder import objects
|
||||
from cinder.objects import base
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
# 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 oslo_versionedobjects import fields
|
||||
|
||||
@ -22,7 +21,6 @@ from cinder import objects
|
||||
from cinder.objects import base
|
||||
from cinder.volume import volume_types
|
||||
|
||||
CONF = cfg.CONF
|
||||
OPTIONAL_FIELDS = ['extra_specs', 'projects']
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -17,7 +17,6 @@ Handles all requests relating to volume replication.
|
||||
"""
|
||||
import functools
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from cinder.db import base
|
||||
@ -28,7 +27,6 @@ from cinder import volume as cinder_volume
|
||||
from cinder.volume import rpcapi as volume_rpcapi
|
||||
from cinder.volume import utils as volume_utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -18,7 +18,6 @@ import json
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
from oslo_serialization import jsonutils
|
||||
import webob
|
||||
@ -36,8 +35,6 @@ from cinder import volume
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import rpcapi as volume_rpcapi
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class VolumeActionsTest(test.TestCase):
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
import webob
|
||||
|
||||
@ -33,9 +32,6 @@ from cinder.tests.unit import fake_volume
|
||||
from cinder import volume
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def return_create_snapshot_metadata(context, snapshot_id, metadata, delete):
|
||||
return stub_snapshot_metadata()
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
import webob
|
||||
|
||||
@ -33,9 +32,6 @@ from cinder.tests.unit import fake_volume
|
||||
from cinder import volume
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def return_create_snapshot_metadata(context, snapshot_id, metadata, delete):
|
||||
return stub_snapshot_metadata()
|
||||
|
||||
|
@ -20,7 +20,6 @@ import os
|
||||
|
||||
import mock
|
||||
from os_brick.remotefs import remotefs as remotefs_brick
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.backup.drivers import glusterfs
|
||||
from cinder import context
|
||||
@ -28,8 +27,6 @@ from cinder import exception
|
||||
from cinder import test
|
||||
from cinder import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
FAKE_BACKUP_MOUNT_POINT_BASE = '/fake/mount-point-base'
|
||||
FAKE_HOST = 'fake_host'
|
||||
FAKE_VOL_NAME = 'backup_vol'
|
||||
|
@ -19,7 +19,6 @@ Unit Tests for cinder.backup.rpcapi
|
||||
import copy
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.backup import rpcapi as backup_rpcapi
|
||||
from cinder import context
|
||||
@ -28,9 +27,6 @@ from cinder import test
|
||||
from cinder.tests.unit import fake_backup
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class BackupRpcAPITestCase(test.TestCase):
|
||||
def setUp(self):
|
||||
super(BackupRpcAPITestCase, self).setUp()
|
||||
|
@ -14,15 +14,11 @@
|
||||
|
||||
"""Tests for volume type."""
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder import test
|
||||
from cinder.volume import volume_types
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class VolumeTypeTestCase(test.TestCase):
|
||||
"""Test cases for volume type."""
|
||||
|
@ -20,16 +20,12 @@ Unit Tests for cinder.scheduler.rpcapi
|
||||
import copy
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
from cinder import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class SchedulerRpcAPITestCase(test.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
@ -18,7 +18,6 @@ import datetime
|
||||
|
||||
import enum
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
import six
|
||||
|
||||
@ -30,8 +29,6 @@ from cinder import exception
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
THREE = 3
|
||||
THREE_HUNDREDS = 300
|
||||
ONE_HUNDREDS = 100
|
||||
|
@ -25,9 +25,7 @@ from cinder.volume import driver
|
||||
from cinder.volume.drivers.hpe import hpe_xp_fc
|
||||
from cinder.volume.drivers.hpe import hpe_xp_opts
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
CONF = cfg.CONF
|
||||
|
||||
NORMAL_LDEV_TYPE = 'Normal'
|
||||
POOL_INFO = {'30': {'total_gb': 'infinite', 'free_gb': 'infinite'}}
|
||||
|
@ -22,7 +22,6 @@
|
||||
import copy
|
||||
|
||||
from mox3 import mox
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
@ -82,8 +81,6 @@ CG_SNAPSHOT = {'id': CG_SNAPSHOT_ID,
|
||||
|
||||
CONNECTOR = {'initiator': "iqn.2012-07.org.fake:01:948f189c4695", }
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class XIVDS8KFakeProxyDriver(object):
|
||||
"""Fake IBM XIV and DS8K Proxy Driver."""
|
||||
|
@ -42,10 +42,6 @@ from cinder.volume.drivers.netapp.dataontap import nfs_base
|
||||
from cinder.volume.drivers.netapp.dataontap import ssc_cmode
|
||||
from cinder.volume.drivers.netapp import utils
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
CONNECTION_INFO = {
|
||||
'hostname': 'fake_host',
|
||||
|
@ -16,16 +16,12 @@
|
||||
"""Tests for volume copy throttling helpers."""
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import test
|
||||
from cinder import utils
|
||||
from cinder.volume import throttling
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class ThrottleTestCase(test.TestCase):
|
||||
|
||||
def test_NoThrottle(self):
|
||||
|
@ -17,8 +17,6 @@
|
||||
import ddt
|
||||
import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder.openstack.common import imageutils
|
||||
@ -33,8 +31,6 @@ from cinder.tests.unit.volume.flows import fake_volume_api
|
||||
from cinder.volume.flows.api import create_volume
|
||||
from cinder.volume.flows.manager import create_volume as create_volume_manager
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
class CreateVolumeFlowTestCase(test.TestCase):
|
||||
|
@ -16,7 +16,6 @@
|
||||
"""The QoS Specs Implementation"""
|
||||
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_log import log as logging
|
||||
|
||||
@ -27,7 +26,6 @@ from cinder.i18n import _, _LE, _LW
|
||||
from cinder.volume import volume_types
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONTROL_LOCATION = ['front-end', 'back-end', 'both']
|
||||
|
@ -14,14 +14,12 @@
|
||||
|
||||
"""Utility methods for working with WSGI servers."""
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from cinder.i18n import _
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user