Check for the existence of LCP config statements, and if so, require linux-cp or lcpng plugins are enabled in VPP

This commit is contained in:
Pim van Pelt
2022-04-02 20:16:51 +00:00
parent 240fcebbcf
commit f786a00e9a
3 changed files with 65 additions and 18 deletions

View File

@ -36,6 +36,13 @@ class Reconciler():
def __del__(self):
self.vpp.disconnect()
def lcps_exist_with_lcp_enabled(self):
""" Returns False if there are LCPs defined in the configuration, but LinuxCP
functionality is not enabled in VPP. """
if not lcp.get_lcps(self.cfg):
return True
return self.vpp.lcp_enabled
def phys_exist_in_vpp(self):
""" Return True if all PHYs in the config exist as physical interface names
in VPP. Return False otherwise."""