Filter supported extension for OVN mech driver

OVN mechanism driver has support for  a defined set of ML2 API
extensions. When the ML2Plugin is loaded, the OVN mechanism driver
will return, from the loaded plugin extensions, only the supported
subset.

Change-Id: Id23aa1c107504d47b08007752159b07f089c3090
Related-Bug: #1888829
This commit is contained in:
Rodolfo Alonso Hernandez 2020-07-29 16:31:36 +00:00
parent 0b4d6fe4ab
commit ebb866310b
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@ from ovsdbapp.backend.ovs_idl import idlutils
from neutron._i18n import _
from neutron.common.ovn import acl as ovn_acl
from neutron.common.ovn import constants as ovn_const
from neutron.common.ovn import extensions as ovn_extensions
from neutron.common.ovn import utils as ovn_utils
from neutron.common import utils as n_utils
from neutron.conf.plugins.ml2.drivers.ovn import ovn_conf
@ -170,6 +171,9 @@ class OVNMechanismDriver(api.MechanismDriver):
portbindings.CONNECTIVITY_L2,
}
def supported_extensions(self, extensions):
return set(ovn_extensions.ML2_SUPPORTED_API_EXTENSIONS) & extensions
def subscribe(self):
registry.subscribe(self.pre_fork_initialize,
resources.PROCESS,