from neutron.tests import base as tests_base
from neutron.tests.retargetable import client_fixtures
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
# Each plugin must add a class to plugin_configurations that can configure the
# TODO(marun) Discover plugin conf via a metaclass
plugin_configurations = [
- test_ml2_plugin.Ml2ConfFixture(),
+ test_plugin.Ml2ConfFixture(),
]
from neutron.plugins.ml2.drivers.cisco.apic import apic_topology
from neutron.tests import base
from neutron.tests.unit.plugins.ml2.drivers.cisco.apic import (
- test_cisco_apic_common as mocked)
+ base as mocked)
NOTIFIER = ('neutron.plugins.ml2.drivers.cisco.apic.'
'apic_topology.ApicTopologyServiceNotifierApi')
from neutron.plugins.ml2.drivers import type_vlan # noqa
from neutron.tests import base
from neutron.tests.unit.plugins.ml2.drivers.cisco.apic import (
- test_cisco_apic_common as mocked)
+ base as mocked)
HOST_ID1 = 'ubuntu'
# under the License.
from neutron.plugins.ml2.drivers.cisco.ncs import driver
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin as test_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
class NCSTestCase(test_plugin.Ml2PluginV2TestCase):
class TestExtensionDriverBase(driver_api.ExtensionDriver):
- _supported_extension_aliases = 'test_extension'
+ _supported_extension_aliases = 'fake_extension'
def initialize(self):
extensions.append_api_extensions_path(test_extensions.__path__)
from neutron.extensions import portbindings
from neutron.plugins.ml2.drivers.freescale import mechanism_fslsdn
from neutron.tests import base
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
"""Unit testing for Freescale SDN mechanism driver."""
-class TestFslSdnMechDriverV2(test_ml2_plugin.Ml2PluginV2TestCase):
+class TestFslSdnMechDriverV2(test_plugin.Ml2PluginV2TestCase):
_mechanism_drivers = ['fslsdn']
"""Testing mechanism driver with ML2 plugin."""
super(TestFslSdnMechDriverV2, self).setUp()
-class TestFslSdnMechDriverNetworksV2(test_ml2_plugin.TestMl2NetworksV2,
+class TestFslSdnMechDriverNetworksV2(test_plugin.TestMl2NetworksV2,
TestFslSdnMechDriverV2):
pass
-class TestFslSdnMechDriverPortsV2(test_ml2_plugin.TestMl2PortsV2,
+class TestFslSdnMechDriverPortsV2(test_plugin.TestMl2PortsV2,
TestFslSdnMechDriverV2):
VIF_TYPE = portbindings.VIF_TYPE_OVS
CAP_PORT_FILTER = True
-class TestFslSdnMechDriverSubnetsV2(test_ml2_plugin.TestMl2SubnetsV2,
+class TestFslSdnMechDriverSubnetsV2(test_plugin.TestMl2SubnetsV2,
TestFslSdnMechDriverV2):
pass
from neutron.plugins.ml2 import managers
from neutron.plugins.ml2 import rpc
from neutron.tests import base
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin as test_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
HOST = 'my_l2_host'
L2_AGENT = {
import mock
from neutron import context
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin as test_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
with mock.patch.dict(sys.modules,
from neutron.plugins.common import constants as p_const
from neutron.plugins.ml2 import config
from neutron.plugins.ml2.drivers import type_gre
-from neutron.tests.unit.plugins.ml2 import test_rpcapi
-from neutron.tests.unit.plugins.ml2 import test_type_tunnel
+from neutron.tests.unit.plugins.ml2.drivers import base_type_tunnel
+from neutron.tests.unit.plugins.ml2 import test_rpc
from neutron.tests.unit import testlib_api
gre_id=gre_id).one()
-class GreTypeTest(test_type_tunnel.TunnelTypeTestMixin,
+class GreTypeTest(base_type_tunnel.TunnelTypeTestMixin,
testlib_api.SqlTestCase):
DRIVER_CLASS = type_gre.GreTypeDriver
TYPE = p_const.TYPE_GRE
self.assertEqual(0, self.driver.get_mtu('physnet1'))
-class GreTypeMultiRangeTest(test_type_tunnel.TunnelTypeMultiRangeTestMixin,
+class GreTypeMultiRangeTest(base_type_tunnel.TunnelTypeMultiRangeTestMixin,
testlib_api.SqlTestCase):
DRIVER_CLASS = type_gre.GreTypeDriver
-class GreTypeRpcCallbackTest(test_type_tunnel.TunnelRpcCallbackTestMixin,
- test_rpcapi.RpcCallbacksTestCase,
+class GreTypeRpcCallbackTest(base_type_tunnel.TunnelRpcCallbackTestMixin,
+ test_rpc.RpcCallbacksTestCase,
testlib_api.SqlTestCase):
DRIVER_CLASS = type_gre.GreTypeDriver
TYPE = p_const.TYPE_GRE
from neutron.plugins.common import constants as p_const
from neutron.plugins.ml2 import config
from neutron.plugins.ml2.drivers import type_vxlan
-from neutron.tests.unit.plugins.ml2 import test_rpcapi
-from neutron.tests.unit.plugins.ml2 import test_type_tunnel
+from neutron.tests.unit.plugins.ml2.drivers import base_type_tunnel
+from neutron.tests.unit.plugins.ml2 import test_rpc
from neutron.tests.unit import testlib_api
VXLAN_UDP_PORT_TWO = 8888
-class VxlanTypeTest(test_type_tunnel.TunnelTypeTestMixin,
+class VxlanTypeTest(base_type_tunnel.TunnelTypeTestMixin,
testlib_api.SqlTestCase):
DRIVER_CLASS = type_vxlan.VxlanTypeDriver
TYPE = p_const.TYPE_VXLAN
self.assertEqual(0, self.driver.get_mtu('physnet1'))
-class VxlanTypeMultiRangeTest(test_type_tunnel.TunnelTypeMultiRangeTestMixin,
+class VxlanTypeMultiRangeTest(base_type_tunnel.TunnelTypeMultiRangeTestMixin,
testlib_api.SqlTestCase):
DRIVER_CLASS = type_vxlan.VxlanTypeDriver
-class VxlanTypeRpcCallbackTest(test_type_tunnel.TunnelRpcCallbackTestMixin,
- test_rpcapi.RpcCallbacksTestCase,
+class VxlanTypeRpcCallbackTest(base_type_tunnel.TunnelRpcCallbackTestMixin,
+ test_rpc.RpcCallbacksTestCase,
testlib_api.SqlTestCase):
DRIVER_CLASS = type_vxlan.VxlanTypeDriver
TYPE = p_const.TYPE_VXLAN
}
-class Test_extension(extensions.ExtensionDescriptor):
+class Fake_extension(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
- return "ML2 test extension"
+ return "ML2 fake extension"
@classmethod
def get_alias(cls):
- return "test_extension"
+ return "fake_extension"
@classmethod
def get_description(cls):
@classmethod
def get_namespace(cls):
return ("http://docs.openstack.org/ext/neutron/ml2/test/"
- "test_extension/api/v1.0")
+ "fake_extension/api/v1.0")
@classmethod
def get_updated(cls):
# License for the specific language governing permissions and limitations
# under the License.
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
from neutron.tests.unit.plugins.openvswitch import test_agent_scheduler
class Ml2AgentSchedulerTestCase(
test_agent_scheduler.OvsAgentSchedulerTestCase):
- plugin_str = test_ml2_plugin.PLUGIN_NAME
+ plugin_str = test_plugin.PLUGIN_NAME
l3_plugin = ('neutron.services.l3_router.'
'l3_router_plugin.L3RouterPlugin')
class Ml2L3AgentNotifierTestCase(
test_agent_scheduler.OvsL3AgentNotifierTestCase):
- plugin_str = test_ml2_plugin.PLUGIN_NAME
+ plugin_str = test_plugin.PLUGIN_NAME
l3_plugin = ('neutron.services.l3_router.'
'l3_router_plugin.L3RouterPlugin')
class Ml2DhcpAgentNotifierTestCase(
test_agent_scheduler.OvsDhcpAgentNotifierTestCase):
- plugin_str = test_ml2_plugin.PLUGIN_NAME
+ plugin_str = test_plugin.PLUGIN_NAME
from neutron.plugins.ml2 import config
from neutron.tests.unit.extensions import test_portsecurity as test_psec
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
-class PSExtDriverTestCase(test_ml2_plugin.Ml2PluginV2TestCase,
+class PSExtDriverTestCase(test_plugin.Ml2PluginV2TestCase,
test_psec.TestPortSecurity):
_extension_drivers = ['port_security']
from neutron import manager
from neutron.plugins.ml2 import config
from neutron.tests.unit.plugins.ml2.drivers import ext_test
-from neutron.tests.unit.plugins.ml2 import test_ml2_plugin
+from neutron.tests.unit.plugins.ml2 import test_plugin
-class ExtensionDriverTestCase(test_ml2_plugin.Ml2PluginV2TestCase):
+class ExtensionDriverTestCase(test_plugin.Ml2PluginV2TestCase):
_extension_drivers = ['test']
self.assertTrue(ext_port_dict.called)
-class DBExtensionDriverTestCase(test_ml2_plugin.Ml2PluginV2TestCase):
+class DBExtensionDriverTestCase(test_plugin.Ml2PluginV2TestCase):
_extension_drivers = ['testdb']
def setUp(self):
from neutron.plugins.ml2.drivers.cisco.apic import mechanism_apic as md
from neutron.services.l3_router import l3_apic
-from neutron.tests.unit.plugins.ml2.drivers.cisco.apic import (
- test_cisco_apic_common as mocked)
+from neutron.tests.unit.plugins.ml2.drivers.cisco.apic import base as mocked
from neutron.tests.unit import testlib_api
test_files=$(find ${test_path} -iname 'test_*.py')
ignore_regexes=(
- "^plugins.*$"
+ # The following vendor plugins are not required to confrm to the
+ # structural requirements.
+ "^plugins/brocade.*$"
+ "^plugins/cisco.*$"
+ "^plugins/embrane.*$"
+ "^plugins/ibm.*$"
+ "^plugins/oneconvergence.*$"
+ # The following open source plugin tests are not actually unit
+ # tests and are ignored pending their relocation to the functional
+ # test tree.
+ "^plugins/ml2/drivers/mech_sriov/test_mech_sriov_nic_switch.py$"
+ "^plugins/ml2/test_security_group.py$"
+ "^plugins/ml2/test_port_binding.py$"
+ "^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/openvswitch/test_agent_scheduler.py$"
)
error_count=0