Allow vppapi!=vppstats count, continue and use those interfaces that are in the API

This commit is contained in:
Pim van Pelt
2022-07-10 20:49:44 +00:00
parent b4c819af87
commit 16c29e0ce6

View File

@ -122,8 +122,7 @@ class MyAgent(agentx.Agent):
self.logger.debug("Retrieved Interfaces: vppapi=%d vppstats=%d lcp=%d" % (num_ifaces, num_vppstat, num_lcp)) self.logger.debug("Retrieved Interfaces: vppapi=%d vppstats=%d lcp=%d" % (num_ifaces, num_vppstat, num_lcp))
if num_ifaces != num_vppstat: if num_ifaces != num_vppstat:
self.logger.error("Interfaces count mismatch: vppapi=%d vppstats=%d" % (num_ifaces, num_vppstat)) self.logger.warning("Interfaces count mismatch: vppapi=%d vppstats=%d" % (num_ifaces, num_vppstat))
return False
for i in range(len(vppstat['/if/names'])): for i in range(len(vppstat['/if/names'])):
ifname = vppstat['/if/names'][i] ifname = vppstat['/if/names'][i]