diff --git a/cinder/api/contrib/quotas.py b/cinder/api/contrib/quotas.py index fd60b129f09..a03384ff105 100644 --- a/cinder/api/contrib/quotas.py +++ b/cinder/api/contrib/quotas.py @@ -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'] diff --git a/cinder/api/versions.py b/cinder/api/versions.py index d6acf214ce9..01d31b310c9 100644 --- a/cinder/api/versions.py +++ b/cinder/api/versions.py @@ -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", diff --git a/cinder/objects/cluster.py b/cinder/objects/cluster.py index a3ae7b787a2..857aa3b8903 100644 --- a/cinder/objects/cluster.py +++ b/cinder/objects/cluster.py @@ -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): diff --git a/cinder/objects/request_spec.py b/cinder/objects/request_spec.py index 9ada0e285bf..b60c08534fc 100644 --- a/cinder/objects/request_spec.py +++ b/cinder/objects/request_spec.py @@ -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, diff --git a/cinder/tests/tempest/api/volume/test_volume_placeholder.py b/cinder/tests/tempest/api/volume/test_volume_placeholder.py index 4c82675f947..c0d3e32a55c 100644 --- a/cinder/tests/tempest/api/volume/test_volume_placeholder.py +++ b/cinder/tests/tempest/api/volume/test_volume_placeholder.py @@ -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.""" diff --git a/cinder/tests/tempest/api/volume/test_volume_unicode.py b/cinder/tests/tempest/api/volume/test_volume_unicode.py index d646050ce59..8436699d6e7 100644 --- a/cinder/tests/tempest/api/volume/test_volume_unicode.py +++ b/cinder/tests/tempest/api/volume/test_volume_unicode.py @@ -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): diff --git a/cinder/tests/unit/api/v3/test_messages.py b/cinder/tests/unit/api/v3/test_messages.py index 0a904bf3387..d3944d6860a 100644 --- a/cinder/tests/unit/api/v3/test_messages.py +++ b/cinder/tests/unit/api/v3/test_messages.py @@ -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}' diff --git a/cinder/tests/unit/api/v3/test_volumes.py b/cinder/tests/unit/api/v3/test_volumes.py index 3a77ae177d4..2ebf225808b 100644 --- a/cinder/tests/unit/api/v3/test_volumes.py +++ b/cinder/tests/unit/api/v3/test_volumes.py @@ -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" diff --git a/cinder/tests/unit/test_ssh_utils.py b/cinder/tests/unit/test_ssh_utils.py index dc7e3ad7728..155b8934a36 100644 --- a/cinder/tests/unit/test_ssh_utils.py +++ b/cinder/tests/unit/test_ssh_utils.py @@ -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): diff --git a/cinder/tests/unit/test_utils.py b/cinder/tests/unit/test_utils.py index 93f8a5f7e97..25426827029 100644 --- a/cinder/tests/unit/test_utils.py +++ b/cinder/tests/unit/test_utils.py @@ -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): diff --git a/cinder/tests/unit/test_volume_utils.py b/cinder/tests/unit/test_volume_utils.py index d5ae8d8e89c..e848838b2b4 100644 --- a/cinder/tests/unit/test_volume_utils.py +++ b/cinder/tests/unit/test_volume_utils.py @@ -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') diff --git a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_backend.py b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_backend.py index 0bd2b7ba14d..307cf7311f2 100644 --- a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_backend.py +++ b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_backend.py @@ -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\ diff --git a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_iscsi.py b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_iscsi.py index 9b40f7dda2d..f8b4f980e89 100644 --- a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_iscsi.py +++ b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_iscsi.py @@ -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', diff --git a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_utils.py b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_utils.py index 34e00e4b7e1..094d075e1f6 100644 --- a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_utils.py +++ b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_hnas_utils.py @@ -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): diff --git a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py index b930a4d14dc..b21a76427b7 100644 --- a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py +++ b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py @@ -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' diff --git a/cinder/tests/unit/volume/drivers/test_glusterfs.py b/cinder/tests/unit/volume/drivers/test_glusterfs.py index 6b5cb63b40e..fdbe5a50229 100644 --- a/cinder/tests/unit/volume/drivers/test_glusterfs.py +++ b/cinder/tests/unit/volume/drivers/test_glusterfs.py @@ -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." diff --git a/cinder/tests/unit/volume/drivers/test_nimble.py b/cinder/tests/unit/volume/drivers/test_nimble.py index d7e9f7b6d8e..6cc6437013e 100644 --- a/cinder/tests/unit/volume/drivers/test_nimble.py +++ b/cinder/tests/unit/volume/drivers/test_nimble.py @@ -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' diff --git a/cinder/tests/unit/volume/drivers/test_quobyte.py b/cinder/tests/unit/volume/drivers/test_quobyte.py index 04d2ed4b45a..e5f08bef608 100644 --- a/cinder/tests/unit/volume/drivers/test_quobyte.py +++ b/cinder/tests/unit/volume/drivers/test_quobyte.py @@ -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." diff --git a/cinder/volume/drivers/netapp/dataontap/utils/data_motion.py b/cinder/volume/drivers/netapp/dataontap/utils/data_motion.py index 066435c1a5f..428d32c5a76 100644 --- a/cinder/volume/drivers/netapp/dataontap/utils/data_motion.py +++ b/cinder/volume/drivers/netapp/dataontap/utils/data_motion.py @@ -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