Remove unused config.CONF
This is to remove unused config.CONF to keep code clean. Change-Id: I6e8d19ec06e7df84b2bbd86dd3b99b4489402ddd
This commit is contained in:
parent
376c3ddfd2
commit
3ef1fad8f8
@ -15,6 +15,8 @@
|
||||
|
||||
import webob
|
||||
|
||||
from oslo_utils import strutils
|
||||
|
||||
from cinder.api import extensions
|
||||
from cinder.api.openstack import wsgi
|
||||
from cinder import db
|
||||
@ -25,11 +27,6 @@ from cinder import quota
|
||||
from cinder import quota_utils
|
||||
from cinder import utils
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import strutils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
QUOTAS = quota.QUOTAS
|
||||
NON_QUOTA_KEYS = ['tenant_id', 'id']
|
||||
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
import copy
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.api import extensions
|
||||
from cinder.api import openstack
|
||||
from cinder.api.openstack import api_version_request
|
||||
@ -26,8 +24,6 @@ from cinder.api.openstack import wsgi
|
||||
from cinder.api.views import versions as views_versions
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
_LINKS = [{
|
||||
"rel": "describedby",
|
||||
"type": "text/html",
|
||||
|
@ -13,7 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_versionedobjects import fields
|
||||
|
||||
from cinder import db
|
||||
@ -24,9 +23,6 @@ from cinder.objects import base
|
||||
from cinder import utils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
@base.CinderObjectRegistry.register
|
||||
class Cluster(base.CinderPersistentObject, base.CinderObject,
|
||||
base.CinderComparableObject):
|
||||
|
@ -12,14 +12,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_versionedobjects import fields
|
||||
|
||||
from cinder import objects
|
||||
from cinder.objects import base
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
@base.CinderObjectRegistry.register
|
||||
class RequestSpec(base.CinderObject, base.CinderObjectDictCompat,
|
||||
|
@ -13,11 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tempest import config
|
||||
from tempest.tests import base
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class CinderPlaceholderTest(base.TestCase):
|
||||
"""Placeholder test for adding in-tree Cinder tempest tests."""
|
||||
|
@ -17,9 +17,6 @@
|
||||
from tempest.api.volume import base as volume_base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest.common import waiters
|
||||
from tempest import config
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class CinderUnicodeTest(volume_base.BaseVolumeTest):
|
||||
|
@ -11,7 +11,6 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.api import extensions
|
||||
from cinder.api.v3 import messages
|
||||
@ -23,7 +22,6 @@ from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v3 import stubs
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
NS = '{http://docs.openstack.org/api/openstack-block-storage/3.0/content}'
|
||||
|
||||
|
@ -16,7 +16,6 @@ import ddt
|
||||
import iso8601
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.api import extensions
|
||||
from cinder.api.openstack import api_version_request as api_version
|
||||
@ -35,8 +34,6 @@ from cinder.volume.api import API as vol_get
|
||||
|
||||
version_header_name = 'OpenStack-API-Version'
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
DEFAULT_AZ = "zone1:host1"
|
||||
|
||||
|
||||
|
@ -14,14 +14,10 @@ import mock
|
||||
import paramiko
|
||||
import uuid
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder import ssh_utils
|
||||
from cinder import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class FakeSock(object):
|
||||
def settimeout(self, timeout):
|
||||
|
@ -20,7 +20,6 @@ import time
|
||||
|
||||
import mock
|
||||
from oslo_concurrency import processutils as putils
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
from six.moves import range
|
||||
@ -32,9 +31,6 @@ from cinder import test
|
||||
from cinder import utils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class ExecuteTestCase(test.TestCase):
|
||||
@mock.patch('cinder.utils.processutils.execute')
|
||||
def test_execute(self, mock_putils_exe):
|
||||
|
@ -22,7 +22,6 @@ import mock
|
||||
import six
|
||||
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder.db.sqlalchemy import models
|
||||
@ -37,8 +36,6 @@ from cinder import utils
|
||||
from cinder.volume import throttling
|
||||
from cinder.volume import utils as volume_utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class NotifyUsageTestCase(test.TestCase):
|
||||
@mock.patch('cinder.volume.utils._usage_from_volume')
|
||||
|
@ -20,14 +20,12 @@ import paramiko
|
||||
import time
|
||||
|
||||
from oslo_concurrency import processutils as putils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder import utils
|
||||
from cinder.volume.drivers.hitachi import hnas_backend
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
evsfs_list = "\n\
|
||||
FS ID FS Label FS Permanent ID EVS ID EVS Label\n\
|
||||
|
@ -17,7 +17,6 @@
|
||||
import mock
|
||||
|
||||
from oslo_concurrency import processutils as putils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
@ -31,7 +30,6 @@ from cinder.volume.drivers.hitachi import hnas_iscsi as iscsi
|
||||
from cinder.volume.drivers.hitachi import hnas_utils
|
||||
from cinder.volume import volume_types
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
# The following information is passed on to tests, when creating a volume
|
||||
_VOLUME = {'name': 'volume-cinder',
|
||||
|
@ -19,7 +19,6 @@ import ddt
|
||||
import mock
|
||||
import os
|
||||
|
||||
from oslo_config import cfg
|
||||
from xml.etree import ElementTree as ETree
|
||||
|
||||
from cinder import context
|
||||
@ -150,8 +149,6 @@ invalid_XML_etree_empty_parameter = ETree.XML(XML_empty_authentication_param)
|
||||
invalid_XML_etree_no_mandatory_params = ETree.XML(XML_without_mandatory_params)
|
||||
invalid_XML_etree_no_service = ETree.XML(XML_no_services_configured)
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
class HNASUtilsTest(test.TestCase):
|
||||
|
@ -18,7 +18,6 @@ import mock
|
||||
|
||||
import ast
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import units
|
||||
|
||||
from cinder import context
|
||||
@ -36,7 +35,6 @@ from cinder.volume import volume_types
|
||||
|
||||
hpeexceptions = hpe3parclient.hpeexceptions
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
HPE3PAR_CPG = 'OpenStackCPG'
|
||||
HPE3PAR_CPG2 = 'fakepool'
|
||||
|
@ -24,7 +24,6 @@ import traceback
|
||||
import mock
|
||||
import os_brick
|
||||
from oslo_concurrency import processutils as putils
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import imageutils
|
||||
from oslo_utils import units
|
||||
|
||||
@ -43,9 +42,6 @@ from cinder.volume.drivers import glusterfs
|
||||
from cinder.volume.drivers import remotefs as remotefs_drv
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class FakeDb(object):
|
||||
msg = "Tests are broken: mock this out."
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
import sys
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import units
|
||||
|
||||
from cinder import context
|
||||
@ -28,7 +27,6 @@ from cinder.volume.drivers import nimble
|
||||
from cinder.volume import volume_types
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
NIMBLE_CLIENT = 'cinder.volume.drivers.nimble.client'
|
||||
NIMBLE_URLLIB2 = 'six.moves.urllib.request'
|
||||
NIMBLE_RANDOM = 'cinder.volume.drivers.nimble.random'
|
||||
|
@ -22,7 +22,6 @@ import traceback
|
||||
|
||||
import mock
|
||||
from oslo_concurrency import processutils as putils
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import imageutils
|
||||
from oslo_utils import units
|
||||
|
||||
@ -36,9 +35,6 @@ from cinder.volume import configuration as conf
|
||||
from cinder.volume.drivers import quobyte
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class FakeDb(object):
|
||||
msg = "Tests are broken: mock this out."
|
||||
|
||||
|
@ -20,7 +20,6 @@ location of the data's source and destination. This includes cloning,
|
||||
SnapMirror, and copy-offload as improvements to brute force data transfer.
|
||||
"""
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
from oslo_utils import excutils
|
||||
|
||||
@ -33,7 +32,6 @@ from cinder.volume.drivers.netapp.dataontap.utils import utils as config_utils
|
||||
from cinder.volume import utils as volume_utils
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
ENTRY_DOES_NOT_EXIST = "(entry doesn't exist)"
|
||||
QUIESCE_RETRY_INTERVAL = 5
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user