Browse Source

Reorganize unit test tree

This change ensures that the structure of the unit test tree matches
that of the code tree to make it obvious where to find tests for a
given module.  A check is added to the pep8 job to protect against
regressions.

The plugin test paths are relocated to neutron/tests/unit/plugins
but are otherwise ignored for now.

Change-Id: If307593259139171be21a71c58e3a34bf148cc7f
Partial-Bug: #1440834
changes/11/158811/10
Maru Newby 7 years ago
parent
commit
1105782e39
  1. 33
      TESTING.rst
  2. 2
      neutron/tests/etc/api-paste.ini.test
  3. 2
      neutron/tests/retargetable/base.py
  4. 4
      neutron/tests/unit/_test_extension_portbindings.py
  5. 0
      neutron/tests/unit/agent/common/test_config.py
  6. 0
      neutron/tests/unit/agent/dhcp/__init__.py
  7. 0
      neutron/tests/unit/agent/dhcp/test_agent.py
  8. 0
      neutron/tests/unit/agent/l3/test_agent.py
  9. 0
      neutron/tests/unit/agent/l3/test_dvr_fip_ns.py
  10. 0
      neutron/tests/unit/agent/l3/test_link_local_allocator.py
  11. 0
      neutron/tests/unit/agent/l3/test_router_processing_queue.py
  12. 0
      neutron/tests/unit/agent/linux/test_daemon.py
  13. 0
      neutron/tests/unit/agent/linux/test_dhcp.py
  14. 0
      neutron/tests/unit/agent/linux/test_external_process.py
  15. 0
      neutron/tests/unit/agent/linux/test_interface.py
  16. 0
      neutron/tests/unit/agent/linux/test_ip_lib.py
  17. 4
      neutron/tests/unit/agent/linux/test_iptables_firewall.py
  18. 0
      neutron/tests/unit/agent/linux/test_iptables_manager.py
  19. 0
      neutron/tests/unit/agent/metadata/test_agent.py
  20. 0
      neutron/tests/unit/agent/metadata/test_namespace_proxy.py
  21. 0
      neutron/tests/unit/agent/test_rpc.py
  22. 4
      neutron/tests/unit/agent/test_securitygroups_rpc.py
  23. 0
      neutron/tests/unit/api/rpc/handlers/test_dhcp_rpc.py
  24. 0
      neutron/tests/unit/api/test_api_common.py
  25. 8
      neutron/tests/unit/api/test_extensions.py
  26. 0
      neutron/tests/unit/api/v2/__init__.py
  27. 0
      neutron/tests/unit/api/v2/test_attributes.py
  28. 2
      neutron/tests/unit/api/v2/test_base.py
  29. 0
      neutron/tests/unit/api/v2/test_resource.py
  30. 0
      neutron/tests/unit/cmd/__init__.py
  31. 0
      neutron/tests/unit/cmd/test_netns_cleanup.py
  32. 0
      neutron/tests/unit/cmd/test_ovs_cleanup.py
  33. 0
      neutron/tests/unit/common/__init__.py
  34. 0
      neutron/tests/unit/common/test_config.py
  35. 0
      neutron/tests/unit/common/test_ipv6_utils.py
  36. 0
      neutron/tests/unit/common/test_log.py
  37. 0
      neutron/tests/unit/common/test_rpc.py
  38. 0
      neutron/tests/unit/common/test_utils.py
  39. 7
      neutron/tests/unit/db/metering/test_metering_db.py
  40. 0
      neutron/tests/unit/db/test_agents_db.py
  41. 7
      neutron/tests/unit/db/test_allowedaddresspairs_db.py
  42. 2
      neutron/tests/unit/db/test_db_base_plugin_v2.py
  43. 0
      neutron/tests/unit/db/test_l3_hamode_db.py
  44. 0
      neutron/tests/unit/db/test_migration.py
  45. 0
      neutron/tests/unit/debug/__init__.py
  46. 0
      neutron/tests/unit/debug/test_commands.py
  47. 6
      neutron/tests/unit/extensions/base.py
  48. 10
      neutron/tests/unit/extensions/test_agent.py
  49. 10
      neutron/tests/unit/extensions/test_external_net.py
  50. 6
      neutron/tests/unit/extensions/test_extra_dhcp_opt.py
  51. 12
      neutron/tests/unit/extensions/test_extraroute.py
  52. 28
      neutron/tests/unit/extensions/test_l3.py
  53. 19
      neutron/tests/unit/extensions/test_l3_ext_gw_mode.py
  54. 6
      neutron/tests/unit/extensions/test_netmtu.py
  55. 12
      neutron/tests/unit/extensions/test_portsecurity.py
  56. 14
      neutron/tests/unit/extensions/test_providernet.py
  57. 4
      neutron/tests/unit/extensions/test_quotasv2.py
  58. 6
      neutron/tests/unit/extensions/test_securitygroup.py
  59. 12
      neutron/tests/unit/extensions/test_servicetype.py
  60. 4
      neutron/tests/unit/ipam/test_subnet_alloc.py
  61. 0
      neutron/tests/unit/notifiers/test_nova.py
  62. 0
      neutron/tests/unit/plugins/__init__.py
  63. 0
      neutron/tests/unit/plugins/brocade/__init__.py
  64. 2
      neutron/tests/unit/plugins/brocade/test_brocade_db.py
  65. 2
      neutron/tests/unit/plugins/brocade/test_brocade_plugin.py
  66. 0
      neutron/tests/unit/plugins/brocade/test_brocade_vlan.py
  67. 0
      neutron/tests/unit/plugins/cisco/__init__.py
  68. 0
      neutron/tests/unit/plugins/cisco/n1kv/__init__.py
  69. 0
      neutron/tests/unit/plugins/cisco/n1kv/fake_client.py
  70. 2
      neutron/tests/unit/plugins/cisco/n1kv/test_n1kv_db.py
  71. 16
      neutron/tests/unit/plugins/cisco/n1kv/test_n1kv_plugin.py
  72. 0
      neutron/tests/unit/plugins/cisco/test_network_db.py
  73. 0
      neutron/tests/unit/plugins/embrane/__init__.py
  74. 2
      neutron/tests/unit/plugins/embrane/test_embrane_l3_plugin.py
  75. 2
      neutron/tests/unit/plugins/embrane/test_embrane_neutron_plugin.py
  76. 0
      neutron/tests/unit/plugins/hyperv/__init__.py
  77. 0
      neutron/tests/unit/plugins/ibm/__init__.py
  78. 0
      neutron/tests/unit/plugins/ibm/test_sdnve_agent.py
  79. 0
      neutron/tests/unit/plugins/ibm/test_sdnve_api.py
  80. 6
      neutron/tests/unit/plugins/ibm/test_sdnve_plugin.py
  81. 0
      neutron/tests/unit/plugins/linuxbridge/__init__.py
  82. 0
      neutron/tests/unit/plugins/linuxbridge/test_lb_neutron_agent.py
  83. 0
      neutron/tests/unit/plugins/ml2/__init__.py
  84. 0
      neutron/tests/unit/plugins/ml2/_test_mech_agent.py
  85. 0
      neutron/tests/unit/plugins/ml2/db/__init__.py
  86. 0
      neutron/tests/unit/plugins/ml2/db/test_ml2_db.py
  87. 0
      neutron/tests/unit/plugins/ml2/db/test_ml2_dvr_db.py
  88. 0
      neutron/tests/unit/plugins/ml2/drivers/__init__.py
  89. 0
      neutron/tests/unit/plugins/ml2/drivers/arista/__init__.py
  90. 0
      neutron/tests/unit/plugins/ml2/drivers/arista/test_arista_mechanism_driver.py
  91. 0
      neutron/tests/unit/plugins/ml2/drivers/cisco/__init__.py
  92. 0
      neutron/tests/unit/plugins/ml2/drivers/cisco/apic/__init__.py
  93. 0
      neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_common.py
  94. 2
      neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_mechanism_driver.py
  95. 0
      neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_sync.py
  96. 2
      neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_topology_agent.py
  97. 0
      neutron/tests/unit/plugins/ml2/drivers/cisco/ncs/__init__.py
  98. 2
      neutron/tests/unit/plugins/ml2/drivers/cisco/ncs/test_mechanism_ncs.py
  99. 2
      neutron/tests/unit/plugins/ml2/drivers/ext_test.py
  100. 0
      neutron/tests/unit/plugins/ml2/drivers/freescale/__init__.py
  101. Some files were not shown because too many files have changed in this diff Show More

33
TESTING.rst

@ -24,6 +24,39 @@ fixes that are submitted also have tests to prove that they stay
fixed! In addition, before proposing for merge, all of the
current tests should be passing.
Structure of the unit test tree
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The structure of the unit test tree should match the structure of the
code tree, e.g. ::
- target module: neutron.agent.utils
- test module: neutron.tests.unit.agent.test_utils
Unit test modules should have the same path under neutron/tests/unit/
as the module they target has under neutron/, and their name should be
the name of the target module prefixed by 'test_'. This requirement
is intended to make it easier for developers to find the unit tests
for a given module.
Similarly, when a test module targets a package, that module's name
should be the name of the package prefixed by 'test_' with the same
path as when a test targets a module, e.g. ::
- target package: neutron.ipam
- test module: neutron.tests.unit.test_ipam
The following command can be used to validate whether the unit test
tree is structured according to the above requirements: ::
./tools/check_unit_test_structure.sh
Where appropriate, exceptions can be added to the above script. If
code is not part of the neutron namespace, for example, it's probably
reasonable to exclude their unit tests from the check.
Virtual environments
~~~~~~~~~~~~~~~~~~~~

2
neutron/tests/etc/api-paste.ini.test

@ -5,4 +5,4 @@ pipeline = extensions extensions_test_app
paste.filter_factory = neutron.common.extensions:plugin_aware_extension_middleware_factory
[app:extensions_test_app]
paste.app_factory = neutron.tests.unit.test_extensions:app_factory
paste.app_factory = neutron.tests.unit.api.test_extensions:app_factory

2
neutron/tests/retargetable/base.py

@ -29,7 +29,7 @@ import testscenarios
from neutron.tests import base as tests_base
from neutron.tests.retargetable import client_fixtures
from neutron.tests.unit.ml2 import test_ml2_plugin
from neutron.tests.unit.plugins.ml2 import test_ml2_plugin
# Each plugin must add a class to plugin_configurations that can configure the

4
neutron/tests/unit/_test_extension_portbindings.py

@ -22,10 +22,10 @@ from webob import exc
from neutron import context
from neutron.extensions import portbindings
from neutron import manager
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
class PortBindingsTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
class PortBindingsTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
# VIF_TYPE must be overridden according to plugin vif_type
VIF_TYPE = portbindings.VIF_TYPE_OTHER

0
neutron/tests/unit/test_agent_config.py → neutron/tests/unit/agent/common/test_config.py

0
neutron/tests/unit/brocade/__init__.py → neutron/tests/unit/agent/dhcp/__init__.py

0
neutron/tests/unit/test_dhcp_agent.py → neutron/tests/unit/agent/dhcp/test_agent.py

0
neutron/tests/unit/test_l3_agent.py → neutron/tests/unit/agent/l3/test_agent.py

0
neutron/tests/unit/agent/test_dvr_fip_ns.py → neutron/tests/unit/agent/l3/test_dvr_fip_ns.py

0
neutron/tests/unit/test_l3_dvr.py → neutron/tests/unit/agent/l3/test_link_local_allocator.py

0
neutron/tests/unit/test_router_processing_queue.py → neutron/tests/unit/agent/l3/test_router_processing_queue.py

0
neutron/tests/unit/test_linux_daemon.py → neutron/tests/unit/agent/linux/test_daemon.py

0
neutron/tests/unit/test_linux_dhcp.py → neutron/tests/unit/agent/linux/test_dhcp.py

0
neutron/tests/unit/test_linux_external_process.py → neutron/tests/unit/agent/linux/test_external_process.py

0
neutron/tests/unit/test_linux_interface.py → neutron/tests/unit/agent/linux/test_interface.py

0
neutron/tests/unit/test_linux_ip_lib.py → neutron/tests/unit/agent/linux/test_ip_lib.py

4
neutron/tests/unit/test_iptables_firewall.py → neutron/tests/unit/agent/linux/test_iptables_firewall.py

@ -25,10 +25,10 @@ from neutron.agent.linux import iptables_firewall
from neutron.agent import securitygroups_rpc as sg_cfg
from neutron.common import constants
from neutron.tests import base
from neutron.tests.unit import test_api_v2
from neutron.tests.unit.api.v2 import test_base
_uuid = test_api_v2._uuid
_uuid = test_base._uuid
#TODO(mangelajo): replace all 'IPv4', 'IPv6' to constants
FAKE_PREFIX = {'IPv4': '10.0.0.0/24',
'IPv6': 'fe80::/48'}

0
neutron/tests/unit/test_iptables_manager.py → neutron/tests/unit/agent/linux/test_iptables_manager.py

0
neutron/tests/unit/test_metadata_agent.py → neutron/tests/unit/agent/metadata/test_agent.py

0
neutron/tests/unit/test_metadata_namespace_proxy.py → neutron/tests/unit/agent/metadata/test_namespace_proxy.py

0
neutron/tests/unit/test_agent_rpc.py → neutron/tests/unit/agent/test_rpc.py

4
neutron/tests/unit/test_security_groups_rpc.py → neutron/tests/unit/agent/test_securitygroups_rpc.py

@ -36,7 +36,7 @@ from neutron.extensions import allowedaddresspairs as addr_pair
from neutron.extensions import securitygroup as ext_sg
from neutron import manager
from neutron.tests import base
from neutron.tests.unit import test_extension_security_group as test_sg
from neutron.tests.unit.extensions import test_securitygroup as test_sg
FAKE_PREFIX = {const.IPv4: '10.0.0.0/24',
const.IPv6: '2001:db8::/64'}
@ -46,7 +46,7 @@ FAKE_IP = {const.IPv4: '10.0.0.1',
'IPv6_LLA': 'fe80::123',
'IPv6_DHCP': '2001:db8::3'}
TEST_PLUGIN_CLASS = ('neutron.tests.unit.test_security_groups_rpc.'
TEST_PLUGIN_CLASS = ('neutron.tests.unit.agent.test_securitygroups_rpc.'
'SecurityGroupRpcTestPlugin')

0
neutron/tests/unit/test_dhcp_rpc.py → neutron/tests/unit/api/rpc/handlers/test_dhcp_rpc.py

0
neutron/tests/unit/test_api_api_common.py → neutron/tests/unit/api/test_api_common.py

8
neutron/tests/unit/test_extensions.py → neutron/tests/unit/api/test_extensions.py

@ -35,17 +35,17 @@ from neutron.plugins.common import constants
from neutron.plugins.ml2 import plugin as ml2_plugin
from neutron import quota
from neutron.tests import base
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit import extension_stubs as ext_stubs
import neutron.tests.unit.extensions
from neutron.tests.unit.extensions import extendedattribute as extattr
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import testlib_api
from neutron import wsgi
LOG = logging.getLogger(__name__)
_uuid = test_api_v2._uuid
_get_path = test_api_v2._get_path
_uuid = test_base._uuid
_get_path = test_base._get_path
extensions_path = ':'.join(neutron.tests.unit.extensions.__path__)
@ -721,7 +721,7 @@ class ExtensionExtendedAttributeTestCase(base.BaseTestCase):
def setUp(self):
super(ExtensionExtendedAttributeTestCase, self).setUp()
plugin = (
"neutron.tests.unit.test_extensions."
"neutron.tests.unit.api.test_extensions."
"ExtensionExtendedAttributeTestPlugin"
)

0
neutron/tests/unit/cisco/__init__.py → neutron/tests/unit/api/v2/__init__.py

0
neutron/tests/unit/test_attributes.py → neutron/tests/unit/api/v2/test_attributes.py

2
neutron/tests/unit/test_api_v2.py → neutron/tests/unit/api/v2/test_base.py

@ -1105,7 +1105,7 @@ class SubresourceTest(base.BaseTestCase):
def setUp(self):
super(SubresourceTest, self).setUp()
plugin = 'neutron.tests.unit.test_api_v2.TestSubresourcePlugin'
plugin = 'neutron.tests.unit.api.v2.test_base.TestSubresourcePlugin'
extensions.PluginAwareExtensionManager._instance = None
# Save the global RESOURCE_ATTRIBUTE_MAP

0
neutron/tests/unit/test_api_v2_resource.py → neutron/tests/unit/api/v2/test_resource.py

0
neutron/tests/unit/cisco/n1kv/__init__.py → neutron/tests/unit/cmd/__init__.py

0
neutron/tests/unit/test_netns_cleanup.py → neutron/tests/unit/cmd/test_netns_cleanup.py

0
neutron/tests/unit/test_ovs_cleanup.py → neutron/tests/unit/cmd/test_ovs_cleanup.py

0
neutron/tests/unit/embrane/__init__.py → neutron/tests/unit/common/__init__.py

0
neutron/tests/unit/test_config.py → neutron/tests/unit/common/test_config.py

0
neutron/tests/unit/test_ipv6.py → neutron/tests/unit/common/test_ipv6_utils.py

0
neutron/tests/unit/test_common_log.py → neutron/tests/unit/common/test_log.py

0
neutron/tests/unit/test_rpc_service.py → neutron/tests/unit/common/test_rpc.py

0
neutron/tests/unit/test_common_utils.py → neutron/tests/unit/common/test_utils.py

7
neutron/tests/unit/db/metering/test_db_metering.py → neutron/tests/unit/db/metering/test_metering_db.py

@ -24,7 +24,7 @@ import neutron.extensions
from neutron.extensions import metering
from neutron.plugins.common import constants
from neutron.services.metering import metering_plugin
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
DB_METERING_PLUGIN_KLASS = (
"neutron.services.metering."
@ -108,8 +108,9 @@ class MeteringPluginDbTestCaseMixin(object):
yield metering_label_rule
class MeteringPluginDbTestCase(test_db_plugin.NeutronDbPluginV2TestCase,
MeteringPluginDbTestCaseMixin):
class MeteringPluginDbTestCase(
test_db_base_plugin_v2.NeutronDbPluginV2TestCase,
MeteringPluginDbTestCaseMixin):
fmt = 'json'
resource_prefix_map = dict(

0
neutron/tests/unit/db/test_agent_db.py → neutron/tests/unit/db/test_agents_db.py

7
neutron/tests/unit/test_extension_allowedaddresspairs.py → neutron/tests/unit/db/test_allowedaddresspairs_db.py

@ -22,15 +22,16 @@ from neutron.extensions import allowedaddresspairs as addr_pair
from neutron.extensions import portsecurity as psec
from neutron.extensions import securitygroup as secgroup
from neutron import manager
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
from oslo_config import cfg
DB_PLUGIN_KLASS = ('neutron.tests.unit.test_extension_allowedaddresspairs.'
DB_PLUGIN_KLASS = ('neutron.tests.unit.db.test_allowedaddresspairs_db.'
'AllowedAddressPairTestPlugin')
class AllowedAddressPairTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
class AllowedAddressPairTestCase(
test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
def setUp(self, plugin=None, ext_mgr=None):
super(AllowedAddressPairTestCase, self).setUp(plugin)

2
neutron/tests/unit/test_db_plugin.py → neutron/tests/unit/db/test_db_base_plugin_v2.py

@ -39,7 +39,7 @@ from neutron.db import db_base_plugin_v2
from neutron.db import models_v2
from neutron import manager
from neutron.tests import base
from neutron.tests.unit import test_extensions
from neutron.tests.unit.api import test_extensions
from neutron.tests.unit import testlib_api
DB_PLUGIN_KLASS = 'neutron.db.db_base_plugin_v2.NeutronDbPluginV2'

0
neutron/tests/unit/db/test_l3_ha_db.py → neutron/tests/unit/db/test_l3_hamode_db.py

0
neutron/tests/unit/test_db_migration.py → neutron/tests/unit/db/test_migration.py

0
neutron/tests/unit/hyperv/__init__.py → neutron/tests/unit/debug/__init__.py

0
neutron/tests/unit/test_debug_commands.py → neutron/tests/unit/debug/test_commands.py

6
neutron/tests/unit/test_api_v2_extension.py → neutron/tests/unit/extensions/base.py

@ -26,8 +26,8 @@ import webtest
from neutron.api import extensions
from neutron.api.v2 import attributes
from neutron import quota
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_extensions
from neutron.tests.unit.api import test_extensions
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit import testlib_api
@ -117,7 +117,7 @@ class ExtensionTestCase(testlib_api.WebTestCase):
if self._translate_resource_name:
path = path.replace('_', '-')
res = self.api.delete(
test_api_v2._get_path(path, id=entity_id, fmt=self.fmt))
test_base._get_path(path, id=entity_id, fmt=self.fmt))
delete_entity = getattr(self.plugin.return_value, "delete_" + entity)
delete_entity.assert_called_with(mock.ANY, entity_id)
self.assertEqual(res.status_int, exc.HTTPNoContent.code)

10
neutron/tests/unit/test_agent_ext_plugin.py → neutron/tests/unit/extensions/test_agent.py

@ -29,14 +29,14 @@ from neutron.db import agents_db
from neutron.db import db_base_plugin_v2
from neutron.extensions import agent
from neutron.openstack.common import uuidutils
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.db import test_db_base_plugin_v2
LOG = logging.getLogger(__name__)
_uuid = uuidutils.generate_uuid
_get_path = test_api_v2._get_path
_get_path = test_base._get_path
L3_HOSTA = 'hosta'
DHCP_HOSTA = 'hosta'
L3_HOSTB = 'hostb'
@ -180,11 +180,11 @@ class AgentDBTestMixIn(object):
class AgentDBTestCase(AgentDBTestMixIn,
test_db_plugin.NeutronDbPluginV2TestCase):
test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
fmt = 'json'
def setUp(self):
plugin = 'neutron.tests.unit.test_agent_ext_plugin.TestAgentPlugin'
plugin = 'neutron.tests.unit.extensions.test_agent.TestAgentPlugin'
# for these tests we need to enable overlapping ips
cfg.CONF.set_default('allow_overlapping_ips', True)
# Save the original RESOURCE_ATTRIBUTE_MAP

10
neutron/tests/unit/test_extension_ext_net.py → neutron/tests/unit/extensions/test_external_net.py

@ -26,14 +26,14 @@ from neutron.db import models_v2
from neutron.extensions import external_net as external_net
from neutron import manager
from neutron.openstack.common import uuidutils
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.db import test_db_base_plugin_v2
LOG = logging.getLogger(__name__)
_uuid = uuidutils.generate_uuid
_get_path = test_api_v2._get_path
_get_path = test_base._get_path
class ExtNetTestExtensionManager(object):
@ -48,7 +48,7 @@ class ExtNetTestExtensionManager(object):
return []
class ExtNetDBTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
class ExtNetDBTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
def _create_network(self, fmt, name, admin_state_up, **kwargs):
"""Override the routine for allowing the router:external attribute."""
@ -62,7 +62,7 @@ class ExtNetDBTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
fmt, name, admin_state_up, arg_list=arg_list, **new_args)
def setUp(self):
plugin = 'neutron.tests.unit.test_l3_plugin.TestNoL3NatPlugin'
plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin'
ext_mgr = ExtNetTestExtensionManager()
super(ExtNetDBTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr)

6
neutron/tests/unit/test_extension_extradhcpopts.py → neutron/tests/unit/extensions/test_extra_dhcp_opt.py

@ -21,12 +21,12 @@ import webob.exc
from neutron.db import db_base_plugin_v2
from neutron.db import extradhcpopt_db as edo_db
from neutron.extensions import extra_dhcp_opt as edo_ext
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
LOG = logging.getLogger(__name__)
DB_PLUGIN_KLASS = (
'neutron.tests.unit.test_extension_extradhcpopts.ExtraDhcpOptTestPlugin')
'neutron.tests.unit.extensions.test_extra_dhcp_opt.ExtraDhcpOptTestPlugin')
class ExtraDhcpOptTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
@ -53,7 +53,7 @@ class ExtraDhcpOptTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
return rtn_port
class ExtraDhcpOptDBTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
class ExtraDhcpOptDBTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
def setUp(self, plugin=DB_PLUGIN_KLASS):
super(ExtraDhcpOptDBTestCase, self).setUp(plugin=plugin)

12
neutron/tests/unit/test_extension_extraroute.py → neutron/tests/unit/extensions/test_extraroute.py

@ -24,14 +24,14 @@ from neutron.db import extraroute_db
from neutron.extensions import extraroute
from neutron.extensions import l3
from neutron.openstack.common import uuidutils
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_l3_plugin as test_l3
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.extensions import test_l3 as test_l3
LOG = logging.getLogger(__name__)
_uuid = uuidutils.generate_uuid
_get_path = test_api_v2._get_path
_get_path = test_base._get_path
class ExtraRouteTestExtensionManager(object):
@ -459,7 +459,7 @@ class ExtraRouteDBIntTestCase(test_l3.L3NatDBIntTestCase,
def setUp(self, plugin=None, ext_mgr=None):
if not plugin:
plugin = ('neutron.tests.unit.test_extension_extraroute.'
plugin = ('neutron.tests.unit.extensions.test_extraroute.'
'TestExtraRouteIntPlugin')
# for these tests we need to enable overlapping ips
cfg.CONF.set_default('allow_overlapping_ips', True)
@ -474,9 +474,9 @@ class ExtraRouteDBSepTestCase(test_l3.L3NatDBSepTestCase,
ExtraRouteDBTestCaseBase):
def setUp(self):
# the plugin without L3 support
plugin = 'neutron.tests.unit.test_l3_plugin.TestNoL3NatPlugin'
plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin'
# the L3 service plugin
l3_plugin = ('neutron.tests.unit.test_extension_extraroute.'
l3_plugin = ('neutron.tests.unit.extensions.test_extraroute.'
'TestExtraRouteL3NatServicePlugin')
service_plugins = {'l3_plugin_name': l3_plugin}

28
neutron/tests/unit/test_l3_plugin.py → neutron/tests/unit/extensions/test_l3.py

@ -47,15 +47,15 @@ from neutron.openstack.common import uuidutils
from neutron.plugins.common import constants as service_constants
from neutron.tests import base
from neutron.tests import fake_notifier
from neutron.tests.unit import test_agent_ext_plugin
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_api_v2_extension
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.db import test_db_base_plugin_v2
from neutron.tests.unit.extensions import base as test_extensions_base
from neutron.tests.unit.extensions import test_agent
LOG = logging.getLogger(__name__)
_uuid = uuidutils.generate_uuid
_get_path = test_api_v2._get_path
_get_path = test_base._get_path
class L3TestExtensionManager(object):
@ -76,7 +76,7 @@ class L3TestExtensionManager(object):
return []
class L3NatExtensionTestCase(test_api_v2_extension.ExtensionTestCase):
class L3NatExtensionTestCase(test_extensions_base.ExtensionTestCase):
fmt = 'json'
def setUp(self):
@ -464,7 +464,7 @@ class L3NatTestCaseMixin(object):
private_port = None
if port_id:
private_port = self._show('ports', port_id)
with test_db_plugin.optional_ctx(private_port,
with test_db_base_plugin_v2.optional_ctx(private_port,
self.port) as private_port:
with self.router() as r:
sid = private_port['port']['fixed_ips'][0]['subnet_id']
@ -2431,13 +2431,13 @@ class L3AgentDbTestCaseBase(L3NatTestCaseMixin):
self._test_notify_op_agent(self._test_floatingips_op_agent)
class L3BaseForIntTests(test_db_plugin.NeutronDbPluginV2TestCase):
class L3BaseForIntTests(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
mock_rescheduling = True
def setUp(self, plugin=None, ext_mgr=None, service_plugins=None):
if not plugin:
plugin = 'neutron.tests.unit.test_l3_plugin.TestL3NatIntPlugin'
plugin = 'neutron.tests.unit.extensions.test_l3.TestL3NatIntPlugin'
# for these tests we need to enable overlapping ips
cfg.CONF.set_default('allow_overlapping_ips', True)
ext_mgr = ext_mgr or L3TestExtensionManager()
@ -2452,14 +2452,14 @@ class L3BaseForIntTests(test_db_plugin.NeutronDbPluginV2TestCase):
self.setup_notification_driver()
class L3BaseForSepTests(test_db_plugin.NeutronDbPluginV2TestCase):
class L3BaseForSepTests(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
def setUp(self, plugin=None, ext_mgr=None):
# the plugin without L3 support
if not plugin:
plugin = 'neutron.tests.unit.test_l3_plugin.TestNoL3NatPlugin'
plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin'
# the L3 service plugin
l3_plugin = ('neutron.tests.unit.test_l3_plugin.'
l3_plugin = ('neutron.tests.unit.extensions.test_l3.'
'TestL3NatServicePlugin')
service_plugins = {'l3_plugin_name': l3_plugin}
@ -2475,12 +2475,12 @@ class L3BaseForSepTests(test_db_plugin.NeutronDbPluginV2TestCase):
class L3NatDBIntAgentSchedulingTestCase(L3BaseForIntTests,
L3NatTestCaseMixin,
test_agent_ext_plugin.
test_agent.
AgentDBTestMixIn):
"""Unit tests for core plugin with L3 routing and scheduling integrated."""
def setUp(self, plugin='neutron.tests.unit.test_l3_plugin.'
def setUp(self, plugin='neutron.tests.unit.extensions.test_l3.'
'TestL3NatIntAgentSchedulingPlugin',
ext_mgr=None, service_plugins=None):
self.mock_rescheduling = False

19
neutron/tests/unit/test_extension_ext_gw_mode.py → neutron/tests/unit/extensions/test_l3_ext_gw_mode.py

@ -27,8 +27,8 @@ from neutron.db import models_v2
from neutron.extensions import l3
from neutron.extensions import l3_ext_gw_mode
from neutron.openstack.common import uuidutils
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit import test_l3_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
from neutron.tests.unit.extensions import test_l3
from neutron.tests.unit import testlib_api
_uuid = uuidutils.generate_uuid
@ -60,7 +60,7 @@ class TestExtensionManager(object):
# A simple class for making a concrete class out of the mixin
# for the case of a plugin that integrates l3 routing.
class TestDbIntPlugin(test_l3_plugin.TestL3NatIntPlugin,
class TestDbIntPlugin(test_l3.TestL3NatIntPlugin,
l3_gwmode_db.L3_NAT_db_mixin):
supported_extension_aliases = ["external-net", "router", "ext-gw-mode"]
@ -68,7 +68,7 @@ class TestDbIntPlugin(test_l3_plugin.TestL3NatIntPlugin,
# A simple class for making a concrete class out of the mixin
# for the case of a l3 router service plugin
class TestDbSepPlugin(test_l3_plugin.TestL3NatServicePlugin,
class TestDbSepPlugin(test_l3.TestL3NatServicePlugin,
l3_gwmode_db.L3_NAT_db_mixin):
supported_extension_aliases = ["router", "ext-gw-mode"]
@ -299,8 +299,8 @@ class TestL3GwModeMixin(testlib_api.SqlTestCase):
self.assertIsNone(router.get('enable_snat'))
class ExtGwModeIntTestCase(test_db_plugin.NeutronDbPluginV2TestCase,
test_l3_plugin.L3NatTestCaseMixin):
class ExtGwModeIntTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase,
test_l3.L3NatTestCaseMixin):
def setUp(self, plugin=None, svc_plugins=None, ext_mgr=None):
# Store l3 resource attribute map as it will be updated
@ -309,7 +309,8 @@ class ExtGwModeIntTestCase(test_db_plugin.NeutronDbPluginV2TestCase,
self._l3_attribute_map_bk[item] = (
l3.RESOURCE_ATTRIBUTE_MAP[item].copy())
plugin = plugin or (
'neutron.tests.unit.test_extension_ext_gw_mode.TestDbIntPlugin')
'neutron.tests.unit.extensions.test_l3_ext_gw_mode.'
'TestDbIntPlugin')
# for these tests we need to enable overlapping ips
cfg.CONF.set_default('allow_overlapping_ips', True)
ext_mgr = ext_mgr or TestExtensionManager()
@ -430,9 +431,9 @@ class ExtGwModeSepTestCase(ExtGwModeIntTestCase):
self._l3_attribute_map_bk[item] = (
l3.RESOURCE_ATTRIBUTE_MAP[item].copy())
plugin = plugin or (
'neutron.tests.unit.test_l3_plugin.TestNoL3NatPlugin')
'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin')
# the L3 service plugin
l3_plugin = ('neutron.tests.unit.test_extension_ext_gw_mode.'
l3_plugin = ('neutron.tests.unit.extensions.test_l3_ext_gw_mode.'
'TestDbSepPlugin')
svc_plugins = {'l3_plugin_name': l3_plugin}
# for these tests we need to enable overlapping ips

6
neutron/tests/unit/test_extension_netmtu.py → neutron/tests/unit/extensions/test_netmtu.py

@ -16,7 +16,7 @@ from neutron.common import constants
from neutron.db import db_base_plugin_v2
from neutron.db import netmtu_db
from neutron.extensions import netmtu
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
class NetmtuExtensionManager(object):
@ -42,12 +42,12 @@ class NetmtuExtensionTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
supported_extension_aliases = ["net-mtu"]
class NetmtuExtensionTestCase(test_db_plugin.TestNetworksV2):
class NetmtuExtensionTestCase(test_db_base_plugin_v2.TestNetworksV2):
"""Test API extension net-mtu attributes.
"""
def setUp(self):
plugin = ('neutron.tests.unit.test_extension_netmtu.' +
plugin = ('neutron.tests.unit.extensions.test_netmtu.' +
'NetmtuExtensionTestPlugin')
ext_mgr = NetmtuExtensionManager()
super(NetmtuExtensionTestCase, self).setUp(plugin=plugin,

12
neutron/tests/unit/test_extension_portsecurity.py → neutron/tests/unit/extensions/test_portsecurity.py

@ -23,20 +23,20 @@ from neutron.db import securitygroups_db
from neutron.extensions import portsecurity as psec
from neutron.extensions import securitygroup as ext_sg
from neutron import manager
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit import test_extension_security_group
from neutron.tests.unit.db import test_db_base_plugin_v2
from neutron.tests.unit.extensions import test_securitygroup
DB_PLUGIN_KLASS = ('neutron.tests.unit.test_extension_portsecurity.'
DB_PLUGIN_KLASS = ('neutron.tests.unit.extensions.test_portsecurity.'
'PortSecurityTestPlugin')
class PortSecurityTestCase(
test_extension_security_group.SecurityGroupsTestCase,
test_db_plugin.NeutronDbPluginV2TestCase):
test_securitygroup.SecurityGroupsTestCase,
test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
def setUp(self, plugin=None):
ext_mgr = (
test_extension_security_group.SecurityGroupTestExtensionManager())
test_securitygroup.SecurityGroupTestExtensionManager())
super(PortSecurityTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr)
# Check if a plugin supports security groups

14
neutron/tests/unit/test_extension_pnet.py → neutron/tests/unit/extensions/test_providernet.py

@ -26,8 +26,8 @@ from neutron.extensions import providernet as pnet
from neutron import manager
from neutron.openstack.common import uuidutils
from neutron import quota
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_extensions
from neutron.tests.unit.api import test_extensions
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit import testlib_api
@ -101,9 +101,9 @@ class ProvidernetExtensionTestCase(testlib_api.WebTestCase):
instance.get_network.return_value = {'tenant_id': ctx.tenant_id,
'shared': False}
net_id = uuidutils.generate_uuid()
res = self.api.put(test_api_v2._get_path('networks',
id=net_id,
fmt=self.fmt),
res = self.api.put(test_base._get_path('networks',
id=net_id,
fmt=self.fmt),
self.serialize({'network': data}),
extra_environ=env,
expect_errors=expect_errors)
@ -112,7 +112,7 @@ class ProvidernetExtensionTestCase(testlib_api.WebTestCase):
def _post_network_with_provider_attrs(self, ctx, expect_errors=False):
data = self._prepare_net_data()
env = {'neutron.context': ctx}
res = self.api.post(test_api_v2._get_path('networks', fmt=self.fmt),
res = self.api.post(test_base._get_path('networks', fmt=self.fmt),
self.serialize({'network': data}),
content_type='application/' + self.fmt,
extra_environ=env,
@ -124,7 +124,7 @@ class ProvidernetExtensionTestCase(testlib_api.WebTestCase):
data = self._prepare_net_data()
data.update(bad_data)
env = {'neutron.context': ctx}
res = self.api.post(test_api_v2._get_path('networks', fmt=self.fmt),
res = self.api.post(test_base._get_path('networks', fmt=self.fmt),
self.serialize({'network': data}),
content_type='application/' + self.fmt,
extra_environ=env,

4
neutron/tests/unit/test_quota_ext.py → neutron/tests/unit/extensions/test_quotasv2.py

@ -30,12 +30,12 @@ from neutron import context
from neutron.db import quota_db
from neutron import quota
from neutron.tests import base
from neutron.tests.unit import test_api_v2
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit import testlib_api
TARGET_PLUGIN = 'neutron.plugins.ml2.plugin.Ml2Plugin'
_get_path = test_api_v2._get_path
_get_path = test_base._get_path
class QuotaExtensionTestCase(testlib_api.WebTestCase):

6
neutron/tests/unit/test_extension_security_group.py → neutron/tests/unit/extensions/test_securitygroup.py

@ -29,9 +29,9 @@ from neutron.db import securitygroups_db
from neutron.extensions import securitygroup as ext_sg
from neutron import manager
from neutron.tests import base
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
DB_PLUGIN_KLASS = ('neutron.tests.unit.test_extension_security_group.'
DB_PLUGIN_KLASS = ('neutron.tests.unit.extensions.test_securitygroup.'
'SecurityGroupTestPlugin')
@ -53,7 +53,7 @@ class SecurityGroupTestExtensionManager(object):
return []
class SecurityGroupsTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
class SecurityGroupsTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
def _create_security_group(self, fmt, name, description, **kwargs):

12
neutron/tests/unit/test_servicetype.py → neutron/tests/unit/extensions/test_servicetype.py

@ -25,18 +25,18 @@ from neutron.db import servicetype_db as st_db
from neutron.extensions import servicetype
from neutron.plugins.common import constants
from neutron.services import provider_configuration as provconf
from neutron.tests.unit.api import test_extensions
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.db import test_db_base_plugin_v2
from neutron.tests.unit import dummy_plugin as dp
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit import test_extensions
from neutron.tests.unit import testlib_api
DEFAULT_SERVICE_DEFS = [{'service_class': constants.DUMMY,
'plugin': dp.DUMMY_PLUGIN_NAME}]
_uuid = test_api_v2._uuid
_get_path = test_api_v2._get_path
_uuid = test_base._uuid
_get_path = test_base._get_path
class ServiceTypeManagerTestCase(testlib_api.SqlTestCase):
@ -165,7 +165,7 @@ class ServiceTypeExtensionTestCaseBase(testlib_api.WebTestCase):
def setUp(self):
# This is needed because otherwise a failure will occur due to
# nonexisting core_plugin
self.setup_coreplugin(test_db_plugin.DB_PLUGIN_KLASS)
self.setup_coreplugin(test_db_base_plugin_v2.DB_PLUGIN_KLASS)
cfg.CONF.set_override('service_plugins',
["%s.%s" % (dp.__name__,

4
neutron/tests/unit/ipam/test_subnet_alloc.py

@ -24,7 +24,7 @@ import neutron.ipam as ipam
from neutron.ipam import subnet_alloc
from neutron import manager
from neutron.openstack.common import uuidutils
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2
from neutron.tests.unit import testlib_api
@ -33,7 +33,7 @@ class TestSubnetAllocation(testlib_api.SqlTestCase):
def setUp(self):
super(TestSubnetAllocation, self).setUp()
self._tenant_id = 'test-tenant'
self.setup_coreplugin(test_db_plugin.DB_PLUGIN_KLASS)
self.setup_coreplugin(test_db_base_plugin_v2.DB_PLUGIN_KLASS)
self.plugin = manager.NeutronManager.get_plugin()
self.ctx = context.get_admin_context()
cfg.CONF.set_override('allow_overlapping_ips', True)

0
neutron/tests/unit/notifiers/test_notifiers_nova.py → neutron/tests/unit/notifiers/test_nova.py

0
neutron/tests/unit/ibm/__init__.py → neutron/tests/unit/plugins/__init__.py

0
neutron/tests/unit/ipam/__init__.py → neutron/tests/unit/plugins/brocade/__init__.py

2
neutron/tests/unit/brocade/test_brocade_db.py → neutron/tests/unit/plugins/brocade/test_brocade_db.py

@ -21,7 +21,7 @@ import uuid
from neutron import context
from neutron.plugins.brocade.db import models as brocade_db
from neutron.tests.unit import test_db_plugin as test_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin
TEST_VLAN = 1000

2
neutron/tests/unit/brocade/test_brocade_plugin.py → neutron/tests/unit/plugins/brocade/test_brocade_plugin.py

@ -20,7 +20,7 @@ from oslo_utils import importutils
from neutron.extensions import portbindings
from neutron.plugins.brocade import NeutronPlugin as brocade_plugin
from neutron.tests.unit import _test_extension_portbindings as test_bindings
from neutron.tests.unit import test_db_plugin as test_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin
PLUGIN_NAME = ('neutron.plugins.brocade.'

0
neutron/tests/unit/brocade/test_brocade_vlan.py → neutron/tests/unit/plugins/brocade/test_brocade_vlan.py

0
neutron/tests/unit/linuxbridge/__init__.py → neutron/tests/unit/plugins/cisco/__init__.py

0
neutron/tests/unit/ml2/__init__.py → neutron/tests/unit/plugins/cisco/n1kv/__init__.py

0
neutron/tests/unit/cisco/n1kv/fake_client.py → neutron/tests/unit/plugins/cisco/n1kv/fake_client.py

2
neutron/tests/unit/cisco/n1kv/test_n1kv_db.py → neutron/tests/unit/plugins/cisco/n1kv/test_n1kv_db.py

@ -24,7 +24,7 @@ from neutron.plugins.cisco.common import cisco_constants as c_const
from neutron.plugins.cisco.common import cisco_exceptions as c_exc
from neutron.plugins.cisco.db import n1kv_db_v2
from neutron.plugins.cisco.db import n1kv_models_v2
from neutron.tests.unit import test_db_plugin as test_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin
from neutron.tests.unit import testlib_api

16
neutron/tests/unit/cisco/n1kv/test_n1kv_plugin.py → neutron/tests/unit/plugins/cisco/n1kv/test_n1kv_plugin.py

@ -34,11 +34,11 @@ from neutron.plugins.cisco.extensions import policy_profile
from neutron.plugins.cisco.n1kv import n1kv_client
from neutron.plugins.cisco.n1kv import n1kv_neutron_plugin
from neutron.tests.unit import _test_extension_portbindings as test_bindings
from neutron.tests.unit.cisco.n1kv import fake_client
from neutron.tests.unit import test_api_v2
from neutron.tests.unit import test_db_plugin as test_plugin
from neutron.tests.unit import test_l3_plugin
from neutron.tests.unit import test_l3_schedulers
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin
from neutron.tests.unit.extensions import test_l3
from neutron.tests.unit.plugins.cisco.n1kv import fake_client
from neutron.tests.unit.scheduler import test_l3_agent_scheduler
PHYS_NET = 'some-phys-net'
@ -128,7 +128,7 @@ class N1kvPluginTestCase(test_plugin.NeutronDbPluginV2TestCase):
create. Default argument value chosen to correspond to the
default name specified in config.py file.
"""
uuid = test_api_v2._uuid()
uuid = test_base._uuid()
profile = {'id': uuid,
'name': name}
return n1kv_db_v2.create_policy_profile(profile)
@ -1281,11 +1281,11 @@ class TestN1kvSubnets(test_plugin.TestSubnetsV2,
self.assertEqual(1, mock_method.call_count)
class TestN1kvL3Test(test_l3_plugin.L3NatExtensionTestCase):
class TestN1kvL3Test(test_l3.L3NatExtensionTestCase):
pass
class TestN1kvL3SchedulersTest(test_l3_schedulers.L3SchedulerTestCase):
class TestN1kvL3SchedulersTest(test_l3_agent_scheduler.L3SchedulerTestCase):
pass

0
neutron/tests/unit/cisco/test_network_db.py → neutron/tests/unit/plugins/cisco/test_network_db.py

0
neutron/tests/unit/ml2/db/__init__.py → neutron/tests/unit/plugins/embrane/__init__.py

2
neutron/tests/unit/embrane/test_embrane_l3_plugin.py → neutron/tests/unit/plugins/embrane/test_embrane_l3_plugin.py

@ -16,7 +16,7 @@
from oslo_config import cfg
from neutron.plugins.embrane.common import config # noqa
from neutron.tests.unit import test_extension_extraroute as extraroute_test
from neutron.tests.unit.extensions import test_extraroute as extraroute_test
PLUGIN_NAME = ('neutron.plugins.embrane.plugins.embrane_fake_plugin.'
'EmbraneFakePlugin')

2
neutron/tests/unit/embrane/test_embrane_neutron_plugin.py → neutron/tests/unit/plugins/embrane/test_embrane_neutron_plugin.py

@ -18,7 +18,7 @@ import mock
from oslo_config import cfg
from neutron.plugins.embrane.common import config # noqa
from neutron.tests.unit import test_db_plugin as test_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin
PLUGIN_NAME = ('neutron.plugins.embrane.plugins.embrane_fake_plugin.'
'EmbraneFakePlugin')

0
neutron/tests/unit/ml2/drivers/__init__.py → neutron/tests/unit/plugins/hyperv/__init__.py

0
neutron/tests/unit/ml2/drivers/arista/__init__.py → neutron/tests/unit/plugins/ibm/__init__.py

0
neutron/tests/unit/ibm/test_sdnve_agent.py → neutron/tests/unit/plugins/ibm/test_sdnve_agent.py

0
neutron/tests/unit/ibm/test_sdnve_api.py → neutron/tests/unit/plugins/ibm/test_sdnve_api.py

6
neutron/tests/unit/ibm/test_sdnve_plugin.py → neutron/tests/unit/plugins/ibm/test_sdnve_plugin.py

@ -20,8 +20,8 @@ import mock
from neutron.extensions import portbindings
from neutron.tests.unit import _test_extension_portbindings as test_bindings
from neutron.tests.unit import test_db_plugin as test_plugin
from neutron.tests.unit import test_l3_plugin as test_l3_plugin
from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin
from neutron.tests.unit.extensions import test_l3 as test_l3
from neutron.plugins.ibm.common import constants
@ -111,7 +111,7 @@ class TestIBMPortBinding(IBMPluginV2TestCase,
VIF_TYPE = portbindings.VIF_TYPE_OVS
class IBMPluginRouterTestCase(test_l3_plugin.L3NatDBIntTestCase):
class IBMPluginRouterTestCase(test_l3.L3NatDBIntTestCase):
def setUp(self):
with contextlib.nested(

0
neutron/tests/unit/ml2/drivers/cisco/__init__.py → neutron/tests/unit/plugins/linuxbridge/__init__.py

0
neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py → neutron/tests/unit/plugins/linuxbridge/test_lb_neutron_agent.py

0
neutron/tests/unit/ml2/drivers/cisco/apic/__init__.py → neutron/tests/unit/plugins/ml2/__init__.py

0
neutron/tests/unit/ml2/_test_mech_agent.py → neutron/tests/unit/plugins/ml2/_test_mech_agent.py

0
neutron/tests/unit/ml2/drivers/cisco/ncs/__init__.py → neutron/tests/unit/plugins/ml2/db/__init__.py

0
neutron/tests/unit/ml2/db/test_ml2_db.py → neutron/tests/unit/plugins/ml2/db/test_ml2_db.py

0
neutron/tests/unit/ml2/db/test_ml2_dvr_db.py → neutron/tests/unit/plugins/ml2/db/test_ml2_dvr_db.py

0
neutron/tests/unit/ml2/drivers/freescale/__init__.py → neutron/tests/unit/plugins/ml2/drivers/__init__.py

0
neutron/tests/unit/ml2/drivers/mech_sriov/__init__.py → neutron/tests/unit/plugins/ml2/drivers/arista/__init__.py

0
neutron/tests/unit/ml2/drivers/arista/test_arista_mechanism_driver.py → neutron/tests/unit/plugins/ml2/drivers/arista/test_arista_mechanism_driver.py

0
neutron/tests/unit/ml2/extensions/__init__.py → neutron/tests/unit/plugins/ml2/drivers/cisco/__init__.py

0
neutron/tests/unit/oneconvergence/__init__.py → neutron/tests/unit/plugins/ml2/drivers/cisco/apic/__init__.py

0
neutron/tests/unit/ml2/drivers/cisco/apic/test_cisco_apic_common.py → neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_common.py

2
neutron/tests/unit/ml2/drivers/cisco/apic/test_cisco_apic_mechanism_driver.py → neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_mechanism_driver.py

@ -24,7 +24,7 @@ from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers.cisco.apic import mechanism_apic as md
from neutron.plugins.ml2.drivers import type_vlan # noqa
from neutron.tests import base
from neutron.tests.unit.ml2.drivers.cisco.apic import (
from neutron.tests.unit.plugins.ml2.drivers.cisco.apic import (
test_cisco_apic_common as mocked)

0
neutron/tests/unit/ml2/drivers/cisco/apic/test_cisco_apic_sync.py → neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_sync.py

2
neutron/tests/unit/ml2/drivers/cisco/apic/test_cisco_apic_topology_agent.py → neutron/tests/unit/plugins/ml2/drivers/cisco/apic/test_cisco_apic_topology_agent.py

@ -21,7 +21,7 @@ sys.modules["apicapi"] = mock.Mock()
from neutron.plugins.ml2.drivers.cisco.apic import apic_topology
from neutron.tests import base
from neutron.tests.unit.ml2.drivers.cisco.apic import (
from neutron.tests.unit.plugins.ml2.drivers.cisco.apic import (
test_cisco_apic_common as mocked)
NOTIFIER = ('neutron.plugins.ml2.drivers.cisco.apic.'

0
neutron/tests/unit/opencontrail/__init__.py → neutron/tests/unit/plugins/ml2/drivers/cisco/ncs/__init__.py

2
neutron/tests/unit/ml2/drivers/cisco/ncs/test_mechanism_ncs.py → neutron/tests/unit/plugins/ml2/drivers/cisco/ncs/test_mechanism_ncs.py

@ -14,7 +14,7 @@
# under the License.
from neutron.plugins.ml2.drivers.cisco.ncs import driver
from neutron.tests.unit.ml2 import test_ml2_plugin as test_plugin
from neutron.tests.unit.plugins.ml2 import test_ml2_plugin as test_plugin
class NCSTestCase(test_plugin.Ml2PluginV2TestCase):

2
neutron/tests/unit/ml2/drivers/ext_test.py → neutron/tests/unit/plugins/ml2/drivers/ext_test.py

@ -26,7 +26,7 @@ from neutron.api.v2 import attributes
from neutron.db import model_base
from neutron.db import models_v2
from neutron.plugins.ml2 import driver_api
from neutron.tests.unit.ml2 import extensions as test_extensions
from neutron.tests.unit.plugins.ml2 import extensions as test_extensions
class TestExtensionDriverBase(driver_api.ExtensionDriver):

0
neutron/tests/unit/openvswitch/__init__.py → neutron/tests/unit/plugins/ml2/drivers/freescale/__init__.py

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save