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. "
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
# 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
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
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'
# 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():
# 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():
# 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
from neutron import wsgi
-LOG = logging.getLogger(__name__)
-
RESOURCES = {'network': 'networks',
'subnet': 'subnets',
'subnetpool': 'subnetpools',
# under the License.
import oslo_i18n
-from oslo_log import log as logging
import webob.dec
from neutron._i18n import _
from neutron import wsgi
-LOG = logging.getLogger(__name__)
-
-
class Versions(object):
@classmethod
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.
# 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
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."""
# 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."""
# 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 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.
#
from oslo_config import cfg
-from oslo_log import log as logging
import sqlalchemy as sa
from sqlalchemy import sql
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 '
# 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
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'))
# 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
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),
# 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
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))
# 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
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.
import abc
-from oslo_log import log as logging
import six
from neutron._i18n import _
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")
# 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
# 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
import copy
import simplejson
-from oslo_log import log
from oslo_policy import policy as oslo_policy
from oslo_utils import excutils
import pecan
from neutron.pecan_wsgi.hooks import attribute_population
from neutron import policy
-LOG = log.getLogger(__name__)
-
class PolicyHook(hooks.PecanHook):
priority = 135
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):
# 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.
import os
-from oslo_log import log
-
from neutron.agent import securitygroups_rpc
from neutron.common import constants
from neutron.extensions import portbindings
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.
# 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(
# 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
from neutron.services.qos import qos_consts
-LOG = logging.getLogger(__name__)
-
-
class QoSPlugin(qos.QoSPluginBase):
"""Implementation of the Neutron QoS Service Plugin.
# 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
CONF = config.CONF
-LOG = logging.getLogger(__name__)
-
class BaseNetworkTest(neutron.tests.tempest.test.BaseTestCase):
# 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
CONF = config.CONF
-LOG = logging.getLogger(__name__)
class Manager(manager.Manager):
# 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):
"""
# 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):
"""
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
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.
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
from neutron.tests.common import net_helpers
from neutron.tests.functional.agent.linux import base
-LOG = logging.getLogger(__name__)
-
class OVSAgentTestFramework(base.BaseOVSLinuxTestCase):
from neutron.tests.functional import base
-LOG = logging.getLogger(__name__)
_uuid = uuidutils.generate_uuid
# 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
from neutron.tests.unit.agent.linux import test_keepalived
-LOG = logging.getLogger(__name__)
-
-
class KeepalivedManagerTestCase(base.BaseTestCase,
test_keepalived.KeepalivedConfBaseMixin):
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
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):
import abc
-from oslo_log import log as logging
import six
from neutron.tests.tempest import auth
from neutron.tests.tempest import exceptions
CONF = config.CONF
-LOG = logging.getLogger(__name__)
# Type of credentials available from configuration
CREDENTIAL_TYPES = {
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
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")
# 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
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
from neutron.tests import base
from neutron.tests import tools
-LOG = logging.getLogger(__name__)
-
class FakeIPAllocation(object):
def __init__(self, address, subnet_id=None):
import time
from oslo_config import cfg
-from oslo_log import log as logging
from oslo_utils import uuidutils
from webob import exc
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'
# 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
from neutron.tests.unit.db import test_db_base_plugin_v2
-LOG = logging.getLogger(__name__)
-
-
class AZExtensionManager(object):
def get_resources(self):
# under the License.
import mock
-from oslo_log import log as logging
from oslo_utils import uuidutils
import testtools
from webob import exc
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
import copy
-from oslo_log import log as logging
import webob.exc
from neutron.db import db_base_plugin_v2
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')
# under the License.
from oslo_config import cfg
-from oslo_log import log as logging
from oslo_utils import uuidutils
from webob import exc
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
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
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
# 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.
import fixtures
from oslo_config import cfg
-from oslo_log import log as logging
from neutron import manager
from neutron.plugins.common import constants
from neutron.tests.unit import testlib_api
-LOG = logging.getLogger(__name__)
DB_PLUGIN_KLASS = 'neutron.db.db_base_plugin_v2.NeutronDbPluginV2'