]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add l2pop support to full stack tests
authorAssaf Muller <amuller@redhat.com>
Thu, 11 Jun 2015 21:13:44 +0000 (17:13 -0400)
committerIhar Hrachyshka <ihrachys@redhat.com>
Thu, 10 Sep 2015 14:31:35 +0000 (14:31 +0000)
Add the l2pop mechanism driver to the ML2 plugin configuration, and set
l2_population = True, in the OVS agent configuration.
Each test class can enable or disable l2pop in its environment.

Change-Id: If4f2bf07883b763073b5a53f1aa557acb131d176

doc/source/devref/fullstack_testing.rst
neutron/tests/fullstack/resources/config.py
neutron/tests/fullstack/resources/environment.py
neutron/tests/fullstack/test_connectivity.py
neutron/tests/fullstack/test_l3_agent.py

index 5467f74f43e77dc873909ac5ad92a815bfe63249..4256bae66d684a92bc083d5fbe711fa82ee3bd02 100644 (file)
@@ -119,3 +119,4 @@ Long Term Goals
   mechanism driver. We may modularize the topology configuration further to
   allow to rerun full stack tests against different Neutron plugins or ML2
   mechanism drivers.
+* Add OVS ARP responder coverage when the gate supports OVS 2.1+
index 215f4909dbdc5598038678d5f8d34682bb42a64d..c39ed2bc5aea0c55ecdd1f6cf68771e496b14f15 100644 (file)
@@ -159,10 +159,14 @@ class ML2ConfigFixture(ConfigFixture):
         super(ML2ConfigFixture, self).__init__(
             env_desc, host_desc, temp_dir, base_filename='ml2_conf.ini')
 
+        mechanism_drivers = 'openvswitch'
+        if self.env_desc.l2_pop:
+            mechanism_drivers += ',l2population'
+
         self.config.update({
             'ml2': {
                 'tenant_network_types': tenant_network_types,
-                'mechanism_drivers': 'openvswitch',
+                'mechanism_drivers': mechanism_drivers,
             },
             'ml2_type_vlan': {
                 'network_vlan_ranges': 'physnet1:1000:2999',
@@ -193,12 +197,15 @@ class OVSConfigFixture(ConfigFixture):
             'securitygroup': {
                 'firewall_driver': ('neutron.agent.linux.iptables_firewall.'
                                     'OVSHybridIptablesFirewallDriver'),
+            },
+            'agent': {
+                'l2_population': str(self.env_desc.l2_pop),
             }
         })
 
         if self.tunneling_enabled:
-            self.config['agent'] = {
-                'tunnel_types': self.env_desc.network_type}
+            self.config['agent'].update({
+                'tunnel_types': self.env_desc.network_type})
             self.config['ovs'].update({
                 'tunnel_bridge': self._generate_tunnel_bridge(),
                 'int_peer_patch_port': self._generate_int_peer(),
index 7a0d67e6a16506413540013393325898a881e69f..152b7a4473cdc79f429448acc4db92cf8656dfff 100644 (file)
@@ -34,8 +34,9 @@ class EnvironmentDescription(object):
 
     Does the setup, as a whole, support tunneling? How about l2pop?
     """
-    def __init__(self, network_type='vxlan'):
+    def __init__(self, network_type='vxlan', l2_pop=True):
         self.network_type = network_type
+        self.l2_pop = l2_pop
 
     @property
     def tunneling_enabled(self):
index ed72221b5274ef2b9238756496852b9eafd47cde..5137fa310fce5559c5e7180e6ad97e7e6781460b 100644 (file)
@@ -26,15 +26,21 @@ load_tests = testscenarios.load_tests_apply_scenarios
 
 class TestConnectivitySameNetwork(base.BaseFullStackTestCase):
 
-    scenarios = [('VXLAN', {'network_type': 'vxlan'}),
-                 ('VLANs', {'network_type': 'vlan'})]
+    scenarios = [
+        ('VXLAN', {'network_type': 'vxlan',
+                   'l2_pop': False}),
+        ('GRE and l2pop', {'network_type': 'gre',
+                           'l2_pop': True}),
+        ('VLANs', {'network_type': 'vlan',
+                   'l2_pop': False})]
 
     def setUp(self):
         host_descriptions = [
             environment.HostDescription() for _ in range(2)]
         env = environment.Environment(
             environment.EnvironmentDescription(
-                network_type=self.network_type),
+                network_type=self.network_type,
+                l2_pop=self.l2_pop),
             host_descriptions)
         super(TestConnectivitySameNetwork, self).setUp(env)
 
index 2a0814fff93d0ff4210d16f5e60abb6aff16e705..64bea3000257839233053773f9b4b5750379ad6f 100644 (file)
@@ -29,7 +29,8 @@ class TestLegacyL3Agent(base.BaseFullStackTestCase):
     def setUp(self):
         host_descriptions = [environment.HostDescription(l3_agent=True)]
         env = environment.Environment(
-            environment.EnvironmentDescription(network_type='vlan'),
+            environment.EnvironmentDescription(
+                network_type='vlan', l2_pop=False),
             host_descriptions)
         super(TestLegacyL3Agent, self).setUp(env)
 
@@ -61,7 +62,8 @@ class TestHAL3Agent(base.BaseFullStackTestCase):
         host_descriptions = [
             environment.HostDescription(l3_agent=True) for _ in range(2)]
         env = environment.Environment(
-            environment.EnvironmentDescription(network_type='vxlan'),
+            environment.EnvironmentDescription(
+                network_type='vxlan', l2_pop=True),
             host_descriptions)
         super(TestHAL3Agent, self).setUp(env)