Merge "use neutron_lib's portbindings api-def"

This commit is contained in:
Jenkins 2017-04-02 03:25:51 +00:00 committed by Gerrit Code Review
commit 77f885f06a
70 changed files with 75 additions and 207 deletions

View File

@ -569,7 +569,7 @@ the installer to configure this item in the ``[default]`` section. For example::
interface_driver = networking_foo.agent.linux.interface.FooInterfaceDriver interface_driver = networking_foo.agent.linux.interface.FooInterfaceDriver
**ToDo: Interface Driver port bindings.** **ToDo: Interface Driver port bindings.**
``VIF_TYPE_*`` constants in ``neutron/extensions/portbindings.py`` should be ``VIF_TYPE_*`` constants in ``neutron_lib/api/definitions/portbindings.py`` should be
moved from neutron core to the repositories where their drivers are moved from neutron core to the repositories where their drivers are
implemented. We need to provide some config or hook mechanism for VIF types implemented. We need to provide some config or hook mechanism for VIF types
to be registered by external interface drivers. For Nova, selecting the VIF to be registered by external interface drivers. For Nova, selecting the VIF

View File

@ -17,6 +17,7 @@ import shutil
import signal import signal
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as n_consts from neutron_lib import constants as n_consts
from oslo_log import log as logging from oslo_log import log as logging
@ -27,7 +28,6 @@ from neutron.agent.linux import external_process
from neutron.agent.linux import ip_lib from neutron.agent.linux import ip_lib
from neutron.agent.linux import keepalived from neutron.agent.linux import keepalived
from neutron.common import utils as common_utils from neutron.common import utils as common_utils
from neutron.extensions import portbindings
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
HA_DEV_PREFIX = 'ha-' HA_DEV_PREFIX = 'ha-'

View File

@ -17,6 +17,7 @@ import copy
import itertools import itertools
import operator import operator
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import exceptions from neutron_lib import exceptions
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
@ -33,7 +34,6 @@ from neutron.common import exceptions as n_exc
from neutron.common import utils from neutron.common import utils
from neutron.db import api as db_api from neutron.db import api as db_api
from neutron.db import provisioning_blocks from neutron.db import provisioning_blocks
from neutron.extensions import portbindings
from neutron.extensions import segment as segment_ext from neutron.extensions import segment as segment_ext
from neutron.plugins.common import utils as p_utils from neutron.plugins.common import utils as p_utils
from neutron.quota import resource_registry from neutron.quota import resource_registry

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context as neutron_context from neutron_lib import context as neutron_context
from neutron_lib import exceptions from neutron_lib import exceptions
@ -26,7 +27,6 @@ from neutron.common import constants as n_const
from neutron.common import utils from neutron.common import utils
from neutron.db import api as db_api from neutron.db import api as db_api
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import portbindings
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
@ -33,7 +34,6 @@ from neutron.db import api as db_api
from neutron.db.models import dvr as dvr_models from neutron.db.models import dvr as dvr_models
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import dvr as ext_dvr from neutron.extensions import dvr as ext_dvr
from neutron.extensions import portbindings
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -18,6 +18,7 @@ import copy
import itertools import itertools
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib.api import validators from neutron_lib.api import validators
from neutron_lib import constants as const from neutron_lib import constants as const
from neutron_lib import exceptions as exc from neutron_lib import exceptions as exc
@ -38,7 +39,6 @@ from neutron.db.models import segment as segment_model
from neutron.db.models import subnet_service_type as sst_model from neutron.db.models import subnet_service_type as sst_model
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import ip_allocation as ipa from neutron.extensions import ip_allocation as ipa
from neutron.extensions import portbindings
from neutron.extensions import segment from neutron.extensions import segment
from neutron.ipam import exceptions as ipam_exceptions from neutron.ipam import exceptions as ipam_exceptions
from neutron.ipam import utils as ipam_utils from neutron.ipam import utils as ipam_utils

View File

@ -16,6 +16,7 @@
import copy import copy
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
from oslo_db import exception as db_exc from oslo_db import exception as db_exc
@ -28,7 +29,6 @@ from neutron.common import constants as n_const
from neutron.common import ipv6_utils from neutron.common import ipv6_utils
from neutron.db import ipam_backend_mixin from neutron.db import ipam_backend_mixin
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import portbindings
from neutron.ipam import driver from neutron.ipam import driver
from neutron.ipam import exceptions as ipam_exc from neutron.ipam import exceptions as ipam_exc

View File

@ -13,6 +13,7 @@
# under the License. # under the License.
import collections import collections
from neutron_lib.api.definitions import portbindings
from neutron_lib.api import validators from neutron_lib.api import validators
from neutron_lib import constants as const from neutron_lib import constants as const
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
@ -38,7 +39,6 @@ from neutron.db.models import l3 as l3_models
from neutron.db.models import l3agent as rb_model from neutron.db.models import l3agent as rb_model
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import portbindings
from neutron.ipam import utils as ipam_utils from neutron.ipam import utils as ipam_utils
from neutron.plugins.common import utils as p_utils from neutron.plugins.common import utils as p_utils

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as n_const from neutron_lib import constants as n_const
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from oslo_log import log as logging from oslo_log import log as logging
@ -27,7 +28,6 @@ from neutron.db import agentschedulers_db
from neutron.db import l3_agentschedulers_db as l3agent_sch_db from neutron.db import l3_agentschedulers_db as l3agent_sch_db
from neutron.db.models import l3agent as rb_model from neutron.db.models import l3agent as rb_model
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import portbindings
from neutron.plugins.ml2 import db as ml2_db from neutron.plugins.ml2 import db as ml2_db
from neutron.plugins.ml2 import models as ml2_models from neutron.plugins.ml2 import models as ml2_models

View File

@ -16,6 +16,7 @@
import functools import functools
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net as providernet from neutron_lib.api.definitions import provider_net as providernet
from neutron_lib.api import validators from neutron_lib.api import validators
from neutron_lib import constants from neutron_lib import constants
@ -48,7 +49,6 @@ from neutron.db.models import l3_attrs
from neutron.db.models import l3ha as l3ha_model from neutron.db.models import l3ha as l3ha_model
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import l3_ext_ha_mode as l3_ha from neutron.extensions import l3_ext_ha_mode as l3_ha
from neutron.extensions import portbindings
from neutron.plugins.common import utils as p_utils from neutron.plugins.common import utils as p_utils

View File

@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from sqlalchemy import func from sqlalchemy import func
@ -22,7 +23,6 @@ from neutron.callbacks import resources
from neutron.db import l3_agentschedulers_db as l3_sch_db from neutron.db import l3_agentschedulers_db as l3_sch_db
from neutron.db.models import agent as agent_model from neutron.db.models import agent as agent_model
from neutron.db.models import l3agent as rb_model from neutron.db.models import l3agent as rb_model
from neutron.extensions import portbindings
class L3_HA_scheduler_db_mixin(l3_sch_db.AZL3AgentSchedulerDbMixin): class L3_HA_scheduler_db_mixin(l3_sch_db.AZL3AgentSchedulerDbMixin):

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib.api import validators from neutron_lib.api import validators
from neutron.api.v2 import attributes from neutron.api.v2 import attributes
@ -21,7 +22,6 @@ from neutron.db import _resource_extend as resource_extend
from neutron.db.models import portbinding as pmodels from neutron.db.models import portbinding as pmodels
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.db import portbindings_base from neutron.db import portbindings_base
from neutron.extensions import portbindings
class PortBindingMixin(portbindings_base.PortBindingBaseMixin): class PortBindingMixin(portbindings_base.PortBindingBaseMixin):

View File

@ -17,13 +17,13 @@ import shlex
import socket import socket
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from oslo_log import log as logging from oslo_log import log as logging
from neutron._i18n import _LW from neutron._i18n import _LW
from neutron.agent.linux import dhcp from neutron.agent.linux import dhcp
from neutron.agent.linux import ip_lib from neutron.agent.linux import ip_lib
from neutron.extensions import portbindings
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -13,126 +13,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib.api import extensions from neutron_lib.api import extensions
from neutron_lib import constants
# The type of vnic that this port should be attached to class Portbindings(extensions.APIExtensionDescriptor):
VNIC_TYPE = 'binding:vnic_type'
# The service will return the vif type for the specific port.
VIF_TYPE = 'binding:vif_type'
# The service may return a dictionary containing additional
# information needed by the interface driver. The set of items
# returned may depend on the value of VIF_TYPE.
VIF_DETAILS = 'binding:vif_details'
# In some cases different implementations may be run on different hosts.
# The host on which the port will be allocated.
HOST_ID = 'binding:host_id'
# The profile will be a dictionary that enables the application running
# on the specific host to pass and receive vif port specific information to
# the plugin.
PROFILE = 'binding:profile'
# The keys below are used in the VIF_DETAILS attribute to convey
# information to the VIF driver.
# TODO(rkukura): Replace CAP_PORT_FILTER, which nova no longer
# understands, with the new set of VIF security details to be used in
# the VIF_DETAILS attribute.
#
# - port_filter : Boolean value indicating Neutron provides port filtering
# features such as security group and anti MAC/IP spoofing
# - ovs_hybrid_plug: Boolean used to inform Nova that the hybrid plugging
# strategy for OVS should be used
CAP_PORT_FILTER = 'port_filter'
OVS_HYBRID_PLUG = 'ovs_hybrid_plug'
VIF_DETAILS_VLAN = 'vlan'
VIF_DETAILS_MACVTAP_SOURCE = 'macvtap_source'
VIF_DETAILS_MACVTAP_MODE = 'macvtap_mode'
VIF_DETAILS_PHYSICAL_INTERFACE = 'physical_interface'
VIF_DETAILS_BRIDGE_NAME = 'bridge_name'
# The keys below are used in the VIF_DETAILS attribute to convey
# information related to the configuration of the vhost-user VIF driver.
# - vhost_user_mode: String value used to declare the mode of a
# vhost-user socket
VHOST_USER_MODE = 'vhostuser_mode'
# - server: socket created by hypervisor
VHOST_USER_MODE_SERVER = 'server'
# - client: socket created by vswitch
VHOST_USER_MODE_CLIENT = 'client'
# - vhostuser_socket String value used to declare the vhostuser socket name
VHOST_USER_SOCKET = 'vhostuser_socket'
# - vhost_user_ovs_plug: Boolean used to inform Nova that the ovs plug
# method should be used when binding the
# vhost-user vif.
VHOST_USER_OVS_PLUG = 'vhostuser_ovs_plug'
# VIF_TYPE: vif_types are required by Nova to determine which vif_driver to
# use to attach a virtual server to the network
# - vhost-user: The vhost-user interface type is a standard virtio interface
# provided by qemu 2.1+. This constant defines the neutron side
# of the vif binding type to provide a common definition
# to enable reuse in multiple agents and drivers.
VIF_TYPE_VHOST_USER = 'vhostuser'
VIF_TYPE_UNBOUND = 'unbound'
VIF_TYPE_BINDING_FAILED = 'binding_failed'
VIF_TYPE_DISTRIBUTED = 'distributed'
VIF_TYPE_OVS = 'ovs'
VIF_TYPE_BRIDGE = 'bridge'
VIF_TYPE_OTHER = 'other'
# vif_type_macvtap: Tells Nova that the macvtap vif_driver should be used to
# create a vif. It does not require the VNIC_TYPE_MACVTAP,
# which is defined further below. E.g. Macvtap agent uses
# vnic_type 'normal'.
VIF_TYPE_MACVTAP = 'macvtap'
# SR-IOV VIF types
VIF_TYPE_HW_VEB = 'hw_veb'
VIF_TYPE_HOSTDEV_PHY = 'hostdev_physical'
# VNIC_TYPE: It's used to determine which mechanism driver to use to bind a
# port. It can be specified via the Neutron API. Default is normal,
# used by OVS and LinuxBridge agent.
VNIC_NORMAL = 'normal'
VNIC_DIRECT = 'direct'
VNIC_MACVTAP = 'macvtap'
VNIC_BAREMETAL = 'baremetal'
VNIC_DIRECT_PHYSICAL = 'direct-physical'
VNIC_TYPES = [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,
VNIC_DIRECT_PHYSICAL]
EXTENDED_ATTRIBUTES_2_0 = {
'ports': {
VIF_TYPE: {'allow_post': False, 'allow_put': False,
'default': constants.ATTR_NOT_SPECIFIED,
'enforce_policy': True,
'is_visible': True},
VIF_DETAILS: {'allow_post': False, 'allow_put': False,
'default': constants.ATTR_NOT_SPECIFIED,
'enforce_policy': True,
'is_visible': True},
VNIC_TYPE: {'allow_post': True, 'allow_put': True,
'default': VNIC_NORMAL,
'is_visible': True,
'validate': {'type:values': VNIC_TYPES},
'enforce_policy': True},
HOST_ID: {'allow_post': True, 'allow_put': True,
'default': constants.ATTR_NOT_SPECIFIED,
'is_visible': True,
'enforce_policy': True},
PROFILE: {'allow_post': True, 'allow_put': True,
'default': constants.ATTR_NOT_SPECIFIED,
'enforce_policy': True,
'validate': {'type:dict_or_none': None},
'is_visible': True},
}
}
class Portbindings(extensions.ExtensionDescriptor):
"""Extension class supporting port bindings. """Extension class supporting port bindings.
This class is used by neutron's extension framework to make This class is used by neutron's extension framework to make
@ -141,24 +26,4 @@ class Portbindings(extensions.ExtensionDescriptor):
With admin rights one will be able to update and read the values. With admin rights one will be able to update and read the values.
""" """
@classmethod api_definition = portbindings
def get_name(cls):
return "Port Binding"
@classmethod
def get_alias(cls):
return "binding"
@classmethod
def get_description(cls):
return "Expose port bindings of a virtual port to external application"
@classmethod
def get_updated(cls):
return "2014-02-03T10:00:00-00:00"
def get_extended_resources(self, version):
if version == "2.0":
return EXTENDED_ATTRIBUTES_2_0
else:
return {}

View File

@ -14,6 +14,7 @@
# under the License. # under the License.
from debtcollector import removals from debtcollector import removals
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as n_const from neutron_lib import constants as n_const
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from oslo_db import exception as db_exc from oslo_db import exception as db_exc
@ -30,7 +31,6 @@ from neutron.callbacks import resources
from neutron.db import api as db_api from neutron.db import api as db_api
from neutron.db.models import securitygroup as sg_models from neutron.db.models import securitygroup as sg_models
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import portbindings
from neutron.objects import ports as port_obj from neutron.objects import ports as port_obj
from neutron.plugins.ml2 import models from neutron.plugins.ml2 import models
from neutron.services.segments import exceptions as seg_exc from neutron.services.segments import exceptions as seg_exc

View File

@ -13,13 +13,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from oslo_log import log from oslo_log import log
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from neutron._i18n import _LW from neutron._i18n import _LW
from neutron.db import segments_db from neutron.db import segments_db
from neutron.extensions import portbindings
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron.agent import securitygroups_rpc from neutron.agent import securitygroups_rpc
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_constants from neutron.plugins.common import constants as p_constants
from neutron.plugins.ml2.drivers import mech_agent from neutron.plugins.ml2.drivers import mech_agent
from neutron.services.qos.drivers.linuxbridge import driver as lb_qos_driver from neutron.services.qos.drivers.linuxbridge import driver as lb_qos_driver

View File

@ -15,10 +15,10 @@
# under the License. # under the License.
from neutron._i18n import _LE from neutron._i18n import _LE
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from oslo_log import log from oslo_log import log
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_constants from neutron.plugins.common import constants as p_constants
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.plugins.ml2.drivers.macvtap import macvtap_common from neutron.plugins.ml2.drivers.macvtap import macvtap_common

View File

@ -15,6 +15,7 @@
import abc import abc
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as const from neutron_lib import constants as const
from oslo_log import log from oslo_log import log
import six import six
@ -22,7 +23,6 @@ import six
from neutron._i18n import _LW from neutron._i18n import _LW
from neutron.callbacks import resources from neutron.callbacks import resources
from neutron.db import provisioning_blocks from neutron.db import provisioning_blocks
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_constants from neutron.plugins.common import constants as p_constants
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api

View File

@ -20,6 +20,7 @@ import socket
import sys import sys
import time import time
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as n_constants from neutron_lib import constants as n_constants
from neutron_lib import context from neutron_lib import context
from neutron_lib.utils import helpers from neutron_lib.utils import helpers
@ -39,7 +40,6 @@ from neutron.api.rpc.handlers import securitygroups_rpc as sg_rpc
from neutron.common import config as common_config from neutron.common import config as common_config
from neutron.common import profiler as setup_profiler from neutron.common import profiler as setup_profiler
from neutron.common import topics from neutron.common import topics
from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers.mech_sriov.agent.common import config from neutron.plugins.ml2.drivers.mech_sriov.agent.common import config
from neutron.plugins.ml2.drivers.mech_sriov.agent.common \ from neutron.plugins.ml2.drivers.mech_sriov.agent.common \
import exceptions as exc import exceptions as exc

View File

@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from oslo_log import log from oslo_log import log
from neutron._i18n import _LW from neutron._i18n import _LW
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_const from neutron.plugins.common import constants as p_const
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.plugins.ml2.drivers import mech_agent from neutron.plugins.ml2.drivers import mech_agent

View File

@ -22,6 +22,7 @@ import sys
import time import time
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as n_const from neutron_lib import constants as n_const
from neutron_lib import context from neutron_lib import context
from neutron_lib.utils import helpers from neutron_lib.utils import helpers
@ -54,7 +55,6 @@ from neutron.common import config
from neutron.common import constants as c_const from neutron.common import constants as c_const
from neutron.common import topics from neutron.common import topics
from neutron.conf.agent import xenapi_conf from neutron.conf.agent import xenapi_conf
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_const from neutron.plugins.common import constants as p_const
from neutron.plugins.common import utils as p_utils from neutron.plugins.common import utils as p_utils
from neutron.plugins.ml2.drivers.agent import capabilities from neutron.plugins.ml2.drivers.agent import capabilities

View File

@ -15,13 +15,13 @@
import os import os
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from oslo_config import cfg from oslo_config import cfg
from neutron.agent import securitygroups_rpc from neutron.agent import securitygroups_rpc
from neutron.callbacks import events from neutron.callbacks import events
from neutron.callbacks import registry from neutron.callbacks import registry
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_constants from neutron.plugins.common import constants as p_constants
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.plugins.ml2.drivers import mech_agent from neutron.plugins.ml2.drivers import mech_agent

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net as provider from neutron_lib.api.definitions import provider_net as provider
from neutron_lib.api import validators from neutron_lib.api import validators
from neutron_lib import constants from neutron_lib import constants
@ -28,7 +29,6 @@ from neutron.db import api as db_api
from neutron.db import segments_db from neutron.db import segments_db
from neutron.extensions import external_net from neutron.extensions import external_net
from neutron.extensions import multiprovidernet as mpnet from neutron.extensions import multiprovidernet as mpnet
from neutron.extensions import portbindings
from neutron.extensions import vlantransparent from neutron.extensions import vlantransparent
from neutron.plugins.ml2.common import exceptions as ml2_exc from neutron.plugins.ml2.common import exceptions as ml2_exc
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api

View File

@ -13,13 +13,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib.db import model_base from neutron_lib.db import model_base
import sqlalchemy as sa import sqlalchemy as sa
from sqlalchemy import orm from sqlalchemy import orm
from neutron.common import constants from neutron.common import constants
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import portbindings
BINDING_PROFILE_LEN = 4095 BINDING_PROFILE_LEN = 4095

View File

@ -14,6 +14,7 @@
# under the License. # under the License.
from eventlet import greenthread from eventlet import greenthread
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net from neutron_lib.api.definitions import provider_net
from neutron_lib.api import validators from neutron_lib.api import validators
from neutron_lib import constants as const from neutron_lib import constants as const
@ -71,7 +72,6 @@ from neutron.extensions import allowedaddresspairs as addr_pair
from neutron.extensions import availability_zone as az_ext from neutron.extensions import availability_zone as az_ext
from neutron.extensions import extra_dhcp_opt as edo_ext from neutron.extensions import extra_dhcp_opt as edo_ext
from neutron.extensions import multiprovidernet as mpnet from neutron.extensions import multiprovidernet as mpnet
from neutron.extensions import portbindings
from neutron.extensions import portsecurity as psec from neutron.extensions import portsecurity as psec
from neutron.extensions import providernet as provider from neutron.extensions import providernet as provider
from neutron.extensions import vlantransparent from neutron.extensions import vlantransparent

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as n_const from neutron_lib import constants as n_const
from neutron_lib import exceptions from neutron_lib import exceptions
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
@ -28,7 +29,6 @@ from neutron.common import rpc as n_rpc
from neutron.common import topics from neutron.common import topics
from neutron.db import l3_hamode_db from neutron.db import l3_hamode_db
from neutron.db import provisioning_blocks from neutron.db import provisioning_blocks
from neutron.extensions import portbindings
from neutron.extensions import portsecurity as psec from neutron.extensions import portsecurity as psec
from neutron.plugins.ml2 import db as ml2_db from neutron.plugins.ml2 import db as ml2_db
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from oslo_log import log as logging from oslo_log import log as logging
from neutron.extensions import portbindings
from neutron.services.qos.drivers import base from neutron.services.qos.drivers import base
from neutron.services.qos import qos_consts from neutron.services.qos import qos_consts

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from oslo_log import log as logging from oslo_log import log as logging
from neutron.extensions import portbindings
from neutron.services.qos.drivers import base from neutron.services.qos.drivers import base
from neutron.services.qos import qos_consts from neutron.services.qos import qos_consts

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from oslo_log import log as logging from oslo_log import log as logging
from neutron.extensions import portbindings
from neutron.services.qos.drivers import base from neutron.services.qos.drivers import base
from neutron.services.qos import qos_consts from neutron.services.qos import qos_consts

View File

@ -13,9 +13,9 @@
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron.extensions import portbindings
from neutron.services.trunk import constants as trunk_consts from neutron.services.trunk import constants as trunk_consts
from neutron.services.trunk.drivers import base from neutron.services.trunk.drivers import base

View File

@ -11,13 +11,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from neutron.callbacks import events from neutron.callbacks import events
from neutron.callbacks import registry from neutron.callbacks import registry
from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers.openvswitch.agent.common import ( from neutron.plugins.ml2.drivers.openvswitch.agent.common import (
constants as agent_consts) constants as agent_consts)
from neutron.services.trunk import constants as trunk_consts from neutron.services.trunk import constants as trunk_consts

View File

@ -14,6 +14,7 @@
import copy import copy
from neutron_lib.api.definitions import portbindings
from neutron_lib import context from neutron_lib import context
from neutron_lib.services import base as service_base from neutron_lib.services import base as service_base
from oslo_log import log as logging from oslo_log import log as logging
@ -27,7 +28,6 @@ from neutron.db import _resource_extend as resource_extend
from neutron.db import api as db_api from neutron.db import api as db_api
from neutron.db import common_db_mixin from neutron.db import common_db_mixin
from neutron.db import db_base_plugin_common from neutron.db import db_base_plugin_common
from neutron.extensions import portbindings
from neutron.objects import base as objects_base from neutron.objects import base as objects_base
from neutron.objects import trunk as trunk_objects from neutron.objects import trunk as trunk_objects
from neutron.services.trunk import callbacks from neutron.services.trunk import callbacks

View File

@ -14,6 +14,7 @@
import collections import collections
from neutron_lib.api.definitions import portbindings
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from oslo_log import helpers as log_helpers from oslo_log import helpers as log_helpers
from oslo_log import log as logging from oslo_log import log as logging
@ -26,7 +27,6 @@ from neutron.api.rpc.callbacks import resources
from neutron.api.rpc.handlers import resources_rpc from neutron.api.rpc.handlers import resources_rpc
from neutron.common import rpc as n_rpc from neutron.common import rpc as n_rpc
from neutron.db import api as db_api from neutron.db import api as db_api
from neutron.extensions import portbindings
from neutron.objects import trunk as trunk_objects from neutron.objects import trunk as trunk_objects
from neutron.services.trunk import constants as trunk_consts from neutron.services.trunk import constants as trunk_consts
from neutron.services.trunk import exceptions as trunk_exc from neutron.services.trunk import exceptions as trunk_exc

View File

@ -13,13 +13,13 @@
# under the License. # under the License.
from neutron_lib.api import converters from neutron_lib.api import converters
from neutron_lib.api.definitions import portbindings
from neutron_lib.api import validators from neutron_lib.api import validators
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from neutron._i18n import _ from neutron._i18n import _
from neutron.common import utils as n_utils from neutron.common import utils as n_utils
from neutron.extensions import portbindings
from neutron.objects import trunk as trunk_objects from neutron.objects import trunk as trunk_objects
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.services.trunk import exceptions as trunk_exc from neutron.services.trunk import exceptions as trunk_exc

View File

@ -16,11 +16,11 @@ import functools
import netaddr import netaddr
import fixtures import fixtures
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutronclient.common import exceptions from neutronclient.common import exceptions
from neutron.common import utils from neutron.common import utils
from neutron.extensions import portbindings
def _safe_method(f): def _safe_method(f):

View File

@ -16,12 +16,12 @@ import itertools
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings as pbs
from neutron_lib import constants from neutron_lib import constants
from neutron.agent.linux import async_process from neutron.agent.linux import async_process
from neutron.agent.linux import ip_lib from neutron.agent.linux import ip_lib
from neutron.common import utils from neutron.common import utils
from neutron.extensions import portbindings as pbs
from neutron.tests.common import machine_fixtures from neutron.tests.common import machine_fixtures
from neutron.tests.common import net_helpers from neutron.tests.common import net_helpers

View File

@ -18,6 +18,7 @@ import functools
import mock import mock
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as lib_constants from neutron_lib import constants as lib_constants
import testtools import testtools
@ -30,7 +31,6 @@ from neutron.agent.linux import iptables_manager
from neutron.common import constants as n_const from neutron.common import constants as n_const
from neutron.common import exceptions as n_exc from neutron.common import exceptions as n_exc
from neutron.common import utils from neutron.common import utils
from neutron.extensions import portbindings
from neutron.tests.common import l3_test_common from neutron.tests.common import l3_test_common
from neutron.tests.common import machine_fixtures from neutron.tests.common import machine_fixtures
from neutron.tests.common import net_helpers from neutron.tests.common import net_helpers

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
from neutron.db import agents_db from neutron.db import agents_db
from neutron.extensions import portbindings
from neutron.tests.common import helpers from neutron.tests.common import helpers
from neutron.tests.unit.plugins.ml2 import base as ml2_test_base from neutron.tests.unit.plugins.ml2 import base as ml2_test_base

View File

@ -13,12 +13,12 @@
# under the License. # under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron.common import topics from neutron.common import topics
from neutron.extensions import external_net from neutron.extensions import external_net
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import portbindings
from neutron.tests.common import helpers from neutron.tests.common import helpers
from neutron.tests.functional.services.l3_router import \ from neutron.tests.functional.services.l3_router import \
test_l3_dvr_router_plugin test_l3_dvr_router_plugin

View File

@ -13,6 +13,7 @@
# under the License. # under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
@ -23,7 +24,6 @@ from neutron.callbacks import resources
from neutron.common import topics from neutron.common import topics
from neutron.extensions import external_net from neutron.extensions import external_net
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import portbindings
from neutron.tests.common import helpers from neutron.tests.common import helpers
from neutron.tests.unit.plugins.ml2 import base as ml2_test_base from neutron.tests.unit.plugins.ml2 import base as ml2_test_base

View File

@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron.extensions import portbindings as pb from neutron_lib.api.definitions import portbindings as pb
from neutron.services.trunk.drivers.openvswitch import utils from neutron.services.trunk.drivers.openvswitch import utils
from neutron.services.trunk import plugin as trunk_plugin from neutron.services.trunk import plugin as trunk_plugin
from neutron.tests.common import helpers from neutron.tests.common import helpers

View File

@ -13,13 +13,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import context from neutron_lib import context
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from oslo_config import cfg from oslo_config import cfg
from six.moves import http_client as httplib from six.moves import http_client as httplib
from webob import exc from webob import exc
from neutron.extensions import portbindings
from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit.db import test_db_base_plugin_v2

View File

@ -20,6 +20,7 @@ from itertools import combinations as iter_combinations
import eventlet import eventlet
import mock import mock
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as lib_constants from neutron_lib import constants as lib_constants
from neutron_lib import exceptions as exc from neutron_lib import exceptions as exc
from oslo_config import cfg from oslo_config import cfg
@ -52,7 +53,6 @@ from neutron.conf.agent import common as agent_config
from neutron.conf.agent.l3 import config as l3_config from neutron.conf.agent.l3 import config as l3_config
from neutron.conf.agent.l3 import ha as ha_conf from neutron.conf.agent.l3 import ha as ha_conf
from neutron.conf import common as base_config from neutron.conf import common as base_config
from neutron.extensions import portbindings
from neutron.tests import base from neutron.tests import base
from neutron.tests.common import l3_test_common from neutron.tests.common import l3_test_common

View File

@ -14,6 +14,7 @@
import mock import mock
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as lib_constants from neutron_lib import constants as lib_constants
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log from oslo_log import log
@ -32,7 +33,6 @@ from neutron.conf.agent import common as agent_config
from neutron.conf.agent.l3 import config as l3_config from neutron.conf.agent.l3 import config as l3_config
from neutron.conf.agent.l3 import ha as ha_conf from neutron.conf.agent.l3 import ha as ha_conf
from neutron.conf import common as base_config from neutron.conf import common as base_config
from neutron.extensions import portbindings
from neutron.tests import base from neutron.tests import base
from neutron.tests.common import l3_test_common from neutron.tests.common import l3_test_common

View File

@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
@ -25,7 +26,6 @@ from neutron.common import constants as n_const
from neutron.common import exceptions from neutron.common import exceptions
from neutron.common import utils from neutron.common import utils
from neutron.db import provisioning_blocks from neutron.db import provisioning_blocks
from neutron.extensions import portbindings
from neutron.tests import base from neutron.tests import base

View File

@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
@ -25,7 +26,6 @@ from neutron.db import api as db_api
from neutron.db import dvr_mac_db from neutron.db import dvr_mac_db
from neutron.db.models import dvr as dvr_models from neutron.db.models import dvr as dvr_models
from neutron.extensions import dvr from neutron.extensions import dvr
from neutron.extensions import portbindings
from neutron.tests.unit.plugins.ml2 import test_plugin from neutron.tests.unit.plugins.ml2 import test_plugin

View File

@ -15,13 +15,13 @@
import mock import mock
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
import webob.exc import webob.exc
from neutron.db import db_base_plugin_v2 from neutron.db import db_base_plugin_v2
from neutron.db import ipam_backend_mixin from neutron.db import ipam_backend_mixin
from neutron.db import portbindings_db from neutron.db import portbindings_db
from neutron.extensions import portbindings
from neutron.tests import base from neutron.tests import base
from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit.db import test_db_base_plugin_v2

View File

@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as const from neutron_lib import constants as const
from neutron_lib import context from neutron_lib import context
from neutron_lib import exceptions from neutron_lib import exceptions
@ -29,7 +30,6 @@ from neutron.db import common_db_mixin
from neutron.db import l3_agentschedulers_db from neutron.db import l3_agentschedulers_db
from neutron.db import l3_dvr_db from neutron.db import l3_dvr_db
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import portbindings
from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit.db import test_db_base_plugin_v2
_uuid = uuidutils.generate_uuid _uuid = uuidutils.generate_uuid

View File

@ -13,6 +13,8 @@
# under the License. # under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net as providernet from neutron_lib.api.definitions import provider_net as providernet
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
@ -40,7 +42,6 @@ from neutron.db.models import l3ha as l3ha_model
from neutron.extensions import external_net from neutron.extensions import external_net
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import l3_ext_ha_mode from neutron.extensions import l3_ext_ha_mode
from neutron.extensions import portbindings
from neutron.scheduler import l3_agent_scheduler from neutron.scheduler import l3_agent_scheduler
from neutron.services.revisions import revision_plugin from neutron.services.revisions import revision_plugin
from neutron.tests.common import helpers from neutron.tests.common import helpers

View File

@ -16,6 +16,7 @@
import socket import socket
import mock import mock
from neutron_lib.api.definitions import portbindings
from oslo_config import cfg from oslo_config import cfg
from neutron.agent.linux import interface from neutron.agent.linux import interface
@ -23,7 +24,6 @@ from neutron.common import config as common_config
from neutron.conf.agent import common as config from neutron.conf.agent import common as config
from neutron.debug import commands from neutron.debug import commands
from neutron.debug import debug_agent from neutron.debug import debug_agent
from neutron.extensions import portbindings
from neutron.tests import base from neutron.tests import base

View File

@ -19,6 +19,7 @@ import copy
import mock import mock
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as lib_constants from neutron_lib import constants as lib_constants
from neutron_lib import context from neutron_lib import context
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
@ -53,7 +54,6 @@ from neutron.db import models_v2
from neutron.extensions import dns from neutron.extensions import dns
from neutron.extensions import external_net from neutron.extensions import external_net
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import portbindings
from neutron.plugins.ml2 import config from neutron.plugins.ml2 import config
from neutron.services.revisions import revision_plugin from neutron.services.revisions import revision_plugin
from neutron.tests import base from neutron.tests import base

View File

@ -17,6 +17,7 @@ from keystoneauth1 import exceptions as ks_exc
import mock import mock
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
@ -40,7 +41,6 @@ from neutron.db import portbindings_db
from neutron.db import segments_db from neutron.db import segments_db
from neutron.extensions import ip_allocation from neutron.extensions import ip_allocation
from neutron.extensions import l2_adjacency from neutron.extensions import l2_adjacency
from neutron.extensions import portbindings
from neutron.extensions import segment as ext_segment from neutron.extensions import segment as ext_segment
from neutron.objects import network from neutron.objects import network
from neutron.plugins.common import constants as p_constants from neutron.plugins.common import constants as p_constants

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron.extensions import portbindings
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.tests import base from neutron.tests import base

View File

@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
from neutron_lib.utils import net from neutron_lib.utils import net
@ -22,7 +23,6 @@ from neutron.db.models import l3 as l3_models
from neutron.db.models import l3_attrs from neutron.db.models import l3_attrs
from neutron.db.models import l3ha as l3ha_model from neutron.db.models import l3ha as l3ha_model
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.extensions import portbindings
from neutron.objects import network as network_obj from neutron.objects import network as network_obj
from neutron.plugins.ml2.drivers.l2pop import db as l2pop_db from neutron.plugins.ml2.drivers.l2pop import db as l2pop_db
from neutron.plugins.ml2 import models from neutron.plugins.ml2 import models

View File

@ -14,6 +14,8 @@
# under the License. # under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net as pnet from neutron_lib.api.definitions import provider_net as pnet
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
@ -29,7 +31,6 @@ from neutron.db import agents_db
from neutron.db import common_db_mixin from neutron.db import common_db_mixin
from neutron.db import l3_agentschedulers_db from neutron.db import l3_agentschedulers_db
from neutron.db import l3_hamode_db from neutron.db import l3_hamode_db
from neutron.extensions import portbindings
from neutron.plugins.ml2 import db as ml2_db from neutron.plugins.ml2 import db as ml2_db
from neutron.plugins.ml2 import driver_context from neutron.plugins.ml2 import driver_context
from neutron.plugins.ml2.drivers.l2pop import db as l2pop_db from neutron.plugins.ml2.drivers.l2pop import db as l2pop_db

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers.linuxbridge.mech_driver \ from neutron.plugins.ml2.drivers.linuxbridge.mech_driver \
import mech_linuxbridge import mech_linuxbridge
from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron.extensions import portbindings
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.plugins.ml2.drivers.macvtap.mech_driver import mech_macvtap from neutron.plugins.ml2.drivers.macvtap.mech_driver import mech_macvtap
from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base

View File

@ -20,10 +20,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron.agent import securitygroups_rpc from neutron.agent import securitygroups_rpc
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_constants from neutron.plugins.common import constants as p_constants
from neutron.plugins.ml2.drivers import mech_agent from neutron.plugins.ml2.drivers import mech_agent

View File

@ -15,12 +15,12 @@
import mock import mock
from neutron_lib.api.definitions import portbindings
from oslo_config import cfg from oslo_config import cfg
from oslo_utils import uuidutils from oslo_utils import uuidutils
from neutron.agent.l2 import l2_agent_extensions_manager as l2_ext_manager from neutron.agent.l2 import l2_agent_extensions_manager as l2_ext_manager
from neutron.agent import rpc as agent_rpc from neutron.agent import rpc as agent_rpc
from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers.mech_sriov.agent.common import config # noqa from neutron.plugins.ml2.drivers.mech_sriov.agent.common import config # noqa
from neutron.plugins.ml2.drivers.mech_sriov.agent.common import exceptions from neutron.plugins.ml2.drivers.mech_sriov.agent.common import exceptions
from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_agent from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_agent

View File

@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
import testtools import testtools
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_const from neutron.plugins.common import constants as p_const
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.plugins.ml2.drivers.mech_sriov.mech_driver \ from neutron.plugins.ml2.drivers.mech_sriov.mech_driver \

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as const from neutron_lib import constants as const
from neutron.extensions import portbindings
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api

View File

@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from oslo_config import cfg from oslo_config import cfg
from neutron.callbacks import events from neutron.callbacks import events
from neutron.callbacks import registry from neutron.callbacks import registry
from neutron.extensions import portbindings
from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import driver_api as api
from neutron.plugins.ml2.drivers.openvswitch.agent.common import ( from neutron.plugins.ml2.drivers.openvswitch.agent.common import (
constants as a_const) constants as a_const)

View File

@ -17,6 +17,7 @@ import warnings
import mock import mock
import netaddr import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
from oslo_utils import uuidutils from oslo_utils import uuidutils
@ -28,7 +29,6 @@ from neutron.db import db_base_plugin_v2
from neutron.db.models import l3 as l3_models from neutron.db.models import l3 as l3_models
from neutron.db import models_v2 from neutron.db import models_v2
from neutron.db import segments_db from neutron.db import segments_db
from neutron.extensions import portbindings
from neutron.objects import network as network_obj from neutron.objects import network as network_obj
from neutron.objects import ports as port_obj from neutron.objects import ports as port_obj
from neutron.plugins.ml2 import db as ml2_db from neutron.plugins.ml2 import db as ml2_db

View File

@ -14,9 +14,9 @@
# under the License. # under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron.extensions import portbindings
from neutron.plugins.ml2 import driver_context from neutron.plugins.ml2 import driver_context
from neutron.tests import base from neutron.tests import base

View File

@ -21,6 +21,7 @@ import six
import testtools import testtools
import webob import webob
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net as pnet from neutron_lib.api.definitions import provider_net as pnet
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context from neutron_lib import context
@ -44,7 +45,6 @@ from neutron.db import segments_db
from neutron.extensions import availability_zone as az_ext from neutron.extensions import availability_zone as az_ext
from neutron.extensions import external_net from neutron.extensions import external_net
from neutron.extensions import multiprovidernet as mpnet from neutron.extensions import multiprovidernet as mpnet
from neutron.extensions import portbindings
from neutron.plugins.common import constants as p_const from neutron.plugins.common import constants as p_const
from neutron.plugins.ml2.common import exceptions as ml2_exc from neutron.plugins.ml2.common import exceptions as ml2_exc
from neutron.plugins.ml2 import config from neutron.plugins.ml2 import config

View File

@ -14,12 +14,12 @@
# under the License. # under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as const from neutron_lib import constants as const
from neutron_lib import context from neutron_lib import context
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from neutron.conf.plugins.ml2.drivers import driver_type from neutron.conf.plugins.ml2.drivers import driver_type
from neutron.extensions import portbindings
from neutron.plugins.ml2 import config from neutron.plugins.ml2 import config
from neutron.plugins.ml2 import driver_context from neutron.plugins.ml2 import driver_context
from neutron.plugins.ml2 import models as ml2_models from neutron.plugins.ml2 import models as ml2_models

View File

@ -18,6 +18,7 @@ import contextlib
import datetime import datetime
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants from neutron_lib import constants
from neutron_lib import context as n_context from neutron_lib import context as n_context
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
@ -40,7 +41,6 @@ from neutron.db.models import l3agent as rb_model
from neutron.db.models import l3ha as l3ha_model from neutron.db.models import l3ha as l3ha_model
from neutron.extensions import l3 from neutron.extensions import l3
from neutron.extensions import l3agentscheduler as l3agent from neutron.extensions import l3agentscheduler as l3agent
from neutron.extensions import portbindings
from neutron import manager from neutron import manager
from neutron.scheduler import l3_agent_scheduler from neutron.scheduler import l3_agent_scheduler
from neutron.tests import base from neutron.tests import base

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging import oslo_messaging
@ -19,7 +20,6 @@ import oslo_messaging
from neutron.api.rpc.callbacks import events from neutron.api.rpc.callbacks import events
from neutron.api.rpc.callbacks import resources from neutron.api.rpc.callbacks import resources
from neutron.api.rpc.handlers import resources_rpc from neutron.api.rpc.handlers import resources_rpc
from neutron.extensions import portbindings
from neutron.objects import trunk as trunk_obj from neutron.objects import trunk as trunk_obj
from neutron.plugins.ml2 import plugin as ml2_plugin from neutron.plugins.ml2 import plugin as ml2_plugin
from neutron.services.trunk import constants from neutron.services.trunk import constants

View File

@ -14,13 +14,13 @@
# limitations under the License. # limitations under the License.
import mock import mock
from neutron_lib.api.definitions import portbindings
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
import testtools import testtools
from neutron.callbacks import events from neutron.callbacks import events
from neutron.callbacks import registry from neutron.callbacks import registry
from neutron.callbacks import resources from neutron.callbacks import resources
from neutron.extensions import portbindings
from neutron.objects import trunk as trunk_objects from neutron.objects import trunk as trunk_objects
from neutron.services.trunk import callbacks from neutron.services.trunk import callbacks
from neutron.services.trunk import constants from neutron.services.trunk import constants