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