Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_dataplane(isFailed, fromNode, checkMultipath=True):
ips = bfq.ipOwners().answer().frame()
loopbacks = ips[(ips['Interface'] == 'Loopback0') & (ips['Active'])]
localIP = loopbacks[loopbacks['Node'] == fromNode]['IP'][0]
leaves = set(loopbacks[loopbacks['Node'].str.contains('leaf')]['IP'])
leaves.remove(localIP)
spines = set(loopbacks[loopbacks['Node'].str.contains('spine')]['IP'])
mpath = len(spines)
logging.info("Progress: Analyzing traceroute from Leaf-3 to Leaf-1 and Leaf-2")
# Set up the resulting data structure
troute = dict()
for leaf in leaves:
troute[leaf] = dict()
# Build headers for traceroute flows
for leaf in leaves: