From 06174a41e48dc8eb4b0f1748c03edda628af8943 Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Sat, 26 Dec 2015 11:10:41 +0800 Subject: [PATCH] Trival: Remove unused logging import Change-Id: I13298e642f25c9f70dcff9b1e056b418edf0a461 --- neutron/agent/common/config.py | 4 ---- neutron/agent/l3/dvr.py | 3 --- neutron/agent/l3/dvr_edge_ha_router.py | 4 ---- neutron/agent/metadata/driver.py | 3 --- neutron/api/rpc/callbacks/consumer/registry.py | 5 ----- neutron/api/rpc/callbacks/producer/registry.py | 5 ----- neutron/api/v2/router.py | 3 --- neutron/api/versions.py | 4 ---- neutron/context.py | 4 ---- neutron/db/address_scope_db.py | 3 --- neutron/db/availability_zone/network.py | 5 ----- neutron/db/extradhcpopt_db.py | 4 ---- neutron/db/l3_gwmode_db.py | 2 -- neutron/db/metering/metering_db.py | 4 ---- neutron/db/portsecurity_db_common.py | 3 --- neutron/db/qos/models.py | 4 ---- neutron/db/sqlalchemyutils.py | 4 ---- neutron/extensions/metering.py | 3 --- neutron/extensions/servicetype.py | 3 --- neutron/ipam/drivers/neutrondb_ipam/db_api.py | 2 -- neutron/pecan_wsgi/hooks/policy_enforcement.py | 3 --- .../ml2/drivers/l2pop/rpc_manager/l2population_rpc.py | 3 --- .../ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py | 4 ---- .../ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py | 4 ---- neutron/services/firewall/agents/firewall_agent_api.py | 2 -- neutron/services/qos/qos_plugin.py | 5 ----- neutron/tests/api/base.py | 3 --- neutron/tests/api/clients.py | 3 --- neutron/tests/api/test_flavors_extensions.py | 4 ---- neutron/tests/api/test_metering_extensions.py | 4 ---- neutron/tests/fullstack/resources/environment.py | 3 --- neutron/tests/functional/agent/l2/base.py | 3 --- neutron/tests/functional/agent/l3/framework.py | 1 - neutron/tests/functional/agent/linux/test_keepalived.py | 4 ---- neutron/tests/functional/agent/test_l2_lb_agent.py | 2 -- neutron/tests/tempest/auth.py | 3 --- neutron/tests/tempest/common/cred_provider.py | 2 -- neutron/tests/tempest/common/generator/base_generator.py | 4 ---- neutron/tests/tempest/common/generator/negative_generator.py | 4 ---- neutron/tests/tempest/common/generator/valid_generator.py | 4 ---- neutron/tests/unit/agent/linux/test_dhcp.py | 3 --- neutron/tests/unit/extensions/test_agent.py | 3 --- neutron/tests/unit/extensions/test_availability_zone.py | 5 ----- neutron/tests/unit/extensions/test_external_net.py | 3 --- neutron/tests/unit/extensions/test_extra_dhcp_opt.py | 2 -- neutron/tests/unit/extensions/test_extraroute.py | 3 --- neutron/tests/unit/extensions/test_l3.py | 2 -- neutron/tests/unit/plugins/ml2/drivers/mech_fake_agent.py | 4 ---- neutron/tests/unit/test_manager.py | 2 -- 49 files changed, 164 deletions(-) diff --git a/neutron/agent/common/config.py b/neutron/agent/common/config.py index d8ed1a133..d3594c4b8 100644 --- a/neutron/agent/common/config.py +++ b/neutron/agent/common/config.py @@ -16,15 +16,11 @@ import os from oslo_config import cfg -from oslo_log import log as logging from neutron._i18n import _ from neutron.common import config -LOG = logging.getLogger(__name__) - - ROOT_HELPER_OPTS = [ cfg.StrOpt('root_helper', default='sudo', help=_("Root helper application. " diff --git a/neutron/agent/l3/dvr.py b/neutron/agent/l3/dvr.py index 81aa2172c..6045d0222 100644 --- a/neutron/agent/l3/dvr.py +++ b/neutron/agent/l3/dvr.py @@ -14,12 +14,9 @@ import weakref -from oslo_log import log as logging - from neutron.agent.l3 import dvr_fip_ns from neutron.agent.l3 import dvr_snat_ns -LOG = logging.getLogger(__name__) # TODO(Carl) Following constants retained to increase SNR during refactoring SNAT_INT_DEV_PREFIX = dvr_snat_ns.SNAT_INT_DEV_PREFIX diff --git a/neutron/agent/l3/dvr_edge_ha_router.py b/neutron/agent/l3/dvr_edge_ha_router.py index ecd7a0e63..d0844ca75 100644 --- a/neutron/agent/l3/dvr_edge_ha_router.py +++ b/neutron/agent/l3/dvr_edge_ha_router.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from neutron.agent.l3.dvr_edge_router import DvrEdgeRouter from neutron.agent.l3 import dvr_snat_ns from neutron.agent.l3.ha_router import HaRouter from neutron.agent.l3.router_info import RouterInfo from neutron.common import constants as l3_constants -LOG = logging.getLogger(__name__) - class DvrEdgeHaRouter(DvrEdgeRouter, HaRouter): """Router class which represents a centralized SNAT diff --git a/neutron/agent/metadata/driver.py b/neutron/agent/metadata/driver.py index f25c28c54..cee81c0d8 100644 --- a/neutron/agent/metadata/driver.py +++ b/neutron/agent/metadata/driver.py @@ -15,8 +15,6 @@ import os -from oslo_log import log as logging - from neutron.agent.common import config from neutron.agent.l3 import ha_router from neutron.agent.l3 import namespaces @@ -28,7 +26,6 @@ from neutron.callbacks import resources from neutron.common import constants from neutron.common import exceptions -LOG = logging.getLogger(__name__) # Access with redirection to metadata proxy iptables mark mask METADATA_SERVICE_NAME = 'metadata-proxy' diff --git a/neutron/api/rpc/callbacks/consumer/registry.py b/neutron/api/rpc/callbacks/consumer/registry.py index 3f6c5754f..a59b5db9e 100644 --- a/neutron/api/rpc/callbacks/consumer/registry.py +++ b/neutron/api/rpc/callbacks/consumer/registry.py @@ -10,14 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from neutron.api.rpc.callbacks import resource_manager -LOG = logging.getLogger(__name__) - - #TODO(ajo): consider adding locking to _get_manager, it's # safe for eventlet, but not for normal threading. def _get_manager(): diff --git a/neutron/api/rpc/callbacks/producer/registry.py b/neutron/api/rpc/callbacks/producer/registry.py index b19a8bfd5..92124c54b 100644 --- a/neutron/api/rpc/callbacks/producer/registry.py +++ b/neutron/api/rpc/callbacks/producer/registry.py @@ -10,16 +10,11 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from neutron.api.rpc.callbacks import exceptions from neutron.api.rpc.callbacks import resource_manager from neutron.objects import base -LOG = logging.getLogger(__name__) - - # TODO(ajo): consider adding locking: it's safe for eventlet but not # for other types of threading. def _get_manager(): diff --git a/neutron/api/v2/router.py b/neutron/api/v2/router.py index c23679dfa..6389c8349 100644 --- a/neutron/api/v2/router.py +++ b/neutron/api/v2/router.py @@ -14,7 +14,6 @@ # limitations under the License. from oslo_config import cfg -from oslo_log import log as logging from oslo_service import wsgi as base_wsgi import routes as routes_mapper import six @@ -32,8 +31,6 @@ from neutron.quota import resource_registry from neutron import wsgi -LOG = logging.getLogger(__name__) - RESOURCES = {'network': 'networks', 'subnet': 'subnets', 'subnetpool': 'subnetpools', diff --git a/neutron/api/versions.py b/neutron/api/versions.py index f806b0cdd..8a7077312 100644 --- a/neutron/api/versions.py +++ b/neutron/api/versions.py @@ -14,7 +14,6 @@ # under the License. import oslo_i18n -from oslo_log import log as logging import webob.dec from neutron._i18n import _ @@ -22,9 +21,6 @@ from neutron.api.views import versions as versions_view from neutron import wsgi -LOG = logging.getLogger(__name__) - - class Versions(object): @classmethod diff --git a/neutron/context.py b/neutron/context.py index 3076ae249..4a37263c4 100644 --- a/neutron/context.py +++ b/neutron/context.py @@ -19,15 +19,11 @@ import copy import datetime from oslo_context import context as oslo_context -from oslo_log import log as logging from neutron.db import api as db_api from neutron import policy -LOG = logging.getLogger(__name__) - - class ContextBase(oslo_context.RequestContext): """Security context and request information. diff --git a/neutron/db/address_scope_db.py b/neutron/db/address_scope_db.py index d6b5892c9..26c8888c3 100644 --- a/neutron/db/address_scope_db.py +++ b/neutron/db/address_scope_db.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 uuidutils import sqlalchemy as sa from sqlalchemy.orm import exc @@ -23,8 +22,6 @@ from neutron.db import model_base from neutron.db import models_v2 from neutron.extensions import address_scope as ext_address_scope -LOG = logging.getLogger(__name__) - class AddressScope(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant): """Represents a neutron address scope.""" diff --git a/neutron/db/availability_zone/network.py b/neutron/db/availability_zone/network.py index 9888b1cae..5b4b98412 100644 --- a/neutron/db/availability_zone/network.py +++ b/neutron/db/availability_zone/network.py @@ -11,17 +11,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from neutron.api.v2 import attributes from neutron.db import common_db_mixin from neutron.extensions import availability_zone as az_ext from neutron.extensions import network_availability_zone as net_az -LOG = logging.getLogger(__name__) - - class NetworkAvailabilityZoneMixin(net_az.NetworkAvailabilityZonePluginBase): """Mixin class to enable network's availability zone attributes.""" diff --git a/neutron/db/extradhcpopt_db.py b/neutron/db/extradhcpopt_db.py index c6d1c6e48..a2d4a02c4 100644 --- a/neutron/db/extradhcpopt_db.py +++ b/neutron/db/extradhcpopt_db.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 sqlalchemy as sa from sqlalchemy import orm @@ -24,9 +23,6 @@ from neutron.db import models_v2 from neutron.extensions import extra_dhcp_opt as edo_ext -LOG = logging.getLogger(__name__) - - class ExtraDhcpOpt(model_base.BASEV2, models_v2.HasId): """Represent a generic concept of extra options associated to a port. diff --git a/neutron/db/l3_gwmode_db.py b/neutron/db/l3_gwmode_db.py index 6252b5bd8..ad218233d 100644 --- a/neutron/db/l3_gwmode_db.py +++ b/neutron/db/l3_gwmode_db.py @@ -14,7 +14,6 @@ # from oslo_config import cfg -from oslo_log import log as logging import sqlalchemy as sa from sqlalchemy import sql @@ -24,7 +23,6 @@ from neutron.db import l3_db from neutron.extensions import l3 -LOG = logging.getLogger(__name__) OPTS = [ cfg.BoolOpt('enable_snat_by_default', default=True, help=_('Define the default value of enable_snat if not ' diff --git a/neutron/db/metering/metering_db.py b/neutron/db/metering/metering_db.py index 7d28af0f7..51f0f5737 100644 --- a/neutron/db/metering/metering_db.py +++ b/neutron/db/metering/metering_db.py @@ -13,7 +13,6 @@ # under the License. import netaddr -from oslo_log import log as logging from oslo_utils import uuidutils import sqlalchemy as sa from sqlalchemy import orm @@ -29,9 +28,6 @@ from neutron.db import models_v2 from neutron.extensions import metering -LOG = logging.getLogger(__name__) - - class MeteringLabelRule(model_base.BASEV2, models_v2.HasId): direction = sa.Column(sa.Enum('ingress', 'egress', name='meteringlabels_direction')) diff --git a/neutron/db/portsecurity_db_common.py b/neutron/db/portsecurity_db_common.py index e348f81b1..646222723 100644 --- a/neutron/db/portsecurity_db_common.py +++ b/neutron/db/portsecurity_db_common.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging import sqlalchemy as sa from sqlalchemy import orm from sqlalchemy.orm import exc @@ -21,8 +20,6 @@ from neutron.db import model_base from neutron.db import models_v2 from neutron.extensions import portsecurity as psec -LOG = logging.getLogger(__name__) - class PortSecurityBinding(model_base.BASEV2): port_id = sa.Column(sa.String(36), diff --git a/neutron/db/qos/models.py b/neutron/db/qos/models.py index 3e1d027c6..3a8b44d3d 100755 --- a/neutron/db/qos/models.py +++ b/neutron/db/qos/models.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 sqlalchemy as sa from neutron.api.v2 import attributes as attrs @@ -21,9 +20,6 @@ from neutron.db import model_base from neutron.db import models_v2 -LOG = logging.getLogger(__name__) - - class QosPolicy(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant): __tablename__ = 'qos_policies' name = sa.Column(sa.String(attrs.NAME_MAX_LEN)) diff --git a/neutron/db/sqlalchemyutils.py b/neutron/db/sqlalchemyutils.py index b720554d8..92c5db2ea 100644 --- a/neutron/db/sqlalchemyutils.py +++ b/neutron/db/sqlalchemyutils.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from six import moves import sqlalchemy from sqlalchemy.orm import properties @@ -22,9 +21,6 @@ from neutron._i18n import _ from neutron.common import exceptions as n_exc -LOG = logging.getLogger(__name__) - - def paginate_query(query, model, limit, sorts, marker_obj=None): """Returns a query with sorting / pagination criteria added. diff --git a/neutron/extensions/metering.py b/neutron/extensions/metering.py index 9410f51fd..8b9f919ab 100644 --- a/neutron/extensions/metering.py +++ b/neutron/extensions/metering.py @@ -14,7 +14,6 @@ import abc -from oslo_log import log as logging import six from neutron._i18n import _ @@ -25,8 +24,6 @@ from neutron.common import exceptions as nexception from neutron.plugins.common import constants from neutron.services import service_base -LOG = logging.getLogger(__name__) - class MeteringLabelNotFound(nexception.NotFound): message = _("Metering label %(label_id)s does not exist") diff --git a/neutron/extensions/servicetype.py b/neutron/extensions/servicetype.py index adecd81aa..b7f18718e 100644 --- a/neutron/extensions/servicetype.py +++ b/neutron/extensions/servicetype.py @@ -13,15 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from neutron._i18n import _ from neutron.api import extensions from neutron.api.v2 import attributes from neutron.api.v2 import base from neutron.db import servicetype_db -LOG = logging.getLogger(__name__) RESOURCE_NAME = "service_provider" COLLECTION_NAME = "%ss" % RESOURCE_NAME diff --git a/neutron/ipam/drivers/neutrondb_ipam/db_api.py b/neutron/ipam/drivers/neutrondb_ipam/db_api.py index 4fc3c0ca2..768e6ee0d 100644 --- a/neutron/ipam/drivers/neutrondb_ipam/db_api.py +++ b/neutron/ipam/drivers/neutrondb_ipam/db_api.py @@ -14,14 +14,12 @@ # under the License. from oslo_db import exception as db_exc -from oslo_log import log from oslo_utils import uuidutils from sqlalchemy.orm import exc as orm_exc from neutron.ipam.drivers.neutrondb_ipam import db_models from neutron.ipam import exceptions as ipam_exc -LOG = log.getLogger(__name__) # Database operations for Neutron's DB-backed IPAM driver diff --git a/neutron/pecan_wsgi/hooks/policy_enforcement.py b/neutron/pecan_wsgi/hooks/policy_enforcement.py index e0bc77418..cc9ed3162 100644 --- a/neutron/pecan_wsgi/hooks/policy_enforcement.py +++ b/neutron/pecan_wsgi/hooks/policy_enforcement.py @@ -16,7 +16,6 @@ import copy import simplejson -from oslo_log import log from oslo_policy import policy as oslo_policy from oslo_utils import excutils import pecan @@ -29,8 +28,6 @@ from neutron import manager from neutron.pecan_wsgi.hooks import attribute_population from neutron import policy -LOG = log.getLogger(__name__) - class PolicyHook(hooks.PecanHook): priority = 135 diff --git a/neutron/plugins/ml2/drivers/l2pop/rpc_manager/l2population_rpc.py b/neutron/plugins/ml2/drivers/l2pop/rpc_manager/l2population_rpc.py index 509d425ed..908842b1b 100644 --- a/neutron/plugins/ml2/drivers/l2pop/rpc_manager/l2population_rpc.py +++ b/neutron/plugins/ml2/drivers/l2pop/rpc_manager/l2population_rpc.py @@ -17,14 +17,11 @@ import abc from oslo_config import cfg from oslo_log import helpers as log_helpers -from oslo_log import log as logging import six from neutron.common import constants as n_const from neutron.plugins.ml2.drivers.l2pop import rpc as l2pop_rpc -LOG = logging.getLogger(__name__) - @six.add_metaclass(abc.ABCMeta) class L2populationRpcCallBackMixin(object): diff --git a/neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py b/neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py index cfc9e9a80..44c842c22 100644 --- a/neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py +++ b/neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log - from neutron.agent import securitygroups_rpc from neutron.common import constants from neutron.extensions import portbindings from neutron.plugins.common import constants as p_constants from neutron.plugins.ml2.drivers import mech_agent -LOG = log.getLogger(__name__) - class LinuxbridgeMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase): """Attach to networks using linuxbridge L2 agent. diff --git a/neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py b/neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py index cc7007ac3..0a835243b 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py +++ b/neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py @@ -15,8 +15,6 @@ import os -from oslo_log import log - from neutron.agent import securitygroups_rpc from neutron.common import constants from neutron.extensions import portbindings @@ -27,8 +25,6 @@ from neutron.plugins.ml2.drivers.openvswitch.agent.common \ import constants as a_const from neutron.services.qos import qos_consts -LOG = log.getLogger(__name__) - class OpenvswitchMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase): """Attach to networks using openvswitch L2 agent. diff --git a/neutron/services/firewall/agents/firewall_agent_api.py b/neutron/services/firewall/agents/firewall_agent_api.py index 2c274c5d0..ede77c321 100644 --- a/neutron/services/firewall/agents/firewall_agent_api.py +++ b/neutron/services/firewall/agents/firewall_agent_api.py @@ -14,13 +14,11 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging import oslo_messaging from neutron._i18n import _ from neutron.common import rpc as n_rpc -LOG = logging.getLogger(__name__) FWaaSOpts = [ cfg.StrOpt( diff --git a/neutron/services/qos/qos_plugin.py b/neutron/services/qos/qos_plugin.py index 29ff7b58f..1327a7480 100644 --- a/neutron/services/qos/qos_plugin.py +++ b/neutron/services/qos/qos_plugin.py @@ -12,8 +12,6 @@ # 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_log import log as logging - from neutron.common import exceptions as n_exc from neutron.db import api as db_api @@ -26,9 +24,6 @@ from neutron.services.qos.notification_drivers import manager as driver_mgr from neutron.services.qos import qos_consts -LOG = logging.getLogger(__name__) - - class QoSPlugin(qos.QoSPluginBase): """Implementation of the Neutron QoS Service Plugin. diff --git a/neutron/tests/api/base.py b/neutron/tests/api/base.py index 0f31a9a2a..065fd3b3a 100644 --- a/neutron/tests/api/base.py +++ b/neutron/tests/api/base.py @@ -14,7 +14,6 @@ # under the License. import netaddr -from oslo_log import log as logging from tempest_lib.common.utils import data_utils from tempest_lib import exceptions as lib_exc @@ -25,8 +24,6 @@ import neutron.tests.tempest.test CONF = config.CONF -LOG = logging.getLogger(__name__) - class BaseNetworkTest(neutron.tests.tempest.test.BaseTestCase): diff --git a/neutron/tests/api/clients.py b/neutron/tests/api/clients.py index 87594f0f1..9fbdbac41 100644 --- a/neutron/tests/api/clients.py +++ b/neutron/tests/api/clients.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from tempest_lib.services.identity.v2.token_client import TokenClient from tempest_lib.services.identity.v3.token_client import V3TokenClient @@ -40,7 +38,6 @@ from neutron.tests.tempest.services.network.json.network_client import \ CONF = config.CONF -LOG = logging.getLogger(__name__) class Manager(manager.Manager): diff --git a/neutron/tests/api/test_flavors_extensions.py b/neutron/tests/api/test_flavors_extensions.py index ecf3161c9..1ca68ef5b 100644 --- a/neutron/tests/api/test_flavors_extensions.py +++ b/neutron/tests/api/test_flavors_extensions.py @@ -12,16 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from tempest_lib import exceptions as lib_exc from neutron.tests.api import base from neutron.tests.tempest import test -LOG = logging.getLogger(__name__) - - class TestFlavorsJson(base.BaseAdminNetworkTest): """ diff --git a/neutron/tests/api/test_metering_extensions.py b/neutron/tests/api/test_metering_extensions.py index f26b0b2d0..6c759487a 100644 --- a/neutron/tests/api/test_metering_extensions.py +++ b/neutron/tests/api/test_metering_extensions.py @@ -12,16 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from tempest_lib.common.utils import data_utils from neutron.tests.api import base from neutron.tests.tempest import test -LOG = logging.getLogger(__name__) - - class MeteringTestJSON(base.BaseAdminNetworkTest): """ diff --git a/neutron/tests/fullstack/resources/environment.py b/neutron/tests/fullstack/resources/environment.py index 62c8d0adb..1105e8c17 100644 --- a/neutron/tests/fullstack/resources/environment.py +++ b/neutron/tests/fullstack/resources/environment.py @@ -18,7 +18,6 @@ import fixtures import netaddr from neutronclient.common import exceptions as nc_exc from oslo_config import cfg -from oslo_log import log as logging from neutron.agent.linux import utils from neutron.common import utils as common_utils @@ -26,8 +25,6 @@ from neutron.tests.common import net_helpers from neutron.tests.fullstack.resources import config from neutron.tests.fullstack.resources import process -LOG = logging.getLogger(__name__) - class EnvironmentDescription(object): """A set of characteristics of an environment setup. diff --git a/neutron/tests/functional/agent/l2/base.py b/neutron/tests/functional/agent/l2/base.py index 39f1a755d..66609b8f6 100644 --- a/neutron/tests/functional/agent/l2/base.py +++ b/neutron/tests/functional/agent/l2/base.py @@ -19,7 +19,6 @@ import random import eventlet import mock from oslo_config import cfg -from oslo_log import log as logging from oslo_utils import uuidutils from neutron.agent.common import config as agent_config @@ -46,8 +45,6 @@ from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent \ from neutron.tests.common import net_helpers from neutron.tests.functional.agent.linux import base -LOG = logging.getLogger(__name__) - class OVSAgentTestFramework(base.BaseOVSLinuxTestCase): diff --git a/neutron/tests/functional/agent/l3/framework.py b/neutron/tests/functional/agent/l3/framework.py index 465338a90..e5084759a 100644 --- a/neutron/tests/functional/agent/l3/framework.py +++ b/neutron/tests/functional/agent/l3/framework.py @@ -38,7 +38,6 @@ from neutron.tests.common import net_helpers from neutron.tests.functional import base -LOG = logging.getLogger(__name__) _uuid = uuidutils.generate_uuid diff --git a/neutron/tests/functional/agent/linux/test_keepalived.py b/neutron/tests/functional/agent/linux/test_keepalived.py index 47c2613cb..eacbbaf02 100644 --- a/neutron/tests/functional/agent/linux/test_keepalived.py +++ b/neutron/tests/functional/agent/linux/test_keepalived.py @@ -14,7 +14,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from neutron._i18n import _ from neutron.agent.linux import external_process @@ -24,9 +23,6 @@ from neutron.tests import base from neutron.tests.unit.agent.linux import test_keepalived -LOG = logging.getLogger(__name__) - - class KeepalivedManagerTestCase(base.BaseTestCase, test_keepalived.KeepalivedConfBaseMixin): diff --git a/neutron/tests/functional/agent/test_l2_lb_agent.py b/neutron/tests/functional/agent/test_l2_lb_agent.py index 5dfdacd40..74981ade2 100644 --- a/neutron/tests/functional/agent/test_l2_lb_agent.py +++ b/neutron/tests/functional/agent/test_l2_lb_agent.py @@ -14,14 +14,12 @@ import mock from oslo_config import cfg -from oslo_log import log as logging import testtools from neutron.plugins.ml2.drivers.linuxbridge.agent import \ linuxbridge_neutron_agent from neutron.tests.functional.agent.linux import test_ip_lib -LOG = logging.getLogger(__name__) lba = linuxbridge_neutron_agent diff --git a/neutron/tests/tempest/auth.py b/neutron/tests/tempest/auth.py index fc4359778..a9fdb034b 100644 --- a/neutron/tests/tempest/auth.py +++ b/neutron/tests/tempest/auth.py @@ -20,14 +20,11 @@ import exceptions import re import urlparse -from oslo_log import log as logging import six from tempest_lib.services.identity.v2 import token_client as json_v2id from tempest_lib.services.identity.v3 import token_client as json_v3id -LOG = logging.getLogger(__name__) - @six.add_metaclass(abc.ABCMeta) class AuthProvider(object): diff --git a/neutron/tests/tempest/common/cred_provider.py b/neutron/tests/tempest/common/cred_provider.py index 07fa89ffa..b90d09d09 100644 --- a/neutron/tests/tempest/common/cred_provider.py +++ b/neutron/tests/tempest/common/cred_provider.py @@ -14,7 +14,6 @@ import abc -from oslo_log import log as logging import six from neutron.tests.tempest import auth @@ -22,7 +21,6 @@ from neutron.tests.tempest import config from neutron.tests.tempest import exceptions CONF = config.CONF -LOG = logging.getLogger(__name__) # Type of credentials available from configuration CREDENTIAL_TYPES = { diff --git a/neutron/tests/tempest/common/generator/base_generator.py b/neutron/tests/tempest/common/generator/base_generator.py index 6db3f2474..41ed48cc5 100644 --- a/neutron/tests/tempest/common/generator/base_generator.py +++ b/neutron/tests/tempest/common/generator/base_generator.py @@ -19,10 +19,6 @@ import functools import jsonschema import six -from oslo_log import log as logging - -LOG = logging.getLogger(__name__) - def _check_for_expected_result(name, schema): expected_result = None diff --git a/neutron/tests/tempest/common/generator/negative_generator.py b/neutron/tests/tempest/common/generator/negative_generator.py index ba8884f1e..44cd30581 100644 --- a/neutron/tests/tempest/common/generator/negative_generator.py +++ b/neutron/tests/tempest/common/generator/negative_generator.py @@ -15,13 +15,9 @@ import copy -from oslo_log import log as logging - import neutron.tests.tempest.common.generator.base_generator as base import neutron.tests.tempest.common.generator.valid_generator as valid -LOG = logging.getLogger(__name__) - class NegativeTestGenerator(base.BasicGeneratorSet): @base.generator_type("string") diff --git a/neutron/tests/tempest/common/generator/valid_generator.py b/neutron/tests/tempest/common/generator/valid_generator.py index 269820052..bc7014c40 100644 --- a/neutron/tests/tempest/common/generator/valid_generator.py +++ b/neutron/tests/tempest/common/generator/valid_generator.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 import neutron.tests.tempest.common.generator.base_generator as base -LOG = logging.getLogger(__name__) - - class ValidTestGenerator(base.BasicGeneratorSet): @base.generator_type("string") @base.simple_generator diff --git a/neutron/tests/unit/agent/linux/test_dhcp.py b/neutron/tests/unit/agent/linux/test_dhcp.py index 759e32da5..2fce527f5 100644 --- a/neutron/tests/unit/agent/linux/test_dhcp.py +++ b/neutron/tests/unit/agent/linux/test_dhcp.py @@ -18,7 +18,6 @@ import os import mock import netaddr from oslo_config import cfg -from oslo_log import log as logging from neutron.agent.common import config from neutron.agent.dhcp import config as dhcp_config @@ -31,8 +30,6 @@ from neutron.extensions import extra_dhcp_opt as edo_ext from neutron.tests import base from neutron.tests import tools -LOG = logging.getLogger(__name__) - class FakeIPAllocation(object): def __init__(self, address, subnet_id=None): diff --git a/neutron/tests/unit/extensions/test_agent.py b/neutron/tests/unit/extensions/test_agent.py index 21fa1022b..65ef6deba 100644 --- a/neutron/tests/unit/extensions/test_agent.py +++ b/neutron/tests/unit/extensions/test_agent.py @@ -18,7 +18,6 @@ from datetime import datetime import time from oslo_config import cfg -from oslo_log import log as logging from oslo_utils import uuidutils from webob import exc @@ -34,8 +33,6 @@ from neutron.tests.unit.api.v2 import test_base from neutron.tests.unit.db import test_db_base_plugin_v2 -LOG = logging.getLogger(__name__) - _uuid = uuidutils.generate_uuid _get_path = test_base._get_path L3_HOSTA = 'hosta' diff --git a/neutron/tests/unit/extensions/test_availability_zone.py b/neutron/tests/unit/extensions/test_availability_zone.py index 40b045184..553441c6f 100644 --- a/neutron/tests/unit/extensions/test_availability_zone.py +++ b/neutron/tests/unit/extensions/test_availability_zone.py @@ -11,8 +11,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from neutron import context from neutron.db import agents_db from neutron.db import db_base_plugin_v2 @@ -22,9 +20,6 @@ from neutron.tests.common import helpers from neutron.tests.unit.db import test_db_base_plugin_v2 -LOG = logging.getLogger(__name__) - - class AZExtensionManager(object): def get_resources(self): diff --git a/neutron/tests/unit/extensions/test_external_net.py b/neutron/tests/unit/extensions/test_external_net.py index cf833b9d7..25e59ad59 100644 --- a/neutron/tests/unit/extensions/test_external_net.py +++ b/neutron/tests/unit/extensions/test_external_net.py @@ -14,7 +14,6 @@ # under the License. import mock -from oslo_log import log as logging from oslo_utils import uuidutils import testtools from webob import exc @@ -27,8 +26,6 @@ from neutron.tests.unit.api.v2 import test_base from neutron.tests.unit.db import test_db_base_plugin_v2 -LOG = logging.getLogger(__name__) - _uuid = uuidutils.generate_uuid _get_path = test_base._get_path diff --git a/neutron/tests/unit/extensions/test_extra_dhcp_opt.py b/neutron/tests/unit/extensions/test_extra_dhcp_opt.py index 41ad18e85..e1ef765db 100644 --- a/neutron/tests/unit/extensions/test_extra_dhcp_opt.py +++ b/neutron/tests/unit/extensions/test_extra_dhcp_opt.py @@ -15,7 +15,6 @@ import copy -from oslo_log import log as logging import webob.exc from neutron.db import db_base_plugin_v2 @@ -23,7 +22,6 @@ from neutron.db import extradhcpopt_db as edo_db from neutron.extensions import extra_dhcp_opt as edo_ext from neutron.tests.unit.db import test_db_base_plugin_v2 -LOG = logging.getLogger(__name__) DB_PLUGIN_KLASS = ( 'neutron.tests.unit.extensions.test_extra_dhcp_opt.ExtraDhcpOptTestPlugin') diff --git a/neutron/tests/unit/extensions/test_extraroute.py b/neutron/tests/unit/extensions/test_extraroute.py index c3c39dc19..8b4f2e69b 100644 --- a/neutron/tests/unit/extensions/test_extraroute.py +++ b/neutron/tests/unit/extensions/test_extraroute.py @@ -14,7 +14,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from oslo_utils import uuidutils from webob import exc @@ -27,8 +26,6 @@ from neutron.tests.unit.api.v2 import test_base from neutron.tests.unit.extensions import test_l3 as test_l3 -LOG = logging.getLogger(__name__) - _uuid = uuidutils.generate_uuid _get_path = test_base._get_path diff --git a/neutron/tests/unit/extensions/test_l3.py b/neutron/tests/unit/extensions/test_l3.py index f5fcac7d6..7d57c6b12 100644 --- a/neutron/tests/unit/extensions/test_l3.py +++ b/neutron/tests/unit/extensions/test_l3.py @@ -20,7 +20,6 @@ import copy import mock import netaddr from oslo_config import cfg -from oslo_log import log as logging from oslo_utils import importutils from oslo_utils import uuidutils from webob import exc @@ -58,7 +57,6 @@ from neutron.tests.unit.extensions import base as test_extensions_base from neutron.tests.unit.extensions import test_agent from neutron.tests.unit.plugins.ml2 import base as ml2_base -LOG = logging.getLogger(__name__) _uuid = uuidutils.generate_uuid _get_path = test_base._get_path diff --git a/neutron/tests/unit/plugins/ml2/drivers/mech_fake_agent.py b/neutron/tests/unit/plugins/ml2/drivers/mech_fake_agent.py index 4aeca4e4d..2c8744a4d 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/mech_fake_agent.py +++ b/neutron/tests/unit/plugins/ml2/drivers/mech_fake_agent.py @@ -20,16 +20,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from neutron.agent import securitygroups_rpc from neutron.common import constants from neutron.extensions import portbindings from neutron.plugins.common import constants as p_constants from neutron.plugins.ml2.drivers import mech_agent -LOG = logging.getLogger(__name__) - class FakeAgentMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase): """ML2 mechanism driver for testing. diff --git a/neutron/tests/unit/test_manager.py b/neutron/tests/unit/test_manager.py index ba90ac36e..80b0a31a0 100644 --- a/neutron/tests/unit/test_manager.py +++ b/neutron/tests/unit/test_manager.py @@ -15,7 +15,6 @@ import fixtures from oslo_config import cfg -from oslo_log import log as logging from neutron import manager from neutron.plugins.common import constants @@ -24,7 +23,6 @@ from neutron.tests.unit import dummy_plugin from neutron.tests.unit import testlib_api -LOG = logging.getLogger(__name__) DB_PLUGIN_KLASS = 'neutron.db.db_base_plugin_v2.NeutronDbPluginV2' -- 2.45.2