]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Allow vlan type usage for OpenDaylight ml2
authorSam Hague <shague@redhat.com>
Fri, 2 May 2014 18:08:09 +0000 (14:08 -0400)
committerSam Hague <shague@gmail.com>
Mon, 19 May 2014 18:38:15 +0000 (18:38 +0000)
The initial OpenDaylight integration with Openstack did not support
vlan isolation so it was not included as a valid type. This change
adds the vlan type as allowed.

Also modified tests to include vlan as supported in the
check_segment().

DocImpact:
Use of VLANs with ML2 and the OpenDaylight mechanism driver
requires OpenDaylight Helium or newer to be installed.

Closes-Bug: #1315475
Change-Id: I52e3c9bfdc93b8786c58954beca105e7498e3f40

neutron/plugins/ml2/drivers/mechanism_odl.py
neutron/tests/unit/ml2/test_mechanism_odl.py

index d4e92334f1d2b2425889a98020e0c8ab3618492c..416e870d1ed6988f559e97fcf410081db9463be9 100644 (file)
@@ -371,4 +371,4 @@ class OpenDaylightMechanismDriver(api.MechanismDriver):
         """
         network_type = segment[api.NETWORK_TYPE]
         return network_type in [constants.TYPE_LOCAL, constants.TYPE_GRE,
-                                constants.TYPE_VXLAN]
+                                constants.TYPE_VXLAN, constants.TYPE_VLAN]
index 5b58c4f6de72c280431d5204e451a62d1425a285..472387c209ae22100068252182732e9b90df2931 100644 (file)
@@ -57,7 +57,7 @@ class OpenDaylightTestCase(test_plugin.NeutronDbPluginV2TestCase):
         self.segment[api.NETWORK_TYPE] = constants.TYPE_FLAT
         self.assertFalse(self.mech.check_segment(self.segment))
         self.segment[api.NETWORK_TYPE] = constants.TYPE_VLAN
-        self.assertFalse(self.mech.check_segment(self.segment))
+        self.assertTrue(self.mech.check_segment(self.segment))
         self.segment[api.NETWORK_TYPE] = constants.TYPE_GRE
         self.assertTrue(self.mech.check_segment(self.segment))
         self.segment[api.NETWORK_TYPE] = constants.TYPE_VXLAN