Assert that all PHYs in the config also exist in VPP
This commit is contained in:
7
vppcfg
7
vppcfg
@ -57,9 +57,16 @@ def main():
|
||||
logging.error("Configuration is not valid, bailing")
|
||||
sys.exit(-2)
|
||||
|
||||
config_phys = validator.get_phys(cfg)
|
||||
vpp = VPPApi()
|
||||
vpp.readconfig()
|
||||
if not vpp.phys_exist(config_phys):
|
||||
logging.error("Not all PHYs in the config exist in VPP")
|
||||
vpp.disconnect()
|
||||
sys.exit(-3)
|
||||
|
||||
vpp.dump()
|
||||
|
||||
vpp.disconnect()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user