Change how ovn mech driver checks if vlan transparency is supported

Previously ovn mech driver was supporting vlan transparency for all
types of networks.
But it's not that easy and for flat networks it doesn't work (at least
for now). So this patch changes the way how check_vlan_transparency()
method is implemented in ovn mech_driver.

Change-Id: Ie5357980f70e4853f320785258cbb6bb603cc104
This commit is contained in:
Slawek Kaplonski
2021-01-12 14:43:08 +01:00
parent 588be19298
commit cb336541ee

View File

@@ -23,6 +23,7 @@ import types
import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net
from neutron_lib.api.definitions import segment as segment_def
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
@@ -155,7 +156,14 @@ class OVNMechanismDriver(api.MechanismDriver):
def check_vlan_transparency(self, context):
"""OVN driver vlan transparency support."""
return True
vlan_transparency_network_types = [
const.TYPE_LOCAL,
const.TYPE_GENEVE,
const.TYPE_VXLAN,
const.TYPE_VLAN
]
return (context.current.get(provider_net.NETWORK_TYPE)
in vlan_transparency_network_types)
def _setup_vif_port_bindings(self):
self.supported_vnic_types = [portbindings.VNIC_NORMAL,