Add frr_sync function to other drivers

Added the FRR config function to OVNEVPNDriver and
OVNBGPStretchedL2Driver

Closes-Bug: #2017682

Change-Id: I0f604523254e7fb9d6f92be508a612ed05a7f486
This commit is contained in:
Luis Tomas Bolivar 2023-04-26 08:45:56 +02:00
parent a78a0ca724
commit 3b85a9a31b
2 changed files with 15 additions and 0 deletions

View File

@ -109,6 +109,13 @@ class OVNEVPNDriver(driver_api.AgentDriverBase):
"LocalnetCreateDeleteEvent"])
return events
@lockutils.synchronized('evpn')
def frr_sync(self):
# Note(ltomasbo): There is no need for resync on this as there is
# no base configuration to be made, but one added when subnets are
# exposed, so the sync action takes care of it
pass
@lockutils.synchronized('evpn')
def sync(self):
self.ovn_local_cr_lrps = {}

View File

@ -124,6 +124,14 @@ class OVNBGPStretchedL2Driver(driver_api.AgentDriverBase):
]
)
@lockutils.synchronized('bgp')
def frr_sync(self):
LOG.debug("Ensuring VRF configuration for advertising routes")
# Base BGP configuration
# Ensure FRR is configured to leak the routes
bgp_utils.ensure_base_bgp_configuration(
template=frr.LEAK_VRF_KERNEL_TEMPLATE)
@lockutils.synchronized("bgp")
def sync(self):
self.ovn_local_cr_lrps = {}