Trival: Remove unused logging import

Change-Id: I13298e642f25c9f70dcff9b1e056b418edf0a461
This commit is contained in:
ChangBo Guo(gcb) 2015-12-26 11:10:41 +08:00
parent 550ab90c1b
commit 06174a41e4
49 changed files with 0 additions and 164 deletions

View File

@ -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. "

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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():

View File

@ -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():

View File

@ -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',

View File

@ -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

View File

@ -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.

View File

@ -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."""

View File

@ -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."""

View File

@ -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.

View File

@ -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 '

View File

@ -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'))

View File

@ -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),

View File

@ -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))

View File

@ -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.

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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):

View File

@ -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.

View File

@ -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.

View File

@ -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(

View File

@ -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.

View File

@ -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):

View File

@ -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):

View File

@ -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):
"""

View File

@ -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):
"""

View File

@ -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.

View File

@ -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):

View File

@ -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

View File

@ -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):

View File

@ -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

View File

@ -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):

View File

@ -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 = {

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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):

View File

@ -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'

View File

@ -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):

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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'