Merge "Add frr_sync function to other drivers"

This commit is contained in:
Zuul 2023-04-26 13:22:57 +00:00 committed by Gerrit Code Review
commit 9c7f8fc9f5
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 = {}