Restructure agent code in preparation for decomp

This commit moves the L2 agents (Linuxbridge and OVS) into the
ML2 directory, while at the same time also moving the ML2 server
bits into toplevel directories. It also moves the configuration
files and unit tests. We also move the l2pop RPC mixin while
here as well.

DocImpact
UpgradeImpact

Partially-Implements: blueprint reference-implementation-split
Partial-Bug: #1468433
Closes-Bug: #1427317
Change-Id: If6feca7b7a6bdd6c3c6feb929fa26fb4b1f72770
Signed-off-by: Kyle Mestery <mestery@mestery.com>
changes/77/195277/17
Kyle Mestery 7 years ago
parent b444803c74
commit 724c78071d
  1. 0
      etc/neutron/plugins/ml2/linuxbridge_agent.ini
  2. 0
      etc/neutron/plugins/ml2/openvswitch_agent.ini
  3. 2
      neutron/agent/linux/polling.py
  4. 2
      neutron/cmd/eventlet/plugins/ovs_neutron_agent.py
  5. 3
      neutron/cmd/sanity/checks.py
  6. 9
      neutron/cmd/sanity_check.py
  7. 3
      neutron/db/migration/migrate_to_ml2.py
  8. 5
      neutron/db/migration/models/head.py
  9. 3
      neutron/hacking/checks.py
  10. 0
      neutron/plugins/ml2/drivers/l2pop/rpc_manager/__init__.py
  11. 0
      neutron/plugins/ml2/drivers/l2pop/rpc_manager/l2population_rpc.py
  12. 0
      neutron/plugins/ml2/drivers/linuxbridge/__init__.py
  13. 0
      neutron/plugins/ml2/drivers/linuxbridge/agent/README
  14. 0
      neutron/plugins/ml2/drivers/linuxbridge/agent/__init__.py
  15. 0
      neutron/plugins/ml2/drivers/linuxbridge/agent/common/__init__.py
  16. 0
      neutron/plugins/ml2/drivers/linuxbridge/agent/common/config.py
  17. 0
      neutron/plugins/ml2/drivers/linuxbridge/agent/common/constants.py
  18. 0
      neutron/plugins/ml2/drivers/linuxbridge/agent/l2network_models_v2.py
  19. 8
      neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
  20. 0
      neutron/plugins/ml2/drivers/linuxbridge/mech_driver/__init__.py
  21. 0
      neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py
  22. 0
      neutron/plugins/ml2/drivers/openvswitch/__init__.py
  23. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/README
  24. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/__init__.py
  25. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/common/__init__.py
  26. 3
      neutron/plugins/ml2/drivers/openvswitch/agent/common/config.py
  27. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/common/constants.py
  28. 6
      neutron/plugins/ml2/drivers/openvswitch/agent/main.py
  29. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/__init__.py
  30. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/__init__.py
  31. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/br_dvr_process.py
  32. 5
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/br_int.py
  33. 8
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/br_phys.py
  34. 9
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/br_tun.py
  35. 11
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/main.py
  36. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/ofswitch.py
  37. 3
      neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/ovs_bridge.py
  38. 2
      neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py
  39. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/ovs_models_v2.py
  40. 14
      neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
  41. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/README
  42. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/contrib/build-rpm.sh
  43. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/contrib/rpmbuild/SPECS/openstack-quantum-xen-plugins.spec
  44. 0
      neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/etc/xapi.d/plugins/netwrap
  45. 0
      neutron/plugins/ml2/drivers/openvswitch/mech_driver/__init__.py
  46. 0
      neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py
  47. 11
      neutron/tests/functional/agent/test_ovs_flows.py
  48. 2
      neutron/tests/unit/agent/test_securitygroups_rpc.py
  49. 4
      neutron/tests/unit/hacking/test_checks.py
  50. 0
      neutron/tests/unit/plugins/ml2/drivers/l2pop/rpc_manager/__init__.py
  51. 4
      neutron/tests/unit/plugins/ml2/drivers/l2pop/rpc_manager/l2population_rpc_base.py
  52. 3
      neutron/tests/unit/plugins/ml2/drivers/l2pop/rpc_manager/test_l2population_rpc.py
  53. 2
      neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py
  54. 0
      neutron/tests/unit/plugins/ml2/drivers/linuxbridge/__init__.py
  55. 0
      neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/__init__.py
  56. 6
      neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py
  57. 0
      neutron/tests/unit/plugins/ml2/drivers/linuxbridge/mech_driver/__init__.py
  58. 3
      neutron/tests/unit/plugins/ml2/drivers/linuxbridge/mech_driver/test_mech_linuxbridge.py
  59. 0
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/__init__.py
  60. 0
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/__init__.py
  61. 0
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/__init__.py
  62. 0
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/__init__.py
  63. 3
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/ovs_bridge_test_base.py
  64. 4
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/test_br_int.py
  65. 7
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/test_br_phys.py
  66. 7
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/test_br_tun.py
  67. 5
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/ovs_test_base.py
  68. 0
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_agent_scheduler.py
  69. 5
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py
  70. 5
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py
  71. 0
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/mech_driver/__init__.py
  72. 3
      neutron/tests/unit/plugins/ml2/drivers/openvswitch/mech_driver/test_mech_openvswitch.py
  73. 3
      neutron/tests/unit/plugins/ml2/test_agent_scheduler.py
  74. 10
      setup.cfg
  75. 3
      tools/check_unit_test_structure.sh
  76. 16
      tox.ini

@ -18,7 +18,7 @@ import eventlet
from neutron.agent.common import base_polling
from neutron.agent.linux import ovsdb_monitor
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
@contextlib.contextmanager

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import neutron.plugins.openvswitch.agent.main as agent_main
import neutron.plugins.ml2.drivers.openvswitch.agent.main as agent_main
def main():

@ -27,7 +27,8 @@ from neutron.agent.linux import utils as agent_utils
from neutron.common import utils
from neutron.i18n import _LE
from neutron.plugins.common import constants as const
from neutron.plugins.openvswitch.common import constants as ovs_const
from neutron.plugins.ml2.drivers.openvswitch.agent.common \
import constants as ovs_const
LOG = logging.getLogger(__name__)

@ -25,9 +25,12 @@ from neutron.i18n import _LE, _LW
LOG = logging.getLogger(__name__)
cfg.CONF.import_group('AGENT', 'neutron.plugins.openvswitch.common.config')
cfg.CONF.import_group('OVS', 'neutron.plugins.openvswitch.common.config')
cfg.CONF.import_group('VXLAN', 'neutron.plugins.linuxbridge.common.config')
cfg.CONF.import_group('AGENT', 'neutron.plugins.ml2.drivers.openvswitch.'
'agent.common.config')
cfg.CONF.import_group('OVS', 'neutron.plugins.ml2.drivers.openvswitch.'
'agent.common.config')
cfg.CONF.import_group('VXLAN', 'neutron.plugins.ml2.drivers.linuxbridge.'
'agent.common.config')
cfg.CONF.import_group('ml2', 'neutron.plugins.ml2.config')
cfg.CONF.import_group('ml2_sriov',
'neutron.plugins.ml2.drivers.mech_sriov.mech_driver')

@ -101,7 +101,8 @@ def check_db_schema_version(engine, metadata):
)
# Duplicated from neutron.plugins.linuxbridge.common.constants to
# Duplicated from
# neutron.plugins.ml2.drivers.linuxbridge.agent.common.constants to
# avoid having any dependency on the linuxbridge plugin being
# installed.
def interpret_vlan_id(vlan_id):

@ -49,7 +49,6 @@ from neutron.plugins.brocade.db import models as brocade_models # noqa
from neutron.plugins.cisco.db.l3 import l3_models # noqa
from neutron.plugins.cisco.db import n1kv_models_v2 # noqa
from neutron.plugins.cisco.db import network_models_v2 # noqa
from neutron.plugins.linuxbridge.db import l2network_models_v2 # noqa
from neutron.plugins.metaplugin import meta_models_v2 # noqa
from neutron.plugins.ml2.drivers.arista import db # noqa
from neutron.plugins.ml2.drivers.brocade.db import ( # noqa
@ -59,6 +58,9 @@ from neutron.plugins.ml2.drivers.cisco.n1kv import n1kv_models # noqa
from neutron.plugins.ml2.drivers.cisco.nexus import ( # noqa
nexus_models_v2 as ml2_nexus_models_v2)
from neutron.plugins.ml2.drivers.cisco.ucsm import ucsm_model # noqa
from neutron.plugins.ml2.drivers.linuxbridge.agent import ( # noqa
l2network_models_v2)
from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_models_v2 # noqa
from neutron.plugins.ml2.drivers import type_flat # noqa
from neutron.plugins.ml2.drivers import type_gre # noqa
from neutron.plugins.ml2.drivers import type_vlan # noqa
@ -66,7 +68,6 @@ from neutron.plugins.ml2.drivers import type_vxlan # noqa
from neutron.plugins.ml2 import models # noqa
from neutron.plugins.nec.db import models as nec_models # noqa
from neutron.plugins.nuage import nuage_models # noqa
from neutron.plugins.openvswitch import ovs_models_v2 # noqa
from neutron.plugins.vmware.dbexts import nsx_models # noqa
from neutron.plugins.vmware.dbexts import nsxv_models # noqa
from neutron.plugins.vmware.dbexts import vcns_models # noqa

@ -75,7 +75,8 @@ def use_jsonutils(logical_line, filename):
# Some files in the tree are not meant to be run from inside Neutron
# itself, so we should not complain about them not using jsonutils
json_check_skipped_patterns = [
"neutron/plugins/openvswitch/agent/xenapi/etc/xapi.d/plugins/netwrap",
"neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/etc/xapi.d/"
"plugins/netwrap",
]
for pattern in json_check_skipped_patterns:

@ -31,7 +31,6 @@ from oslo_log import log as logging
import oslo_messaging
from six import moves
from neutron.agent import l2population_rpc as l2pop_rpc
from neutron.agent.linux import ip_lib
from neutron.agent.linux import utils
from neutron.agent import rpc as agent_rpc
@ -46,8 +45,11 @@ from neutron.i18n import _LE, _LI, _LW
from neutron.openstack.common import loopingcall
from neutron.openstack.common import service
from neutron.plugins.common import constants as p_const
from neutron.plugins.linuxbridge.common import config # noqa
from neutron.plugins.linuxbridge.common import constants as lconst
from neutron.plugins.ml2.drivers.l2pop.rpc_manager \
import l2population_rpc as l2pop_rpc
from neutron.plugins.ml2.drivers.linuxbridge.agent.common import config # noqa
from neutron.plugins.ml2.drivers.linuxbridge.agent.common \
import constants as lconst
LOG = logging.getLogger(__name__)

@ -16,7 +16,8 @@ from oslo_config import cfg
from neutron.agent.common import config
from neutron.plugins.common import constants as p_const
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.common \
import constants
DEFAULT_BRIDGE_MAPPINGS = []

@ -26,11 +26,13 @@ from neutron.common import utils as n_utils
LOG = logging.getLogger(__name__)
cfg.CONF.import_group('OVS', 'neutron.plugins.openvswitch.common.config')
cfg.CONF.import_group('OVS', 'neutron.plugins.ml2.drivers.openvswitch.agent.'
'common.config')
_main_modules = {
'ovs-ofctl': 'neutron.plugins.openvswitch.agent.openflow.ovs_ofctl.main',
'ovs-ofctl': 'neutron.plugins.ml2.drivers.openvswitch.agent.openflow.'
'ovs_ofctl.main',
}

@ -20,8 +20,9 @@
"""
from neutron.plugins.common import constants as p_const
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import ovs_bridge
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import ovs_bridge
class OVSIntegrationBridge(ovs_bridge.OVSAgentBridge):

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_dvr_process
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import ovs_bridge
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import br_dvr_process
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import ovs_bridge
class OVSPhysicalBridge(ovs_bridge.OVSAgentBridge,

@ -34,9 +34,12 @@ import functools
import netaddr
from neutron.agent.common import ovs_lib
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_dvr_process
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import ovs_bridge
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.common \
import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import br_dvr_process
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import ovs_bridge
class OVSTunnelBridge(ovs_bridge.OVSAgentBridge,

@ -14,10 +14,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_int
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_phys
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import br_tun
from neutron.plugins.openvswitch.agent import ovs_neutron_agent
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import br_int
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import br_phys
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import br_tun
from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent
def init_config():

@ -16,7 +16,8 @@
from neutron.agent.common import ovs_lib
from neutron.plugins.openvswitch.agent.openflow.ovs_ofctl import ofswitch
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl \
import ofswitch
class OVSAgentBridge(ofswitch.OpenFlowSwitchMixin, ovs_lib.OVSBridge):

@ -21,7 +21,7 @@ from neutron.common import constants as n_const
from neutron.common import utils as n_utils
from neutron.i18n import _LE, _LI, _LW
from neutron.plugins.common import constants as p_const
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
LOG = logging.getLogger(__name__)

@ -29,7 +29,6 @@ from six import moves
from neutron.agent.common import ovs_lib
from neutron.agent.common import polling
from neutron.agent.common import utils
from neutron.agent import l2population_rpc
from neutron.agent.linux import ip_lib
from neutron.agent import rpc as agent_rpc
from neutron.agent import securitygroups_rpc as sg_rpc
@ -43,13 +42,18 @@ from neutron import context
from neutron.i18n import _LE, _LI, _LW
from neutron.openstack.common import loopingcall
from neutron.plugins.common import constants as p_const
from neutron.plugins.openvswitch.agent import ovs_dvr_neutron_agent
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.l2pop.rpc_manager import l2population_rpc
from neutron.plugins.ml2.drivers.openvswitch.agent.common \
import constants
from neutron.plugins.ml2.drivers.openvswitch.agent \
import ovs_dvr_neutron_agent
LOG = logging.getLogger(__name__)
cfg.CONF.import_group('AGENT', 'neutron.plugins.openvswitch.common.config')
cfg.CONF.import_group('OVS', 'neutron.plugins.openvswitch.common.config')
cfg.CONF.import_group('AGENT', 'neutron.plugins.ml2.drivers.openvswitch.'
'agent.common.config')
cfg.CONF.import_group('OVS', 'neutron.plugins.ml2.drivers.openvswitch.agent.'
'common.config')
# A placeholder for dead vlans.
DEAD_VLAN_TAG = p_const.MAX_VLAN_TAG + 1

@ -21,8 +21,9 @@ from oslo_utils import importutils
from neutron.agent.linux import ip_lib
from neutron.cmd.sanity import checks
from neutron.plugins.openvswitch.agent import ovs_neutron_agent as ovsagt
from neutron.plugins.openvswitch.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
from neutron.plugins.ml2.drivers.openvswitch.agent \
import ovs_neutron_agent as ovsagt
from neutron.tests.common import base as common_base
from neutron.tests.common import net_helpers
from neutron.tests.functional.agent import test_ovs_lib
@ -30,7 +31,8 @@ from neutron.tests.functional import base
from neutron.tests import tools
cfg.CONF.import_group('OVS', 'neutron.plugins.openvswitch.common.config')
cfg.CONF.import_group('OVS', 'neutron.plugins.ml2.drivers.openvswitch.agent.'
'common.config')
class _OVSAgentTestBase(test_ovs_lib.OVSBridgeTestBase,
@ -81,7 +83,8 @@ class _OVSAgentTestBase(test_ovs_lib.OVSBridgeTestBase,
class _OVSAgentOFCtlTestBase(_OVSAgentTestBase):
_MAIN_MODULE = 'neutron.plugins.openvswitch.agent.openflow.ovs_ofctl.main'
_MAIN_MODULE = ('neutron.plugins.ml2.drivers.openvswitch.agent.'
'openflow.ovs_ofctl.main')
class _ARPSpoofTestCase(object):

@ -34,7 +34,7 @@ from neutron.db import securitygroups_rpc_base as sg_db_rpc
from neutron.extensions import allowedaddresspairs as addr_pair
from neutron.extensions import securitygroup as ext_sg
from neutron import manager
from neutron.plugins.openvswitch.agent import ovs_neutron_agent
from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent
from neutron.tests import base
from neutron.tests import tools
from neutron.tests.unit.extensions import test_securitygroup as test_sg

@ -85,8 +85,8 @@ class HackingTestCase(base.BaseTestCase):
self.assertEqual(0,
len(list(checks.use_jsonutils(
"json.%s" % method,
"./neutron/plugins/openvswitch/agent/xenapi/etc/xapi.d/"
"plugins/netwrap"))))
"./neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/"
"etc/xapi.d/plugins/netwrap"))))
def test_assert_called_once_with(self):
fail_code1 = """

@ -17,9 +17,9 @@
import collections
import mock
from neutron.agent import l2population_rpc
from neutron.plugins.ml2.drivers.l2pop import rpc as l2pop_rpc
from neutron.plugins.openvswitch.agent import ovs_neutron_agent
from neutron.plugins.ml2.drivers.l2pop.rpc_manager import l2population_rpc
from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent
from neutron.tests import base

@ -17,7 +17,8 @@
import mock
from neutron.common import constants as n_const
from neutron.tests.unit.agent import l2population_rpc_base
from neutron.tests.unit.plugins.ml2.drivers.l2pop.rpc_manager \
import l2population_rpc_base
class TestL2populationRpcCallBackTunnelMixin(

@ -17,7 +17,6 @@ import testtools
import mock
from neutron.agent import l2population_rpc
from neutron.common import constants
from neutron.common import topics
from neutron import context
@ -29,6 +28,7 @@ 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 mech_driver as l2pop_mech_driver
from neutron.plugins.ml2.drivers.l2pop import rpc as l2pop_rpc
from neutron.plugins.ml2.drivers.l2pop.rpc_manager import l2population_rpc
from neutron.plugins.ml2 import managers
from neutron.plugins.ml2 import rpc
from neutron.tests import base

@ -22,8 +22,10 @@ from neutron.agent.linux import utils
from neutron.common import constants
from neutron.common import exceptions
from neutron.plugins.common import constants as p_const
from neutron.plugins.linuxbridge.agent import linuxbridge_neutron_agent
from neutron.plugins.linuxbridge.common import constants as lconst
from neutron.plugins.ml2.drivers.linuxbridge.agent.common \
import constants as lconst
from neutron.plugins.ml2.drivers.linuxbridge.agent \
import linuxbridge_neutron_agent
from neutron.tests import base
LOCAL_IP = '192.168.0.33'

@ -15,7 +15,8 @@
from neutron.common import constants
from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers import mech_linuxbridge
from neutron.plugins.ml2.drivers.linuxbridge.mech_driver \
import mech_linuxbridge
from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base

@ -16,7 +16,8 @@
import mock
from neutron.tests.unit.plugins.openvswitch.agent import ovs_test_base
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent \
import ovs_test_base
call = mock.call # short hand

@ -16,8 +16,8 @@
import mock
from neutron.tests.unit.plugins.openvswitch.agent.openflow.ovs_ofctl \
import ovs_bridge_test_base
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.\
openflow.ovs_ofctl import ovs_bridge_test_base
call = mock.call # short hand

@ -16,9 +16,10 @@
import mock
import neutron.plugins.openvswitch.common.constants as ovs_const
from neutron.tests.unit.plugins.openvswitch.agent.openflow.ovs_ofctl \
import ovs_bridge_test_base
import neutron.plugins.ml2.drivers.openvswitch.agent.common.constants \
as ovs_const
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.\
openflow.ovs_ofctl import ovs_bridge_test_base
call = mock.call # short hand

@ -17,9 +17,10 @@
import mock
import netaddr
import neutron.plugins.openvswitch.common.constants as ovs_const
from neutron.tests.unit.plugins.openvswitch.agent.openflow.ovs_ofctl \
import ovs_bridge_test_base
import neutron.plugins.ml2.drivers.openvswitch.agent.common.constants \
as ovs_const
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.\
openflow.ovs_ofctl import ovs_bridge_test_base
call = mock.call # short hand

@ -20,9 +20,10 @@ from oslo_utils import importutils
from neutron.tests import base
_AGENT_PACKAGE = 'neutron.plugins.openvswitch.agent'
_AGENT_PACKAGE = 'neutron.plugins.ml2.drivers.openvswitch.agent'
_AGENT_NAME = _AGENT_PACKAGE + '.ovs_neutron_agent'
_DVR_AGENT_NAME = 'neutron.plugins.openvswitch.agent.ovs_dvr_neutron_agent'
_DVR_AGENT_NAME = ('neutron.plugins.ml2.drivers.openvswitch.agent.'
'ovs_dvr_neutron_agent')
class OVSAgentConfigTestBase(base.BaseTestCase):

@ -28,8 +28,9 @@ from neutron.agent.linux import ip_lib
from neutron.common import constants as n_const
from neutron.plugins.common import constants as p_const
from neutron.plugins.ml2.drivers.l2pop import rpc as l2pop_rpc
from neutron.plugins.openvswitch.common import constants
from neutron.tests.unit.plugins.openvswitch.agent import ovs_test_base
from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent \
import ovs_test_base
NOTIFIER = 'neutron.plugins.ml2.rpc.AgentNotifierApi'

@ -23,8 +23,9 @@ from oslo_log import log
from neutron.agent.common import ovs_lib
from neutron.agent.linux import ip_lib
from neutron.plugins.common import constants as p_const
from neutron.plugins.openvswitch.common import constants
from neutron.tests.unit.plugins.openvswitch.agent import ovs_test_base
from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent \
import ovs_test_base
# Useful global dummy variables.

@ -17,7 +17,8 @@ from oslo_config import cfg
from neutron.common import constants
from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers import mech_openvswitch
from neutron.plugins.ml2.drivers.openvswitch.mech_driver \
import mech_openvswitch
from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent \
import test_agent_scheduler
from neutron.tests.unit.plugins.ml2 import test_plugin
from neutron.tests.unit.plugins.openvswitch import test_agent_scheduler
class Ml2AgentSchedulerTestCase(

@ -58,11 +58,11 @@ data_files =
etc/neutron/plugins/cisco/cisco_vpn_agent.ini
etc/neutron/plugins/embrane = etc/neutron/plugins/embrane/heleos_conf.ini
etc/neutron/plugins/ibm = etc/neutron/plugins/ibm/sdnve_neutron_plugin.ini
etc/neutron/plugins/linuxbridge = etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini
etc/neutron/plugins/metaplugin = etc/neutron/plugins/metaplugin/metaplugin.ini
etc/neutron/plugins/midonet = etc/neutron/plugins/midonet/midonet.ini
etc/neutron/plugins/ml2 =
etc/neutron/plugins/bigswitch/restproxy.ini
etc/neutron/plugins/ml2/linuxbridge_agent.ini
etc/neutron/plugins/ml2/ml2_conf.ini
etc/neutron/plugins/ml2/ml2_conf_arista.ini
etc/neutron/plugins/ml2/ml2_conf_brocade.ini
@ -72,11 +72,11 @@ data_files =
etc/neutron/plugins/ml2/ml2_conf_fslsdn.ini
etc/neutron/plugins/ml2/ml2_conf_sriov.ini
etc/neutron/plugins/nuage/nuage_plugin.ini
etc/neutron/plugins/ml2/openvswitch_agent.ini
etc/neutron/plugins/mlnx = etc/neutron/plugins/mlnx/mlnx_conf.ini
etc/neutron/plugins/nec = etc/neutron/plugins/nec/nec.ini
etc/neutron/plugins/nuage = etc/neutron/plugins/nuage/nuage_plugin.ini
etc/neutron/plugins/oneconvergence = etc/neutron/plugins/oneconvergence/nvsdplugin.ini
etc/neutron/plugins/openvswitch = etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
etc/neutron/plugins/plumgrid = etc/neutron/plugins/plumgrid/plumgrid.ini
etc/neutron/plugins/vmware = etc/neutron/plugins/vmware/nsx.ini
etc/neutron/plugins/opencontrail = etc/neutron/plugins/opencontrail/contrailplugin.ini
@ -94,7 +94,7 @@ console_scripts =
neutron-ibm-agent = neutron.plugins.ibm.agent.sdnve_neutron_agent:main
neutron-ipset-cleanup = neutron.cmd.ipset_cleanup:main
neutron-l3-agent = neutron.cmd.eventlet.agents.l3:main
neutron-linuxbridge-agent = neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent:main
neutron-linuxbridge-agent = neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent:main
neutron-metadata-agent = neutron.cmd.eventlet.agents.metadata:main
neutron-mlnx-agent = neutron.cmd.eventlet.plugins.mlnx_neutron_agent:main
neutron-nec-agent = neutron.cmd.eventlet.plugins.nec_neutron_agent:main
@ -168,8 +168,8 @@ neutron.ml2.mechanism_drivers =
opendaylight = neutron.plugins.ml2.drivers.opendaylight.driver:OpenDaylightMechanismDriver
logger = neutron.tests.unit.plugins.ml2.drivers.mechanism_logger:LoggerMechanismDriver
test = neutron.tests.unit.plugins.ml2.drivers.mechanism_test:TestMechanismDriver
linuxbridge = neutron.plugins.ml2.drivers.mech_linuxbridge:LinuxbridgeMechanismDriver
openvswitch = neutron.plugins.ml2.drivers.mech_openvswitch:OpenvswitchMechanismDriver
linuxbridge = neutron.plugins.ml2.drivers.linuxbridge.mech_driver.mech_linuxbridge:LinuxbridgeMechanismDriver
openvswitch = neutron.plugins.ml2.drivers.openvswitch.mech_driver.mech_openvswitch:OpenvswitchMechanismDriver
hyperv = neutron.plugins.ml2.drivers.hyperv.mech_hyperv:HypervMechanismDriver
arista = neutron.plugins.ml2.drivers.arista.mechanism_arista:AristaDriver
# Note: ncs and cisco_ncs point to the same driver entrypoint

@ -27,7 +27,8 @@ ignore_regexes=(
"^plugins/ml2/test_extension_driver_api.py$"
"^plugins/ml2/test_ext_portsecurity.py$"
"^plugins/ml2/test_agent_scheduler.py$"
"^plugins/openvswitch/test_ovs_tunnel.py$"
"^plugins/ml2/drivers/openvswitch/agent/test_agent_scheduler.py$"
"^plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py$"
"^plugins/openvswitch/test_agent_scheduler.py$"
)

@ -108,10 +108,10 @@ commands = python -m testtools.run \
neutron.tests.unit.services.l3_router.test_l3_apic \
neutron.tests.unit.plugins.sriovnicagent.test_sriov_nic_agent \
neutron.tests.unit.plugins.sriovnicagent.test_pci_lib \
neutron.tests.unit.plugins.openvswitch.agent.ovs_test_base \
neutron.tests.unit.plugins.openvswitch.agent.openflow.ovs_ofctl.test_br_phys \
neutron.tests.unit.plugins.openvswitch.agent.openflow.ovs_ofctl.test_br_int \
neutron.tests.unit.plugins.openvswitch.agent.openflow.ovs_ofctl.test_br_tun \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.ovs_test_base \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl.test_br_phys \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl.test_br_int \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl.test_br_tun \
neutron.tests.unit.plugins.brocade.test_brocade_db \
neutron.tests.unit.plugins.brocade.test_brocade_vlan \
neutron.tests.unit.plugins.oneconvergence.test_nvsd_agent \
@ -122,8 +122,8 @@ commands = python -m testtools.run \
neutron.tests.unit.plugins.ml2.test_driver_context \
neutron.tests.unit.plugins.ml2.test_rpc \
neutron.tests.unit.plugins.ml2.drivers.mlnx.test_mech_mlnx \
neutron.tests.unit.plugins.ml2.drivers.test_mech_openvswitch \
neutron.tests.unit.plugins.ml2.drivers.test_mech_linuxbridge \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.mech_driver.test_mech_openvswitch \
neutron.tests.unit.plugins.ml2.drivers.linuxbridge.mech_driver.test_mech_linuxbridge \
neutron.tests.unit.plugins.ml2.drivers.base_type_tunnel \
neutron.tests.unit.plugins.ml2.drivers.ext_test \
neutron.tests.unit.plugins.ml2.drivers.mech_sriov.test_mech_sriov_nic_switch \
@ -138,7 +138,9 @@ commands = python -m testtools.run \
neutron.tests.unit.plugins.ml2.drivers.cisco.apic.test_apic_topology \
neutron.tests.unit.plugins.ml2.drivers.test_type_flat \
neutron.tests.unit.plugins.ml2.drivers.mechanism_test \
neutron.tests.unit.plugins.ml2.drivers.l2pop.rpc_manager.l2population_rpc_base \
neutron.tests.unit.plugins.ml2.extensions.fake_extension \
neutron.tests.unit.plugins.ml2.drivers.l2pop.rpc_manager.test_l2population_rpc \
neutron.tests.unit.plugins.cisco.n1kv.fake_client \
neutron.tests.unit.plugins.cisco.test_network_db \
neutron.tests.unit.db.test_l3_dvr_db \
@ -156,9 +158,7 @@ commands = python -m testtools.run \
neutron.tests.unit.api.rpc.handlers.test_dvr_rpc \
neutron.tests.unit.api.rpc.agentnotifiers.test_dhcp_rpc_agent_api \
neutron.tests.unit.agent.metadata.test_driver \
neutron.tests.unit.agent.l2population_rpc_base \
neutron.tests.unit.agent.test_rpc \
neutron.tests.unit.agent.test_l2population_rpc \
neutron.tests.unit.agent.l3.test_link_local_allocator \
neutron.tests.unit.agent.l3.test_ha_router \
neutron.tests.unit.agent.l3.test_legacy_router \

Loading…
Cancel
Save