Allow vlan type usage for OpenDaylight ml2

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
This commit is contained in:
Sam Hague 2014-05-02 14:08:09 -04:00 committed by Sam Hague
parent bdb167393c
commit 3758f25c3c
2 changed files with 2 additions and 2 deletions

View 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]

View 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