Remove unused config imports/objects

Remove unused oslo_config / CONF objects in drivers
and unit tests.

Change-Id: I92a67c3a7766b68df591c4306188c00d7ce5f58b
This commit is contained in:
Eric Harney 2021-08-18 16:16:51 -04:00
parent ca4bfddba6
commit 3cb65ed58c
13 changed files with 0 additions and 40 deletions

View File

@ -12,8 +12,6 @@
from unittest import mock
from oslo_config import cfg
from cinder import context
from cinder import db
from cinder import exception
@ -25,8 +23,6 @@ from cinder.tests.unit import utils as tests_utils
from cinder.volume import api as volume_api
from cinder.volume import configuration as conf
CONF = cfg.CONF
class AttachmentManagerTestCase(test.TestCase):
"""Attachment related test for volume/api.py."""

View File

@ -17,7 +17,6 @@
from unittest import mock
from oslo_config import cfg
from sqlalchemy.orm import exc
from cinder import db
@ -26,9 +25,6 @@ from cinder.tests.unit import test_db_api
from cinder.tests.unit import utils
CONF = cfg.CONF
class ClusterTestCase(test_db_api.BaseTest):
"""Unit tests for cinder.db.api.cluster_*."""

View File

@ -9,13 +9,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from cinder.message import defined_messages
from cinder.tests.unit import test
CONF = cfg.CONF
class DefinedMessagesTest(test.TestCase):
def test_event_id_formats(self):

View File

@ -14,14 +14,11 @@ import inspect
from itertools import chain
import ddt
from oslo_config import cfg
from cinder import exception
from cinder.message import message_field
from cinder.tests.unit import test
CONF = cfg.CONF
@ddt.ddt
class MessageFieldTest(test.TestCase):

View File

@ -15,15 +15,12 @@ from unittest import mock
from keystoneauth1.identity.generic import password
from keystoneauth1 import loading as ks_loading
from keystoneauth1 import service_token
from oslo_config import cfg
from cinder import context
from cinder import exception
from cinder import service_auth
from cinder.tests.unit import test
CONF = cfg.CONF
class ServiceAuthTestCase(test.TestCase):

View File

@ -14,15 +14,12 @@
# under the License.
import json
from oslo_config import cfg
import requests
import six
from cinder.volume.drivers.dell_emc.powerflex import driver
from cinder.volume.drivers.dell_emc.powerflex import rest_client
CONF = cfg.CONF
class PowerFlexDriver(driver.PowerFlexDriver):
"""Mock PowerFlex Driver class.

View File

@ -22,7 +22,6 @@ from unittest import mock
import ddt
import eventlet
from oslo_config import cfg
import requests
from cinder import context
@ -35,8 +34,6 @@ from cinder.volume.drivers.inspur.as13000 import as13000_driver
from cinder.volume import volume_utils
CONF = cfg.CONF
test_config = configuration.Configuration(None)
test_config.san_ip = 'some_ip'
test_config.san_api_port = 'as13000_api_port'

View File

@ -18,7 +18,6 @@ import time
from unittest import mock
import ddt
from oslo_config import cfg
from oslo_utils import units
from cinder import context
@ -34,8 +33,6 @@ from cinder.volume.drivers.kaminario import kaminario_fc
from cinder.volume.drivers.kaminario import kaminario_iscsi
from cinder.volume import volume_utils
CONF = cfg.CONF
CONNECTOR = {'initiator': 'iqn.1993-08.org.debian:01:12aa12aa12aa',
'ip': '192.168.2.5', 'platform': 'x86_64', 'host': 'test-k2',
'wwpns': ['12341a2a00001234', '12341a2a00001235'],

View File

@ -15,7 +15,6 @@
from unittest import mock
from oslo_config import cfg
from oslo_utils import timeutils
from cinder import exception as cinder_exception
@ -23,8 +22,6 @@ from cinder.tests.unit import test
from cinder.volume import configuration as conf
from cinder.volume.drivers import linstordrv as drv
CONF = cfg.CONF
CINDER_UNKNOWN = 'unknown'
DISKLESS = 'DISKLESS'
LVM = 'LVM'

View File

@ -21,7 +21,6 @@ from ddt import ddt
from ddt import unpack
import eventlet
from lxml import etree as ET
from oslo_config import cfg
from oslo_utils import units
import requests
import six
@ -33,8 +32,6 @@ from cinder import utils
from cinder.volume import driver
from cinder.volume.drivers import qnap
CONF = cfg.CONF
FAKE_LUNNAA = {'LUNNAA': 'fakeLunNaa'}
FAKE_SNAPSHOT = {'snapshot_id': 'fakeSnapshotId'}

View File

@ -19,7 +19,6 @@ import tempfile
from unittest import mock
from xml.dom.minidom import Document
from oslo_config import cfg
from oslo_utils.secretutils import md5
import requests
@ -29,7 +28,6 @@ from cinder.tests.unit import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.veritas_access import veritas_iscsi
CONF = cfg.CONF
FAKE_BACKEND = 'fake_backend'

View File

@ -26,7 +26,6 @@ Limitations:
import random
import threading
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
import six
@ -41,8 +40,6 @@ from cinder.zonemanager import utils as fczm_utils
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
@interface.volumedriver
class FlashSystemFCDriver(fscommon.FlashSystemDriver):

View File

@ -17,7 +17,6 @@
FC volume driver for Inspur InStorage family storage systems.
"""
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
@ -32,8 +31,6 @@ from cinder.zonemanager import utils as fczm_utils
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
@interface.volumedriver
class InStorageMCSFCDriver(instorage_common.InStorageMCSCommonDriver,