Browse Source

use neutron_lib's portbindings api-def

Neutron-lib 1.1.0 is now out and contains the portbindings
API definition (as per commit [1]). This patch moves neutron
references over to the neutron-lib version.

NeutronLibImpact
- Consumers using the public constants within neutron's
portbindings API extension must now use the values
from neutron-lib.

[1] 87e42f993c

Change-Id: I669af9b4c712877772d91a03857ab108714001d4
tags/11.0.0.0b1
Boden R 2 years ago
parent
commit
7bd521e7ce
70 changed files with 75 additions and 207 deletions
  1. 1
    1
      doc/source/devref/contribute.rst
  2. 1
    1
      neutron/agent/l3/ha_router.py
  3. 1
    1
      neutron/api/rpc/handlers/dhcp_rpc.py
  4. 1
    1
      neutron/api/rpc/handlers/l3_rpc.py
  5. 1
    1
      neutron/db/dvr_mac_db.py
  6. 1
    1
      neutron/db/ipam_backend_mixin.py
  7. 1
    1
      neutron/db/ipam_pluggable_backend.py
  8. 1
    1
      neutron/db/l3_dvr_db.py
  9. 1
    1
      neutron/db/l3_dvrscheduler_db.py
  10. 1
    1
      neutron/db/l3_hamode_db.py
  11. 1
    1
      neutron/db/l3_hascheduler_db.py
  12. 1
    1
      neutron/db/portbindings_db.py
  13. 1
    1
      neutron/debug/debug_agent.py
  14. 3
    138
      neutron/extensions/portbindings.py
  15. 1
    1
      neutron/plugins/ml2/db.py
  16. 1
    1
      neutron/plugins/ml2/driver_context.py
  17. 1
    1
      neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py
  18. 1
    1
      neutron/plugins/ml2/drivers/macvtap/mech_driver/mech_macvtap.py
  19. 1
    1
      neutron/plugins/ml2/drivers/mech_agent.py
  20. 1
    1
      neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py
  21. 1
    1
      neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py
  22. 1
    1
      neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
  23. 1
    1
      neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py
  24. 1
    1
      neutron/plugins/ml2/managers.py
  25. 1
    1
      neutron/plugins/ml2/models.py
  26. 1
    1
      neutron/plugins/ml2/plugin.py
  27. 1
    1
      neutron/plugins/ml2/rpc.py
  28. 1
    1
      neutron/services/qos/drivers/linuxbridge/driver.py
  29. 1
    1
      neutron/services/qos/drivers/openvswitch/driver.py
  30. 1
    1
      neutron/services/qos/drivers/sriov/driver.py
  31. 1
    1
      neutron/services/trunk/drivers/linuxbridge/driver.py
  32. 1
    1
      neutron/services/trunk/drivers/openvswitch/driver.py
  33. 1
    1
      neutron/services/trunk/plugin.py
  34. 1
    1
      neutron/services/trunk/rpc/server.py
  35. 1
    1
      neutron/services/trunk/rules.py
  36. 1
    1
      neutron/tests/fullstack/resources/client.py
  37. 1
    1
      neutron/tests/fullstack/resources/machine.py
  38. 1
    1
      neutron/tests/functional/agent/l3/test_dvr_router.py
  39. 1
    1
      neutron/tests/functional/plugins/ml2/test_plugin.py
  40. 1
    1
      neutron/tests/functional/services/l3_router/test_l3_dvr_ha_router_plugin.py
  41. 1
    1
      neutron/tests/functional/services/l3_router/test_l3_dvr_router_plugin.py
  42. 2
    1
      neutron/tests/functional/services/trunk/test_plugin.py
  43. 1
    1
      neutron/tests/unit/_test_extension_portbindings.py
  44. 1
    1
      neutron/tests/unit/agent/l3/test_agent.py
  45. 1
    1
      neutron/tests/unit/agent/l3/test_dvr_local_router.py
  46. 1
    1
      neutron/tests/unit/api/rpc/handlers/test_dhcp_rpc.py
  47. 1
    1
      neutron/tests/unit/db/test_dvr_mac_db.py
  48. 1
    1
      neutron/tests/unit/db/test_ipam_backend_mixin.py
  49. 1
    1
      neutron/tests/unit/db/test_l3_dvr_db.py
  50. 2
    1
      neutron/tests/unit/db/test_l3_hamode_db.py
  51. 1
    1
      neutron/tests/unit/debug/test_commands.py
  52. 1
    1
      neutron/tests/unit/extensions/test_l3.py
  53. 1
    1
      neutron/tests/unit/extensions/test_segment.py
  54. 1
    1
      neutron/tests/unit/plugins/ml2/_test_mech_agent.py
  55. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/l2pop/test_db.py
  56. 2
    1
      neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py
  57. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/linuxbridge/mech_driver/test_mech_linuxbridge.py
  58. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/macvtap/mech_driver/test_mech_macvtap.py
  59. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/mech_fake_agent.py
  60. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_sriov_nic_agent.py
  61. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/mech_sriov/mech_driver/test_mech_sriov_nic_switch.py
  62. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/mechanism_test.py
  63. 1
    1
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/mech_driver/test_mech_openvswitch.py
  64. 1
    1
      neutron/tests/unit/plugins/ml2/test_db.py
  65. 1
    1
      neutron/tests/unit/plugins/ml2/test_driver_context.py
  66. 1
    1
      neutron/tests/unit/plugins/ml2/test_plugin.py
  67. 1
    1
      neutron/tests/unit/plugins/ml2/test_port_binding.py
  68. 1
    1
      neutron/tests/unit/scheduler/test_l3_agent_scheduler.py
  69. 1
    1
      neutron/tests/unit/services/trunk/rpc/test_server.py
  70. 1
    1
      neutron/tests/unit/services/trunk/test_plugin.py

+ 1
- 1
doc/source/devref/contribute.rst View File

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

+ 1
- 1
neutron/agent/l3/ha_router.py View File

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

+ 1
- 1
neutron/api/rpc/handlers/dhcp_rpc.py View File

@@ -17,6 +17,7 @@ import copy
17 17
 import itertools
18 18
 import operator
19 19
 
20
+from neutron_lib.api.definitions import portbindings
20 21
 from neutron_lib import constants
21 22
 from neutron_lib import exceptions
22 23
 from neutron_lib.plugins import directory
@@ -33,7 +34,6 @@ from neutron.common import exceptions as n_exc
33 34
 from neutron.common import utils
34 35
 from neutron.db import api as db_api
35 36
 from neutron.db import provisioning_blocks
36
-from neutron.extensions import portbindings
37 37
 from neutron.extensions import segment as segment_ext
38 38
 from neutron.plugins.common import utils as p_utils
39 39
 from neutron.quota import resource_registry

+ 1
- 1
neutron/api/rpc/handlers/l3_rpc.py View File

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

+ 1
- 1
neutron/db/dvr_mac_db.py View File

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

+ 1
- 1
neutron/db/ipam_backend_mixin.py View File

@@ -18,6 +18,7 @@ import copy
18 18
 import itertools
19 19
 
20 20
 import netaddr
21
+from neutron_lib.api.definitions import portbindings
21 22
 from neutron_lib.api import validators
22 23
 from neutron_lib import constants as const
23 24
 from neutron_lib import exceptions as exc
@@ -38,7 +39,6 @@ from neutron.db.models import segment as segment_model
38 39
 from neutron.db.models import subnet_service_type as sst_model
39 40
 from neutron.db import models_v2
40 41
 from neutron.extensions import ip_allocation as ipa
41
-from neutron.extensions import portbindings
42 42
 from neutron.extensions import segment
43 43
 from neutron.ipam import exceptions as ipam_exceptions
44 44
 from neutron.ipam import utils as ipam_utils

+ 1
- 1
neutron/db/ipam_pluggable_backend.py View File

@@ -16,6 +16,7 @@
16 16
 import copy
17 17
 
18 18
 import netaddr
19
+from neutron_lib.api.definitions import portbindings
19 20
 from neutron_lib import constants
20 21
 from neutron_lib import exceptions as n_exc
21 22
 from oslo_db import exception as db_exc
@@ -28,7 +29,6 @@ from neutron.common import constants as n_const
28 29
 from neutron.common import ipv6_utils
29 30
 from neutron.db import ipam_backend_mixin
30 31
 from neutron.db import models_v2
31
-from neutron.extensions import portbindings
32 32
 from neutron.ipam import driver
33 33
 from neutron.ipam import exceptions as ipam_exc
34 34
 

+ 1
- 1
neutron/db/l3_dvr_db.py View File

@@ -13,6 +13,7 @@
13 13
 #    under the License.
14 14
 import collections
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib.api import validators
17 18
 from neutron_lib import constants as const
18 19
 from neutron_lib import exceptions as n_exc
@@ -38,7 +39,6 @@ from neutron.db.models import l3 as l3_models
38 39
 from neutron.db.models import l3agent as rb_model
39 40
 from neutron.db import models_v2
40 41
 from neutron.extensions import l3
41
-from neutron.extensions import portbindings
42 42
 from neutron.ipam import utils as ipam_utils
43 43
 from neutron.plugins.common import utils as p_utils
44 44
 

+ 1
- 1
neutron/db/l3_dvrscheduler_db.py View File

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

+ 1
- 1
neutron/db/l3_hamode_db.py View File

@@ -16,6 +16,7 @@
16 16
 import functools
17 17
 
18 18
 import netaddr
19
+from neutron_lib.api.definitions import portbindings
19 20
 from neutron_lib.api.definitions import provider_net as providernet
20 21
 from neutron_lib.api import validators
21 22
 from neutron_lib import constants
@@ -48,7 +49,6 @@ from neutron.db.models import l3_attrs
48 49
 from neutron.db.models import l3ha as l3ha_model
49 50
 from neutron.extensions import l3
50 51
 from neutron.extensions import l3_ext_ha_mode as l3_ha
51
-from neutron.extensions import portbindings
52 52
 from neutron.plugins.common import utils as p_utils
53 53
 
54 54
 

+ 1
- 1
neutron/db/l3_hascheduler_db.py View File

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

+ 1
- 1
neutron/db/portbindings_db.py View File

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

+ 1
- 1
neutron/debug/debug_agent.py View File

@@ -17,13 +17,13 @@ import shlex
17 17
 import socket
18 18
 
19 19
 import netaddr
20
+from neutron_lib.api.definitions import portbindings
20 21
 from neutron_lib import constants
21 22
 from oslo_log import log as logging
22 23
 
23 24
 from neutron._i18n import _LW
24 25
 from neutron.agent.linux import dhcp
25 26
 from neutron.agent.linux import ip_lib
26
-from neutron.extensions import portbindings
27 27
 
28 28
 LOG = logging.getLogger(__name__)
29 29
 

+ 3
- 138
neutron/extensions/portbindings.py View File

@@ -13,126 +13,11 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib.api import extensions
17
-from neutron_lib import constants
18 18
 
19 19
 
20
-# The type of vnic that this port should be attached to
21
-VNIC_TYPE = 'binding:vnic_type'
22
-# The service will return the vif type for the specific port.
23
-VIF_TYPE = 'binding:vif_type'
24
-# The service may return a dictionary containing additional
25
-# information needed by the interface driver. The set of items
26
-# returned may depend on the value of VIF_TYPE.
27
-VIF_DETAILS = 'binding:vif_details'
28
-# In some cases different implementations may be run on different hosts.
29
-# The host on which the port will be allocated.
30
-HOST_ID = 'binding:host_id'
31
-# The profile will be a dictionary that enables the application running
32
-# on the specific host to pass and receive vif port specific information to
33
-# the plugin.
34
-PROFILE = 'binding:profile'
35
-
36
-# The keys below are used in the VIF_DETAILS attribute to convey
37
-# information to the VIF driver.
38
-
39
-# TODO(rkukura): Replace CAP_PORT_FILTER, which nova no longer
40
-# understands, with the new set of VIF security details to be used in
41
-# the VIF_DETAILS attribute.
42
-#
43
-#  - port_filter : Boolean value indicating Neutron provides port filtering
44
-#                  features such as security group and anti MAC/IP spoofing
45
-#  - ovs_hybrid_plug: Boolean used to inform Nova that the hybrid plugging
46
-#                     strategy for OVS should be used
47
-CAP_PORT_FILTER = 'port_filter'
48
-OVS_HYBRID_PLUG = 'ovs_hybrid_plug'
49
-VIF_DETAILS_VLAN = 'vlan'
50
-VIF_DETAILS_MACVTAP_SOURCE = 'macvtap_source'
51
-VIF_DETAILS_MACVTAP_MODE = 'macvtap_mode'
52
-VIF_DETAILS_PHYSICAL_INTERFACE = 'physical_interface'
53
-VIF_DETAILS_BRIDGE_NAME = 'bridge_name'
54
-
55
-# The keys below are used in the VIF_DETAILS attribute to convey
56
-# information related to the configuration of the vhost-user VIF driver.
57
-
58
-# - vhost_user_mode: String value used to declare the mode of a
59
-#                    vhost-user socket
60
-VHOST_USER_MODE = 'vhostuser_mode'
61
-# - server: socket created by hypervisor
62
-VHOST_USER_MODE_SERVER = 'server'
63
-# - client: socket created by vswitch
64
-VHOST_USER_MODE_CLIENT = 'client'
65
-# - vhostuser_socket String value used to declare the vhostuser socket name
66
-VHOST_USER_SOCKET = 'vhostuser_socket'
67
-# - vhost_user_ovs_plug: Boolean used to inform Nova that the ovs plug
68
-#                        method should be used when binding the
69
-#                        vhost-user vif.
70
-VHOST_USER_OVS_PLUG = 'vhostuser_ovs_plug'
71
-
72
-# VIF_TYPE: vif_types are required by Nova to determine which vif_driver to
73
-#           use to attach a virtual server to the network
74
-
75
-# - vhost-user:  The vhost-user interface type is a standard virtio interface
76
-#                provided by qemu 2.1+. This constant defines the neutron side
77
-#                of the vif binding type to provide a common definition
78
-#                to enable reuse in multiple agents and drivers.
79
-VIF_TYPE_VHOST_USER = 'vhostuser'
80
-
81
-VIF_TYPE_UNBOUND = 'unbound'
82
-VIF_TYPE_BINDING_FAILED = 'binding_failed'
83
-VIF_TYPE_DISTRIBUTED = 'distributed'
84
-VIF_TYPE_OVS = 'ovs'
85
-VIF_TYPE_BRIDGE = 'bridge'
86
-VIF_TYPE_OTHER = 'other'
87
-# vif_type_macvtap: Tells Nova that the macvtap vif_driver should be used to
88
-#                   create a vif. It does not require the VNIC_TYPE_MACVTAP,
89
-#                   which is defined further below. E.g. Macvtap agent uses
90
-#                   vnic_type 'normal'.
91
-VIF_TYPE_MACVTAP = 'macvtap'
92
-# SR-IOV VIF types
93
-VIF_TYPE_HW_VEB = 'hw_veb'
94
-VIF_TYPE_HOSTDEV_PHY = 'hostdev_physical'
95
-
96
-# VNIC_TYPE: It's used to determine which mechanism driver to use to bind a
97
-#            port. It can be specified via the Neutron API. Default is normal,
98
-#            used by OVS and LinuxBridge agent.
99
-VNIC_NORMAL = 'normal'
100
-VNIC_DIRECT = 'direct'
101
-VNIC_MACVTAP = 'macvtap'
102
-VNIC_BAREMETAL = 'baremetal'
103
-VNIC_DIRECT_PHYSICAL = 'direct-physical'
104
-VNIC_TYPES = [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,
105
-              VNIC_DIRECT_PHYSICAL]
106
-
107
-EXTENDED_ATTRIBUTES_2_0 = {
108
-    'ports': {
109
-        VIF_TYPE: {'allow_post': False, 'allow_put': False,
110
-                   'default': constants.ATTR_NOT_SPECIFIED,
111
-                   'enforce_policy': True,
112
-                   'is_visible': True},
113
-        VIF_DETAILS: {'allow_post': False, 'allow_put': False,
114
-                      'default': constants.ATTR_NOT_SPECIFIED,
115
-                      'enforce_policy': True,
116
-                      'is_visible': True},
117
-        VNIC_TYPE: {'allow_post': True, 'allow_put': True,
118
-                    'default': VNIC_NORMAL,
119
-                    'is_visible': True,
120
-                    'validate': {'type:values': VNIC_TYPES},
121
-                    'enforce_policy': True},
122
-        HOST_ID: {'allow_post': True, 'allow_put': True,
123
-                  'default': constants.ATTR_NOT_SPECIFIED,
124
-                  'is_visible': True,
125
-                  'enforce_policy': True},
126
-        PROFILE: {'allow_post': True, 'allow_put': True,
127
-                  'default': constants.ATTR_NOT_SPECIFIED,
128
-                  'enforce_policy': True,
129
-                  'validate': {'type:dict_or_none': None},
130
-                  'is_visible': True},
131
-    }
132
-}
133
-
134
-
135
-class Portbindings(extensions.ExtensionDescriptor):
20
+class Portbindings(extensions.APIExtensionDescriptor):
136 21
     """Extension class supporting port bindings.
137 22
 
138 23
     This class is used by neutron's extension framework to make
@@ -141,24 +26,4 @@ class Portbindings(extensions.ExtensionDescriptor):
141 26
     With admin rights one will be able to update and read the values.
142 27
     """
143 28
 
144
-    @classmethod
145
-    def get_name(cls):
146
-        return "Port Binding"
147
-
148
-    @classmethod
149
-    def get_alias(cls):
150
-        return "binding"
151
-
152
-    @classmethod
153
-    def get_description(cls):
154
-        return "Expose port bindings of a virtual port to external application"
155
-
156
-    @classmethod
157
-    def get_updated(cls):
158
-        return "2014-02-03T10:00:00-00:00"
159
-
160
-    def get_extended_resources(self, version):
161
-        if version == "2.0":
162
-            return EXTENDED_ATTRIBUTES_2_0
163
-        else:
164
-            return {}
29
+    api_definition = portbindings

+ 1
- 1
neutron/plugins/ml2/db.py View File

@@ -14,6 +14,7 @@
14 14
 #    under the License.
15 15
 
16 16
 from debtcollector import removals
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import constants as n_const
18 19
 from neutron_lib.plugins import directory
19 20
 from oslo_db import exception as db_exc
@@ -29,7 +30,6 @@ from neutron.callbacks import registry
29 30
 from neutron.callbacks import resources
30 31
 from neutron.db.models import securitygroup as sg_models
31 32
 from neutron.db import models_v2
32
-from neutron.extensions import portbindings
33 33
 from neutron.objects import ports as port_obj
34 34
 from neutron.plugins.ml2 import models
35 35
 from neutron.services.segments import exceptions as seg_exc

+ 1
- 1
neutron/plugins/ml2/driver_context.py View File

@@ -13,13 +13,13 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib import constants
17 18
 from oslo_log import log
18 19
 from oslo_serialization import jsonutils
19 20
 
20 21
 from neutron._i18n import _LW
21 22
 from neutron.db import segments_db
22
-from neutron.extensions import portbindings
23 23
 from neutron.plugins.ml2 import driver_api as api
24 24
 
25 25
 LOG = log.getLogger(__name__)

+ 1
- 1
neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py View File

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

+ 1
- 1
neutron/plugins/ml2/drivers/macvtap/mech_driver/mech_macvtap.py View File

@@ -15,10 +15,10 @@
15 15
 #    under the License.
16 16
 
17 17
 from neutron._i18n import _LE
18
+from neutron_lib.api.definitions import portbindings
18 19
 from neutron_lib import constants
19 20
 from oslo_log import log
20 21
 
21
-from neutron.extensions import portbindings
22 22
 from neutron.plugins.common import constants as p_constants
23 23
 from neutron.plugins.ml2 import driver_api as api
24 24
 from neutron.plugins.ml2.drivers.macvtap import macvtap_common

+ 1
- 1
neutron/plugins/ml2/drivers/mech_agent.py View File

@@ -15,6 +15,7 @@
15 15
 
16 16
 import abc
17 17
 
18
+from neutron_lib.api.definitions import portbindings
18 19
 from neutron_lib import constants as const
19 20
 from oslo_log import log
20 21
 import six
@@ -22,7 +23,6 @@ import six
22 23
 from neutron._i18n import _LW
23 24
 from neutron.callbacks import resources
24 25
 from neutron.db import provisioning_blocks
25
-from neutron.extensions import portbindings
26 26
 from neutron.plugins.common import constants as p_constants
27 27
 from neutron.plugins.ml2 import driver_api as api
28 28
 

+ 1
- 1
neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py View File

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

+ 1
- 1
neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py View File

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

+ 1
- 1
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py View File

@@ -22,6 +22,7 @@ import sys
22 22
 import time
23 23
 
24 24
 import netaddr
25
+from neutron_lib.api.definitions import portbindings
25 26
 from neutron_lib import constants as n_const
26 27
 from neutron_lib import context
27 28
 from neutron_lib.utils import helpers
@@ -54,7 +55,6 @@ from neutron.common import config
54 55
 from neutron.common import constants as c_const
55 56
 from neutron.common import topics
56 57
 from neutron.conf.agent import xenapi_conf
57
-from neutron.extensions import portbindings
58 58
 from neutron.plugins.common import constants as p_const
59 59
 from neutron.plugins.common import utils as p_utils
60 60
 from neutron.plugins.ml2.drivers.agent import capabilities

+ 1
- 1
neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py View File

@@ -15,13 +15,13 @@
15 15
 
16 16
 import os
17 17
 
18
+from neutron_lib.api.definitions import portbindings
18 19
 from neutron_lib import constants
19 20
 from oslo_config import cfg
20 21
 
21 22
 from neutron.agent import securitygroups_rpc
22 23
 from neutron.callbacks import events
23 24
 from neutron.callbacks import registry
24
-from neutron.extensions import portbindings
25 25
 from neutron.plugins.common import constants as p_constants
26 26
 from neutron.plugins.ml2 import driver_api as api
27 27
 from neutron.plugins.ml2.drivers import mech_agent

+ 1
- 1
neutron/plugins/ml2/managers.py View File

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

+ 1
- 1
neutron/plugins/ml2/models.py View File

@@ -13,13 +13,13 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib.db import model_base
17 18
 import sqlalchemy as sa
18 19
 from sqlalchemy import orm
19 20
 
20 21
 from neutron.common import constants
21 22
 from neutron.db import models_v2
22
-from neutron.extensions import portbindings
23 23
 
24 24
 BINDING_PROFILE_LEN = 4095
25 25
 

+ 1
- 1
neutron/plugins/ml2/plugin.py View File

@@ -14,6 +14,7 @@
14 14
 #    under the License.
15 15
 
16 16
 from eventlet import greenthread
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib.api.definitions import provider_net
18 19
 from neutron_lib.api import validators
19 20
 from neutron_lib import constants as const
@@ -71,7 +72,6 @@ from neutron.extensions import allowedaddresspairs as addr_pair
71 72
 from neutron.extensions import availability_zone as az_ext
72 73
 from neutron.extensions import extra_dhcp_opt as edo_ext
73 74
 from neutron.extensions import multiprovidernet as mpnet
74
-from neutron.extensions import portbindings
75 75
 from neutron.extensions import portsecurity as psec
76 76
 from neutron.extensions import providernet as provider
77 77
 from neutron.extensions import vlantransparent

+ 1
- 1
neutron/plugins/ml2/rpc.py View File

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

+ 1
- 1
neutron/services/qos/drivers/linuxbridge/driver.py View File

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

+ 1
- 1
neutron/services/qos/drivers/openvswitch/driver.py View File

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

+ 1
- 1
neutron/services/qos/drivers/sriov/driver.py View File

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

+ 1
- 1
neutron/services/trunk/drivers/linuxbridge/driver.py View File

@@ -13,9 +13,9 @@
13 13
 from oslo_config import cfg
14 14
 from oslo_log import log as logging
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib import constants
17 18
 
18
-from neutron.extensions import portbindings
19 19
 from neutron.services.trunk import constants as trunk_consts
20 20
 from neutron.services.trunk.drivers import base
21 21
 

+ 1
- 1
neutron/services/trunk/drivers/openvswitch/driver.py View File

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

+ 1
- 1
neutron/services/trunk/plugin.py View File

@@ -14,6 +14,7 @@
14 14
 
15 15
 import copy
16 16
 
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import context
18 19
 from neutron_lib.services import base as service_base
19 20
 from oslo_log import log as logging
@@ -27,7 +28,6 @@ from neutron.db import _resource_extend as resource_extend
27 28
 from neutron.db import api as db_api
28 29
 from neutron.db import common_db_mixin
29 30
 from neutron.db import db_base_plugin_common
30
-from neutron.extensions import portbindings
31 31
 from neutron.objects import base as objects_base
32 32
 from neutron.objects import trunk as trunk_objects
33 33
 from neutron.services.trunk import callbacks

+ 1
- 1
neutron/services/trunk/rpc/server.py View File

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

+ 1
- 1
neutron/services/trunk/rules.py View File

@@ -13,13 +13,13 @@
13 13
 #    under the License.
14 14
 
15 15
 from neutron_lib.api import converters
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib.api import validators
17 18
 from neutron_lib import exceptions as n_exc
18 19
 from neutron_lib.plugins import directory
19 20
 
20 21
 from neutron._i18n import _
21 22
 from neutron.common import utils as n_utils
22
-from neutron.extensions import portbindings
23 23
 from neutron.objects import trunk as trunk_objects
24 24
 from neutron.plugins.ml2 import driver_api as api
25 25
 from neutron.services.trunk import exceptions as trunk_exc

+ 1
- 1
neutron/tests/fullstack/resources/client.py View File

@@ -16,11 +16,11 @@ import functools
16 16
 import netaddr
17 17
 
18 18
 import fixtures
19
+from neutron_lib.api.definitions import portbindings
19 20
 from neutron_lib import constants
20 21
 from neutronclient.common import exceptions
21 22
 
22 23
 from neutron.common import utils
23
-from neutron.extensions import portbindings
24 24
 
25 25
 
26 26
 def _safe_method(f):

+ 1
- 1
neutron/tests/fullstack/resources/machine.py View File

@@ -16,12 +16,12 @@ import itertools
16 16
 
17 17
 import netaddr
18 18
 
19
+from neutron_lib.api.definitions import portbindings as pbs
19 20
 from neutron_lib import constants
20 21
 
21 22
 from neutron.agent.linux import async_process
22 23
 from neutron.agent.linux import ip_lib
23 24
 from neutron.common import utils
24
-from neutron.extensions import portbindings as pbs
25 25
 from neutron.tests.common import machine_fixtures
26 26
 from neutron.tests.common import net_helpers
27 27
 

+ 1
- 1
neutron/tests/functional/agent/l3/test_dvr_router.py View File

@@ -18,6 +18,7 @@ import functools
18 18
 
19 19
 import mock
20 20
 import netaddr
21
+from neutron_lib.api.definitions import portbindings
21 22
 from neutron_lib import constants as lib_constants
22 23
 import testtools
23 24
 
@@ -30,7 +31,6 @@ from neutron.agent.linux import iptables_manager
30 31
 from neutron.common import constants as n_const
31 32
 from neutron.common import exceptions as n_exc
32 33
 from neutron.common import utils
33
-from neutron.extensions import portbindings
34 34
 from neutron.tests.common import l3_test_common
35 35
 from neutron.tests.common import machine_fixtures
36 36
 from neutron.tests.common import net_helpers

+ 1
- 1
neutron/tests/functional/plugins/ml2/test_plugin.py View File

@@ -13,11 +13,11 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib import constants
17 18
 from neutron_lib import context
18 19
 
19 20
 from neutron.db import agents_db
20
-from neutron.extensions import portbindings
21 21
 from neutron.tests.common import helpers
22 22
 from neutron.tests.unit.plugins.ml2 import base as ml2_test_base
23 23
 

+ 1
- 1
neutron/tests/functional/services/l3_router/test_l3_dvr_ha_router_plugin.py View File

@@ -13,12 +13,12 @@
13 13
 #    under the License.
14 14
 
15 15
 import mock
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib import constants
17 18
 
18 19
 from neutron.common import topics
19 20
 from neutron.extensions import external_net
20 21
 from neutron.extensions import l3
21
-from neutron.extensions import portbindings
22 22
 from neutron.tests.common import helpers
23 23
 from neutron.tests.functional.services.l3_router import \
24 24
     test_l3_dvr_router_plugin

+ 1
- 1
neutron/tests/functional/services/l3_router/test_l3_dvr_router_plugin.py View File

@@ -13,6 +13,7 @@
13 13
 #    under the License.
14 14
 
15 15
 import mock
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib import constants
17 18
 from neutron_lib import context
18 19
 
@@ -23,7 +24,6 @@ from neutron.callbacks import resources
23 24
 from neutron.common import topics
24 25
 from neutron.extensions import external_net
25 26
 from neutron.extensions import l3
26
-from neutron.extensions import portbindings
27 27
 from neutron.tests.common import helpers
28 28
 from neutron.tests.unit.plugins.ml2 import base as ml2_test_base
29 29
 

+ 2
- 1
neutron/tests/functional/services/trunk/test_plugin.py View File

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

+ 1
- 1
neutron/tests/unit/_test_extension_portbindings.py View File

@@ -13,13 +13,13 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib import context
17 18
 from neutron_lib.plugins import directory
18 19
 from oslo_config import cfg
19 20
 from six.moves import http_client as httplib
20 21
 from webob import exc
21 22
 
22
-from neutron.extensions import portbindings
23 23
 from neutron.tests.unit.db import test_db_base_plugin_v2
24 24
 
25 25
 

+ 1
- 1
neutron/tests/unit/agent/l3/test_agent.py View File

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

+ 1
- 1
neutron/tests/unit/agent/l3/test_dvr_local_router.py View File

@@ -14,6 +14,7 @@
14 14
 
15 15
 import mock
16 16
 import netaddr
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import constants as lib_constants
18 19
 from oslo_config import cfg
19 20
 from oslo_log import log
@@ -32,7 +33,6 @@ from neutron.conf.agent import common as agent_config
32 33
 from neutron.conf.agent.l3 import config as l3_config
33 34
 from neutron.conf.agent.l3 import ha as ha_conf
34 35
 from neutron.conf import common as base_config
35
-from neutron.extensions import portbindings
36 36
 from neutron.tests import base
37 37
 from neutron.tests.common import l3_test_common
38 38
 

+ 1
- 1
neutron/tests/unit/api/rpc/handlers/test_dhcp_rpc.py View File

@@ -14,6 +14,7 @@
14 14
 # limitations under the License.
15 15
 
16 16
 import mock
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import constants
18 19
 from neutron_lib import exceptions as n_exc
19 20
 from neutron_lib.plugins import directory
@@ -25,7 +26,6 @@ from neutron.common import constants as n_const
25 26
 from neutron.common import exceptions
26 27
 from neutron.common import utils
27 28
 from neutron.db import provisioning_blocks
28
-from neutron.extensions import portbindings
29 29
 from neutron.tests import base
30 30
 
31 31
 

+ 1
- 1
neutron/tests/unit/db/test_dvr_mac_db.py View File

@@ -14,6 +14,7 @@
14 14
 # limitations under the License.
15 15
 
16 16
 import mock
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import constants
18 19
 from neutron_lib import context
19 20
 from neutron_lib.plugins import directory
@@ -25,7 +26,6 @@ from neutron.db import api as db_api
25 26
 from neutron.db import dvr_mac_db
26 27
 from neutron.db.models import dvr as dvr_models
27 28
 from neutron.extensions import dvr
28
-from neutron.extensions import portbindings
29 29
 from neutron.tests.unit.plugins.ml2 import test_plugin
30 30
 
31 31
 

+ 1
- 1
neutron/tests/unit/db/test_ipam_backend_mixin.py View File

@@ -15,13 +15,13 @@
15 15
 
16 16
 import mock
17 17
 import netaddr
18
+from neutron_lib.api.definitions import portbindings
18 19
 from neutron_lib import constants
19 20
 import webob.exc
20 21
 
21 22
 from neutron.db import db_base_plugin_v2
22 23
 from neutron.db import ipam_backend_mixin
23 24
 from neutron.db import portbindings_db
24
-from neutron.extensions import portbindings
25 25
 from neutron.tests import base
26 26
 from neutron.tests.unit.db import test_db_base_plugin_v2
27 27
 

+ 1
- 1
neutron/tests/unit/db/test_l3_dvr_db.py View File

@@ -14,6 +14,7 @@
14 14
 # limitations under the License.
15 15
 
16 16
 import mock
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import constants as const
18 19
 from neutron_lib import context
19 20
 from neutron_lib import exceptions
@@ -29,7 +30,6 @@ from neutron.db import common_db_mixin
29 30
 from neutron.db import l3_agentschedulers_db
30 31
 from neutron.db import l3_dvr_db
31 32
 from neutron.extensions import l3
32
-from neutron.extensions import portbindings
33 33
 from neutron.tests.unit.db import test_db_base_plugin_v2
34 34
 
35 35
 _uuid = uuidutils.generate_uuid

+ 2
- 1
neutron/tests/unit/db/test_l3_hamode_db.py View File

@@ -13,6 +13,8 @@
13 13
 # under the License.
14 14
 
15 15
 import mock
16
+
17
+from neutron_lib.api.definitions import portbindings
16 18
 from neutron_lib.api.definitions import provider_net as providernet
17 19
 from neutron_lib import constants
18 20
 from neutron_lib import context
@@ -40,7 +42,6 @@ from neutron.db.models import l3ha as l3ha_model
40 42
 from neutron.extensions import external_net
41 43
 from neutron.extensions import l3
42 44
 from neutron.extensions import l3_ext_ha_mode
43
-from neutron.extensions import portbindings
44 45
 from neutron.scheduler import l3_agent_scheduler
45 46
 from neutron.services.revisions import revision_plugin
46 47
 from neutron.tests.common import helpers

+ 1
- 1
neutron/tests/unit/debug/test_commands.py View File

@@ -16,6 +16,7 @@
16 16
 import socket
17 17
 
18 18
 import mock
19
+from neutron_lib.api.definitions import portbindings
19 20
 from oslo_config import cfg
20 21
 
21 22
 from neutron.agent.linux import interface
@@ -23,7 +24,6 @@ from neutron.common import config as common_config
23 24
 from neutron.conf.agent import common as config
24 25
 from neutron.debug import commands
25 26
 from neutron.debug import debug_agent
26
-from neutron.extensions import portbindings
27 27
 from neutron.tests import base
28 28
 
29 29
 

+ 1
- 1
neutron/tests/unit/extensions/test_l3.py View File

@@ -19,6 +19,7 @@ import copy
19 19
 
20 20
 import mock
21 21
 import netaddr
22
+from neutron_lib.api.definitions import portbindings
22 23
 from neutron_lib import constants as lib_constants
23 24
 from neutron_lib import context
24 25
 from neutron_lib import exceptions as n_exc
@@ -53,7 +54,6 @@ from neutron.db import models_v2
53 54
 from neutron.extensions import dns
54 55
 from neutron.extensions import external_net
55 56
 from neutron.extensions import l3
56
-from neutron.extensions import portbindings
57 57
 from neutron.plugins.ml2 import config
58 58
 from neutron.services.revisions import revision_plugin
59 59
 from neutron.tests import base

+ 1
- 1
neutron/tests/unit/extensions/test_segment.py View File

@@ -17,6 +17,7 @@ from keystoneauth1 import exceptions as ks_exc
17 17
 
18 18
 import mock
19 19
 import netaddr
20
+from neutron_lib.api.definitions import portbindings
20 21
 from neutron_lib import constants
21 22
 from neutron_lib import context
22 23
 from neutron_lib import exceptions as n_exc
@@ -40,7 +41,6 @@ from neutron.db import portbindings_db
40 41
 from neutron.db import segments_db
41 42
 from neutron.extensions import ip_allocation
42 43
 from neutron.extensions import l2_adjacency
43
-from neutron.extensions import portbindings
44 44
 from neutron.extensions import segment as ext_segment
45 45
 from neutron.objects import network
46 46
 from neutron.plugins.common import constants as p_constants

+ 1
- 1
neutron/tests/unit/plugins/ml2/_test_mech_agent.py View File

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

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/l2pop/test_db.py View File

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

+ 2
- 1
neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py View File

@@ -14,6 +14,8 @@
14 14
 #    under the License.
15 15
 
16 16
 import mock
17
+
18
+from neutron_lib.api.definitions import portbindings
17 19
 from neutron_lib.api.definitions import provider_net as pnet
18 20
 from neutron_lib import constants
19 21
 from neutron_lib import context
@@ -29,7 +31,6 @@ from neutron.db import agents_db
29 31
 from neutron.db import common_db_mixin
30 32
 from neutron.db import l3_agentschedulers_db
31 33
 from neutron.db import l3_hamode_db
32
-from neutron.extensions import portbindings
33 34
 from neutron.plugins.ml2 import db as ml2_db
34 35
 from neutron.plugins.ml2 import driver_context
35 36
 from neutron.plugins.ml2.drivers.l2pop import db as l2pop_db

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/linuxbridge/mech_driver/test_mech_linuxbridge.py View File

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

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/macvtap/mech_driver/test_mech_macvtap.py View File

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

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/mech_fake_agent.py View File

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

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_sriov_nic_agent.py View File

@@ -15,12 +15,12 @@
15 15
 
16 16
 
17 17
 import mock
18
+from neutron_lib.api.definitions import portbindings
18 19
 from oslo_config import cfg
19 20
 from oslo_utils import uuidutils
20 21
 
21 22
 from neutron.agent.l2 import l2_agent_extensions_manager as l2_ext_manager
22 23
 from neutron.agent import rpc as agent_rpc
23
-from neutron.extensions import portbindings
24 24
 from neutron.plugins.ml2.drivers.mech_sriov.agent.common import config  # noqa
25 25
 from neutron.plugins.ml2.drivers.mech_sriov.agent.common import exceptions
26 26
 from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_agent

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/mech_sriov/mech_driver/test_mech_sriov_nic_switch.py View File

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

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/mechanism_test.py View File

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

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/openvswitch/mech_driver/test_mech_openvswitch.py View File

@@ -13,12 +13,12 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
+from neutron_lib.api.definitions import portbindings
16 17
 from neutron_lib import constants
17 18
 from oslo_config import cfg
18 19
 
19 20
 from neutron.callbacks import events
20 21
 from neutron.callbacks import registry
21
-from neutron.extensions import portbindings
22 22
 from neutron.plugins.ml2 import driver_api as api
23 23
 from neutron.plugins.ml2.drivers.openvswitch.agent.common import (
24 24
     constants as a_const)

+ 1
- 1
neutron/tests/unit/plugins/ml2/test_db.py View File

@@ -17,6 +17,7 @@ import warnings
17 17
 
18 18
 import mock
19 19
 import netaddr
20
+from neutron_lib.api.definitions import portbindings
20 21
 from neutron_lib import constants
21 22
 from neutron_lib import context
22 23
 from oslo_utils import uuidutils
@@ -27,7 +28,6 @@ from neutron.db import db_base_plugin_v2
27 28
 from neutron.db.models import l3 as l3_models
28 29
 from neutron.db import models_v2
29 30
 from neutron.db import segments_db
30
-from neutron.extensions import portbindings
31 31
 from neutron.objects import network as network_obj
32 32
 from neutron.objects import ports as port_obj
33 33
 from neutron.plugins.ml2 import db as ml2_db

+ 1
- 1
neutron/tests/unit/plugins/ml2/test_driver_context.py View File

@@ -14,9 +14,9 @@
14 14
 #    under the License.
15 15
 
16 16
 import mock
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import constants
18 19
 
19
-from neutron.extensions import portbindings
20 20
 from neutron.plugins.ml2 import driver_context
21 21
 from neutron.tests import base
22 22
 

+ 1
- 1
neutron/tests/unit/plugins/ml2/test_plugin.py View File

@@ -21,6 +21,7 @@ import six
21 21
 import testtools
22 22
 import webob
23 23
 
24
+from neutron_lib.api.definitions import portbindings
24 25
 from neutron_lib.api.definitions import provider_net as pnet
25 26
 from neutron_lib import constants
26 27
 from neutron_lib import context
@@ -44,7 +45,6 @@ from neutron.db import segments_db
44 45
 from neutron.extensions import availability_zone as az_ext
45 46
 from neutron.extensions import external_net
46 47
 from neutron.extensions import multiprovidernet as mpnet
47
-from neutron.extensions import portbindings
48 48
 from neutron.plugins.common import constants as p_const
49 49
 from neutron.plugins.ml2.common import exceptions as ml2_exc
50 50
 from neutron.plugins.ml2 import config

+ 1
- 1
neutron/tests/unit/plugins/ml2/test_port_binding.py View File

@@ -14,12 +14,12 @@
14 14
 #    under the License.
15 15
 
16 16
 import mock
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib import constants as const
18 19
 from neutron_lib import context
19 20
 from neutron_lib.plugins import directory
20 21
 
21 22
 from neutron.conf.plugins.ml2.drivers import driver_type
22
-from neutron.extensions import portbindings
23 23
 from neutron.plugins.ml2 import config
24 24
 from neutron.plugins.ml2 import driver_context
25 25
 from neutron.plugins.ml2 import models as ml2_models

+ 1
- 1
neutron/tests/unit/scheduler/test_l3_agent_scheduler.py View File

@@ -18,6 +18,7 @@ import contextlib
18 18
 import datetime
19 19
 
20 20
 import mock
21
+from neutron_lib.api.definitions import portbindings
21 22
 from neutron_lib import constants
22 23
 from neutron_lib import context as n_context
23 24
 from neutron_lib.plugins import directory
@@ -40,7 +41,6 @@ from neutron.db.models import l3agent as rb_model
40 41
 from neutron.db.models import l3ha as l3ha_model
41 42
 from neutron.extensions import l3
42 43
 from neutron.extensions import l3agentscheduler as l3agent
43
-from neutron.extensions import portbindings
44 44
 from neutron import manager
45 45
 from neutron.scheduler import l3_agent_scheduler
46 46
 from neutron.tests import base

+ 1
- 1
neutron/tests/unit/services/trunk/rpc/test_server.py View File

@@ -12,6 +12,7 @@
12 12
 # under the License.
13 13
 
14 14
 import mock
15
+from neutron_lib.api.definitions import portbindings
15 16
 from neutron_lib.plugins import directory
16 17
 from oslo_config import cfg
17 18
 import oslo_messaging
@@ -19,7 +20,6 @@ import oslo_messaging
19 20
 from neutron.api.rpc.callbacks import events
20 21
 from neutron.api.rpc.callbacks import resources
21 22
 from neutron.api.rpc.handlers import resources_rpc
22
-from neutron.extensions import portbindings
23 23
 from neutron.objects import trunk as trunk_obj
24 24
 from neutron.plugins.ml2 import plugin as ml2_plugin
25 25
 from neutron.services.trunk import constants

+ 1
- 1
neutron/tests/unit/services/trunk/test_plugin.py View File

@@ -14,13 +14,13 @@
14 14
 # limitations under the License.
15 15
 
16 16
 import mock
17
+from neutron_lib.api.definitions import portbindings
17 18
 from neutron_lib.plugins import directory
18 19
 import testtools
19 20
 
20 21
 from neutron.callbacks import events
21 22
 from neutron.callbacks import registry
22 23
 from neutron.callbacks import resources
23
-from neutron.extensions import portbindings
24 24
 from neutron.objects import trunk as trunk_objects
25 25
 from neutron.services.trunk import callbacks
26 26
 from neutron.services.trunk import constants

Loading…
Cancel
Save