From e33d6bfb0bda452f63d5e9a20c59e0751b0d4fe7 Mon Sep 17 00:00:00 2001 From: Zhihai Song Date: Fri, 25 Dec 2015 18:28:45 +0800 Subject: [PATCH] Remove unused logging import and LOG global var In some modules the global LOG is not used any more. And the import of logging is not used. This patch removes the unused logging import and LOG vars. Co-Authored-By: ChangBo Guo(gcb) Change-Id: Ia72f99688ce00aeecca9239f9ef123611259a2fa --- cinder/api/contrib/capabilities.py | 4 ---- cinder/api/contrib/extended_snapshot_attributes.py | 3 --- cinder/api/contrib/scheduler_hints.py | 3 --- cinder/api/contrib/scheduler_stats.py | 5 ----- cinder/api/contrib/volume_actions.py | 2 -- cinder/api/contrib/volume_host_attribute.py | 3 --- cinder/api/urlmap.py | 3 --- cinder/api/v1/router.py | 5 ----- cinder/api/v2/router.py | 5 ----- cinder/api/v2/views/volumes.py | 4 ---- cinder/api/v3/router.py | 5 ----- cinder/api/views/backups.py | 5 ----- cinder/api/views/cgsnapshots.py | 5 ----- cinder/api/views/consistencygroups.py | 5 ----- cinder/api/views/qos_specs.py | 5 ----- cinder/api/views/snapshots.py | 5 ----- cinder/api/views/transfers.py | 5 ----- cinder/objects/backup.py | 3 +-- cinder/objects/service.py | 3 --- cinder/objects/snapshot.py | 4 ++-- cinder/objects/volume.py | 3 +-- cinder/objects/volume_attachment.py | 3 --- cinder/objects/volume_type.py | 3 +-- cinder/replication/api.py | 4 ---- cinder/scheduler/filters/affinity_filter.py | 3 --- cinder/scheduler/weights/volume_number.py | 4 ---- cinder/test.py | 3 --- cinder/tests/unit/objects/test_snapshot.py | 5 ----- cinder/tests/unit/test_huawei_drivers.py | 3 --- cinder/tests/unit/test_xio.py | 2 -- cinder/volume/configuration.py | 2 -- cinder/volume/drivers/dothill/dothill_fc.py | 4 ---- cinder/volume/drivers/huawei/fc_zone_helper.py | 1 + cinder/volume/drivers/netapp/dataontap/fc_7mode.py | 5 ----- cinder/volume/drivers/netapp/dataontap/fc_cmode.py | 5 ----- cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py | 5 ----- cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py | 5 ----- cinder/volume/drivers/netapp/eseries/fc_driver.py | 4 ---- cinder/volume/drivers/netapp/eseries/iscsi_driver.py | 5 ----- cinder/volume/drivers/netapp/eseries/utils.py | 3 --- cinder/wsgi/common.py | 3 --- cinder/wsgi/eventlet_server.py | 3 --- 42 files changed, 6 insertions(+), 154 deletions(-) diff --git a/cinder/api/contrib/capabilities.py b/cinder/api/contrib/capabilities.py index d8430c6067d..fbae6a88105 100644 --- a/cinder/api/contrib/capabilities.py +++ b/cinder/api/contrib/capabilities.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging import oslo_messaging from cinder.api import extensions @@ -25,9 +24,6 @@ from cinder import objects from cinder.volume import rpcapi -LOG = logging.getLogger(__name__) - - def authorize(context, action_name): extensions.extension_authorizer('volume', action_name)(context) diff --git a/cinder/api/contrib/extended_snapshot_attributes.py b/cinder/api/contrib/extended_snapshot_attributes.py index 226d0739adb..f958510e995 100644 --- a/cinder/api/contrib/extended_snapshot_attributes.py +++ b/cinder/api/contrib/extended_snapshot_attributes.py @@ -14,13 +14,10 @@ """The Extended Snapshot Attributes API extension.""" -from oslo_log import log as logging - from cinder.api import extensions from cinder.api.openstack import wsgi -LOG = logging.getLogger(__name__) authorize = extensions.soft_extension_authorizer( 'volume', 'extended_snapshot_attributes') diff --git a/cinder/api/contrib/scheduler_hints.py b/cinder/api/contrib/scheduler_hints.py index 858b3ade6f6..1bae1386257 100644 --- a/cinder/api/contrib/scheduler_hints.py +++ b/cinder/api/contrib/scheduler_hints.py @@ -12,15 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging import webob.exc from cinder.api import extensions from cinder.api.openstack import wsgi from cinder.i18n import _ -LOG = logging.getLogger(__name__) - class SchedulerHintsController(wsgi.Controller): diff --git a/cinder/api/contrib/scheduler_stats.py b/cinder/api/contrib/scheduler_stats.py index 9f6e59d36de..b8c82348d97 100644 --- a/cinder/api/contrib/scheduler_stats.py +++ b/cinder/api/contrib/scheduler_stats.py @@ -14,17 +14,12 @@ """The Scheduler Stats extension""" -from oslo_log import log as logging - from cinder.api import extensions from cinder.api.openstack import wsgi from cinder.api.views import scheduler_stats as scheduler_stats_view from cinder.scheduler import rpcapi -LOG = logging.getLogger(__name__) - - def authorize(context, action_name): action = 'scheduler_stats:%s' % action_name extensions.extension_authorizer('scheduler', action)(context) diff --git a/cinder/api/contrib/volume_actions.py b/cinder/api/contrib/volume_actions.py index 1247e412f43..ecb2d402bf5 100644 --- a/cinder/api/contrib/volume_actions.py +++ b/cinder/api/contrib/volume_actions.py @@ -14,7 +14,6 @@ from oslo_config import cfg -from oslo_log import log as logging import oslo_messaging as messaging from oslo_utils import encodeutils from oslo_utils import strutils @@ -30,7 +29,6 @@ from cinder import utils from cinder import volume -LOG = logging.getLogger(__name__) CONF = cfg.CONF diff --git a/cinder/api/contrib/volume_host_attribute.py b/cinder/api/contrib/volume_host_attribute.py index 4d8a0e7001a..efe7cfefb8c 100644 --- a/cinder/api/contrib/volume_host_attribute.py +++ b/cinder/api/contrib/volume_host_attribute.py @@ -12,13 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from cinder.api import extensions from cinder.api.openstack import wsgi -LOG = logging.getLogger(__name__) authorize = extensions.soft_extension_authorizer('volume', 'volume_host_attribute') diff --git a/cinder/api/urlmap.py b/cinder/api/urlmap.py index ade7e1a6683..ed1afb39ca2 100644 --- a/cinder/api/urlmap.py +++ b/cinder/api/urlmap.py @@ -15,7 +15,6 @@ import re -from oslo_log import log as logging import paste.urlmap try: from urllib.request import parse_http_list # pylint: disable=E0611 @@ -31,8 +30,6 @@ _option_header_piece_re = re.compile( r'(?:=\s*([^;]+|%s))?\s*' % (_quoted_string_re, _quoted_string_re)) -LOG = logging.getLogger(__name__) - def unquote_header_value(value): """Unquotes a header value. diff --git a/cinder/api/v1/router.py b/cinder/api/v1/router.py index 67c8f818104..d5b544fc1a2 100644 --- a/cinder/api/v1/router.py +++ b/cinder/api/v1/router.py @@ -19,8 +19,6 @@ WSGI middleware for OpenStack Volume API. """ -from oslo_log import log as logging - from cinder.api import extensions import cinder.api.openstack from cinder.api.v1 import limits @@ -32,9 +30,6 @@ from cinder.api.v1 import volumes from cinder.api import versions -LOG = logging.getLogger(__name__) - - class APIRouter(cinder.api.openstack.APIRouter): """Routes requests on the API to the appropriate controller and method.""" ExtensionManager = extensions.ExtensionManager diff --git a/cinder/api/v2/router.py b/cinder/api/v2/router.py index 491423000c8..df442f55807 100644 --- a/cinder/api/v2/router.py +++ b/cinder/api/v2/router.py @@ -19,8 +19,6 @@ WSGI middleware for OpenStack Volume API. """ -from oslo_log import log as logging - from cinder.api import extensions import cinder.api.openstack from cinder.api.v2 import limits @@ -32,9 +30,6 @@ from cinder.api.v2 import volumes from cinder.api import versions -LOG = logging.getLogger(__name__) - - class APIRouter(cinder.api.openstack.APIRouter): """Routes requests on the API to the appropriate controller and method.""" ExtensionManager = extensions.ExtensionManager diff --git a/cinder/api/v2/views/volumes.py b/cinder/api/v2/views/volumes.py index b201b95f28d..259ff596f43 100644 --- a/cinder/api/v2/views/volumes.py +++ b/cinder/api/v2/views/volumes.py @@ -13,15 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging import six from cinder.api import common -LOG = logging.getLogger(__name__) - - class ViewBuilder(common.ViewBuilder): """Model a server API response as a python dictionary.""" diff --git a/cinder/api/v3/router.py b/cinder/api/v3/router.py index 7e8ae4e6f4a..ebecc09a4a9 100644 --- a/cinder/api/v3/router.py +++ b/cinder/api/v3/router.py @@ -19,8 +19,6 @@ WSGI middleware for OpenStack Volume API. """ -from oslo_log import log as logging - from cinder.api import extensions import cinder.api.openstack from cinder.api.v2 import limits @@ -33,9 +31,6 @@ from cinder.api.v3 import volumes from cinder.api import versions -LOG = logging.getLogger(__name__) - - class APIRouter(cinder.api.openstack.APIRouter): """Routes requests on the API to the appropriate controller and method.""" ExtensionManager = extensions.ExtensionManager diff --git a/cinder/api/views/backups.py b/cinder/api/views/backups.py index 7c84cc34a8b..6778df62d19 100644 --- a/cinder/api/views/backups.py +++ b/cinder/api/views/backups.py @@ -13,14 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from cinder.api import common -LOG = logging.getLogger(__name__) - - class ViewBuilder(common.ViewBuilder): """Model backup API responses as a python dictionary.""" diff --git a/cinder/api/views/cgsnapshots.py b/cinder/api/views/cgsnapshots.py index d8f92fcb37a..37175995bb4 100644 --- a/cinder/api/views/cgsnapshots.py +++ b/cinder/api/views/cgsnapshots.py @@ -13,14 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from cinder.api import common -LOG = logging.getLogger(__name__) - - class ViewBuilder(common.ViewBuilder): """Model cgsnapshot API responses as a python dictionary.""" diff --git a/cinder/api/views/consistencygroups.py b/cinder/api/views/consistencygroups.py index 05d4c3a3b38..8fec2801e0d 100644 --- a/cinder/api/views/consistencygroups.py +++ b/cinder/api/views/consistencygroups.py @@ -13,14 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from cinder.api import common -LOG = logging.getLogger(__name__) - - class ViewBuilder(common.ViewBuilder): """Model consistencygroup API responses as a python dictionary.""" diff --git a/cinder/api/views/qos_specs.py b/cinder/api/views/qos_specs.py index 9862056ca17..ad49f8fff22 100644 --- a/cinder/api/views/qos_specs.py +++ b/cinder/api/views/qos_specs.py @@ -13,14 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from cinder.api import common -LOG = logging.getLogger(__name__) - - class ViewBuilder(common.ViewBuilder): """Model QoS specs API responses as a python dictionary.""" diff --git a/cinder/api/views/snapshots.py b/cinder/api/views/snapshots.py index 79a7b0b2d8e..56f77337b59 100644 --- a/cinder/api/views/snapshots.py +++ b/cinder/api/views/snapshots.py @@ -13,14 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from cinder.api import common -LOG = logging.getLogger(__name__) - - class ViewBuilder(common.ViewBuilder): """Model snapshot API responses as a python dictionary.""" diff --git a/cinder/api/views/transfers.py b/cinder/api/views/transfers.py index 7a4a5ac1f90..167dffb7ebd 100644 --- a/cinder/api/views/transfers.py +++ b/cinder/api/views/transfers.py @@ -13,14 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from cinder.api import common -LOG = logging.getLogger(__name__) - - class ViewBuilder(common.ViewBuilder): """Model transfer API responses as a python dictionary.""" diff --git a/cinder/objects/backup.py b/cinder/objects/backup.py index 90751bac2ef..f16abc004de 100644 --- a/cinder/objects/backup.py +++ b/cinder/objects/backup.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from oslo_serialization import base64 from oslo_serialization import jsonutils from oslo_utils import versionutils @@ -26,8 +25,8 @@ from cinder import objects from cinder.objects import base from cinder.objects import fields as c_fields + CONF = cfg.CONF -LOG = logging.getLogger(__name__) @base.CinderObjectRegistry.register diff --git a/cinder/objects/service.py b/cinder/objects/service.py index e19f65ca717..9bf2fdc5aa5 100644 --- a/cinder/objects/service.py +++ b/cinder/objects/service.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from oslo_utils import versionutils from oslo_versionedobjects import fields @@ -23,8 +22,6 @@ from cinder import objects from cinder.objects import base from cinder.objects import fields as c_fields -LOG = logging.getLogger(__name__) - @base.CinderObjectRegistry.register class Service(base.CinderPersistentObject, base.CinderObject, diff --git a/cinder/objects/snapshot.py b/cinder/objects/snapshot.py index 63b0aced758..08d4b48efd8 100644 --- a/cinder/objects/snapshot.py +++ b/cinder/objects/snapshot.py @@ -13,7 +13,6 @@ # 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 @@ -23,8 +22,9 @@ from cinder.i18n import _ from cinder import objects from cinder.objects import base from cinder.objects import fields as c_fields + + CONF = cfg.CONF -LOG = logging.getLogger(__name__) @base.CinderObjectRegistry.register diff --git a/cinder/objects/volume.py b/cinder/objects/volume.py index 3205c7d021c..b4fb393f72e 100644 --- a/cinder/objects/volume.py +++ b/cinder/objects/volume.py @@ -13,7 +13,6 @@ # 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 @@ -23,8 +22,8 @@ from cinder.i18n import _ from cinder import objects from cinder.objects import base + CONF = cfg.CONF -LOG = logging.getLogger(__name__) class MetadataObject(dict): diff --git a/cinder/objects/volume_attachment.py b/cinder/objects/volume_attachment.py index 958fbf79dff..0fdc1949031 100644 --- a/cinder/objects/volume_attachment.py +++ b/cinder/objects/volume_attachment.py @@ -12,15 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from oslo_versionedobjects import fields from cinder import db from cinder import objects from cinder.objects import base -LOG = logging.getLogger(__name__) - @base.CinderObjectRegistry.register class VolumeAttachment(base.CinderPersistentObject, base.CinderObject, diff --git a/cinder/objects/volume_type.py b/cinder/objects/volume_type.py index de964d8631c..546c551788b 100644 --- a/cinder/objects/volume_type.py +++ b/cinder/objects/volume_type.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from oslo_versionedobjects import fields from cinder import exception @@ -21,8 +20,8 @@ from cinder import objects from cinder.objects import base from cinder.volume import volume_types + OPTIONAL_FIELDS = ['extra_specs', 'projects'] -LOG = logging.getLogger(__name__) @base.CinderObjectRegistry.register diff --git a/cinder/replication/api.py b/cinder/replication/api.py index 39022d098d7..7f211439b20 100644 --- a/cinder/replication/api.py +++ b/cinder/replication/api.py @@ -17,8 +17,6 @@ Handles all requests relating to volume replication. """ import functools -from oslo_log import log as logging - from cinder.db import base from cinder import exception from cinder.i18n import _ @@ -28,8 +26,6 @@ from cinder.volume import rpcapi as volume_rpcapi from cinder.volume import utils as volume_utils -LOG = logging.getLogger(__name__) - PROMOTE_PROCEED_STATUS = ('active', 'active-stopped') REENABLE_PROCEED_STATUS = ('inactive', 'active-stopped', 'error') diff --git a/cinder/scheduler/filters/affinity_filter.py b/cinder/scheduler/filters/affinity_filter.py index f6887d13cbd..7d2910a2df7 100644 --- a/cinder/scheduler/filters/affinity_filter.py +++ b/cinder/scheduler/filters/affinity_filter.py @@ -14,14 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from oslo_log import log as logging from oslo_utils import uuidutils from cinder.scheduler import filters from cinder.volume import api as volume -LOG = logging.getLogger(__name__) - class AffinityFilter(filters.BaseHostFilter): def __init__(self): diff --git a/cinder/scheduler/weights/volume_number.py b/cinder/scheduler/weights/volume_number.py index 619989f3499..345fd7c1694 100644 --- a/cinder/scheduler/weights/volume_number.py +++ b/cinder/scheduler/weights/volume_number.py @@ -23,15 +23,11 @@ number and the weighing has the opposite effect of the default. from oslo_config import cfg -from oslo_log import log as logging from cinder import db from cinder.scheduler import weights -LOG = logging.getLogger(__name__) - - volume_number_weight_opts = [ cfg.FloatOpt('volume_number_multiplier', default=-1.0, diff --git a/cinder/test.py b/cinder/test.py index 5fd0a6b5f77..bc914946497 100644 --- a/cinder/test.py +++ b/cinder/test.py @@ -33,7 +33,6 @@ from oslo_concurrency import lockutils from oslo_config import cfg from oslo_config import fixture as config_fixture from oslo_log.fixture import logging_error as log_fixture -from oslo_log import log from oslo_messaging import conffixture as messaging_conffixture from oslo_utils import strutils from oslo_utils import timeutils @@ -54,8 +53,6 @@ from cinder.tests.unit import fake_notifier CONF = cfg.CONF -LOG = log.getLogger(__name__) - _DB_CACHE = None diff --git a/cinder/tests/unit/objects/test_snapshot.py b/cinder/tests/unit/objects/test_snapshot.py index d6904721873..0e92a896418 100644 --- a/cinder/tests/unit/objects/test_snapshot.py +++ b/cinder/tests/unit/objects/test_snapshot.py @@ -16,8 +16,6 @@ import copy import mock import six -from oslo_log import log as logging - from cinder.db.sqlalchemy import models from cinder import exception from cinder import objects @@ -28,9 +26,6 @@ from cinder.tests.unit import fake_volume from cinder.tests.unit import objects as test_objects -LOG = logging.getLogger(__name__) - - fake_db_snapshot = fake_snapshot.fake_db_snapshot( cgsnapshot_id=fake.CGSNAPSHOT_ID) del fake_db_snapshot['metadata'] diff --git a/cinder/tests/unit/test_huawei_drivers.py b/cinder/tests/unit/test_huawei_drivers.py index 52bf49c2f41..79d11a63288 100644 --- a/cinder/tests/unit/test_huawei_drivers.py +++ b/cinder/tests/unit/test_huawei_drivers.py @@ -22,8 +22,6 @@ import tempfile import time from xml.dom import minidom -from oslo_log import log as logging - from cinder import exception from cinder import test from cinder.tests.unit import utils @@ -38,7 +36,6 @@ from cinder.volume.drivers.huawei import replication from cinder.volume.drivers.huawei import rest_client from cinder.volume.drivers.huawei import smartx -LOG = logging.getLogger(__name__) hypermetro_devices = """{ "remote_device": { diff --git a/cinder/tests/unit/test_xio.py b/cinder/tests/unit/test_xio.py index 3ebb0825aba..150fc54162c 100644 --- a/cinder/tests/unit/test_xio.py +++ b/cinder/tests/unit/test_xio.py @@ -14,7 +14,6 @@ # under the License. import mock -from oslo_log import log as logging from cinder import context from cinder import exception @@ -24,7 +23,6 @@ from cinder.volume.drivers import xio from cinder.volume import qos_specs from cinder.volume import volume_types -LOG = logging.getLogger("cinder.volume.driver") ISE_IP1 = '10.12.12.1' ISE_IP2 = '10.11.12.2' diff --git a/cinder/volume/configuration.py b/cinder/volume/configuration.py index 8b6fb36a14b..12b07bd1080 100644 --- a/cinder/volume/configuration.py +++ b/cinder/volume/configuration.py @@ -40,11 +40,9 @@ and registered in the group in which they are used. from oslo_config import cfg -from oslo_log import log as logging CONF = cfg.CONF -LOG = logging.getLogger(__name__) class Configuration(object): diff --git a/cinder/volume/drivers/dothill/dothill_fc.py b/cinder/volume/drivers/dothill/dothill_fc.py index 529b31aa441..d088bf087a8 100644 --- a/cinder/volume/drivers/dothill/dothill_fc.py +++ b/cinder/volume/drivers/dothill/dothill_fc.py @@ -14,15 +14,11 @@ # under the License. # -from oslo_log import log as logging - import cinder.volume.driver from cinder.volume.drivers.dothill import dothill_common from cinder.volume.drivers.san import san from cinder.zonemanager import utils as fczm_utils -LOG = logging.getLogger(__name__) - class DotHillFCDriver(cinder.volume.driver.FibreChannelDriver): """OpenStack Fibre Channel cinder drivers for DotHill Arrays. diff --git a/cinder/volume/drivers/huawei/fc_zone_helper.py b/cinder/volume/drivers/huawei/fc_zone_helper.py index 7e0a8a4e839..4acbd107ca6 100644 --- a/cinder/volume/drivers/huawei/fc_zone_helper.py +++ b/cinder/volume/drivers/huawei/fc_zone_helper.py @@ -21,6 +21,7 @@ from cinder import exception from cinder.i18n import _ from cinder.volume.drivers.huawei import constants + LOG = logging.getLogger(__name__) diff --git a/cinder/volume/drivers/netapp/dataontap/fc_7mode.py b/cinder/volume/drivers/netapp/dataontap/fc_7mode.py index 7209e8c82e3..1b98faa193a 100644 --- a/cinder/volume/drivers/netapp/dataontap/fc_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/fc_7mode.py @@ -16,16 +16,11 @@ Volume driver for NetApp Data ONTAP (7-mode) FibreChannel storage systems. """ -from oslo_log import log as logging - from cinder.volume import driver from cinder.volume.drivers.netapp.dataontap import block_7mode from cinder.zonemanager import utils as fczm_utils -LOG = logging.getLogger(__name__) - - class NetApp7modeFibreChannelDriver(driver.BaseVD, driver.ConsistencyGroupVD, driver.ManageableVD, diff --git a/cinder/volume/drivers/netapp/dataontap/fc_cmode.py b/cinder/volume/drivers/netapp/dataontap/fc_cmode.py index efd9795f2de..f5bdac31391 100644 --- a/cinder/volume/drivers/netapp/dataontap/fc_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/fc_cmode.py @@ -16,16 +16,11 @@ Volume driver for NetApp Data ONTAP (C-mode) FibreChannel storage systems. """ -from oslo_log import log as logging - from cinder.volume import driver from cinder.volume.drivers.netapp.dataontap import block_cmode from cinder.zonemanager import utils as fczm_utils -LOG = logging.getLogger(__name__) - - class NetAppCmodeFibreChannelDriver(driver.BaseVD, driver.ConsistencyGroupVD, driver.ManageableVD, diff --git a/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py b/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py index d3e09ef33a8..06a9be0471c 100644 --- a/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/iscsi_7mode.py @@ -16,15 +16,10 @@ Volume driver for NetApp Data ONTAP (7-mode) iSCSI storage systems. """ -from oslo_log import log as logging - from cinder.volume import driver from cinder.volume.drivers.netapp.dataontap import block_7mode -LOG = logging.getLogger(__name__) - - class NetApp7modeISCSIDriver(driver.BaseVD, driver.ConsistencyGroupVD, driver.ManageableVD, diff --git a/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py b/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py index e11e6d960d4..ce8b286b410 100644 --- a/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/iscsi_cmode.py @@ -16,15 +16,10 @@ Volume driver for NetApp Data ONTAP (C-mode) iSCSI storage systems. """ -from oslo_log import log as logging - from cinder.volume import driver from cinder.volume.drivers.netapp.dataontap import block_cmode -LOG = logging.getLogger(__name__) - - class NetAppCmodeISCSIDriver(driver.BaseVD, driver.ConsistencyGroupVD, driver.ManageableVD, diff --git a/cinder/volume/drivers/netapp/eseries/fc_driver.py b/cinder/volume/drivers/netapp/eseries/fc_driver.py index 39319cf1cf5..06085f2fca1 100644 --- a/cinder/volume/drivers/netapp/eseries/fc_driver.py +++ b/cinder/volume/drivers/netapp/eseries/fc_driver.py @@ -16,15 +16,11 @@ Volume driver for NetApp E-Series FibreChannel storage systems. """ -from oslo_log import log as logging - from cinder.volume import driver from cinder.volume.drivers.netapp.eseries import library from cinder.volume.drivers.netapp import utils as na_utils from cinder.zonemanager import utils as fczm_utils -LOG = logging.getLogger(__name__) - class NetAppEseriesFibreChannelDriver(driver.BaseVD, driver.ManageableVD, diff --git a/cinder/volume/drivers/netapp/eseries/iscsi_driver.py b/cinder/volume/drivers/netapp/eseries/iscsi_driver.py index dcb66a43977..8b67187eeec 100644 --- a/cinder/volume/drivers/netapp/eseries/iscsi_driver.py +++ b/cinder/volume/drivers/netapp/eseries/iscsi_driver.py @@ -18,16 +18,11 @@ Volume driver for NetApp E-Series iSCSI storage systems. """ -from oslo_log import log as logging - from cinder.volume import driver from cinder.volume.drivers.netapp.eseries import library from cinder.volume.drivers.netapp import utils as na_utils -LOG = logging.getLogger(__name__) - - class NetAppEseriesISCSIDriver(driver.BaseVD, driver.ManageableVD, driver.ExtendVD, diff --git a/cinder/volume/drivers/netapp/eseries/utils.py b/cinder/volume/drivers/netapp/eseries/utils.py index 0c699c2cf33..25c053f3cb2 100644 --- a/cinder/volume/drivers/netapp/eseries/utils.py +++ b/cinder/volume/drivers/netapp/eseries/utils.py @@ -20,12 +20,9 @@ import base64 import binascii import uuid -from oslo_log import log as logging import six -LOG = logging.getLogger(__name__) - MULTI_ATTACH_HOST_GROUP_NAME = 'cinder-multi-attach' NULL_REF = '0000000000000000000000000000000000000000' MAX_LUNS_PER_HOST = 256 diff --git a/cinder/wsgi/common.py b/cinder/wsgi/common.py index 0eb47e1a0f6..9c30d5b13f8 100644 --- a/cinder/wsgi/common.py +++ b/cinder/wsgi/common.py @@ -14,14 +14,11 @@ """Utility methods for working with WSGI servers.""" -from oslo_log import log as logging import webob.dec import webob.exc from cinder.i18n import _ -LOG = logging.getLogger(__name__) - class Request(webob.Request): pass diff --git a/cinder/wsgi/eventlet_server.py b/cinder/wsgi/eventlet_server.py index 249be601188..85ac4badb9f 100644 --- a/cinder/wsgi/eventlet_server.py +++ b/cinder/wsgi/eventlet_server.py @@ -17,7 +17,6 @@ from __future__ import print_function import socket from oslo_config import cfg -from oslo_log import log as logging from oslo_service import wsgi from oslo_utils import netutils @@ -39,8 +38,6 @@ socket_opts = [ CONF = cfg.CONF CONF.register_opts(socket_opts) -LOG = logging.getLogger(__name__) - class Server(wsgi.Server): """Server class to manage a WSGI server, serving a WSGI application."""