From e24852c480c9adb15c7efc4db283a159735ad92f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sat, 27 Feb 2021 20:53:33 -0500 Subject: [PATCH] Fix chained discovery of DWC SMMv2 SMMv2 for DWC has more ports. Make the code not care about which port is which for checking for matching smm fingerprints. --- confluent_server/confluent/discovery/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index ff1350cd..461ce8bb 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -814,10 +814,10 @@ def get_smm_neighbor_fingerprints(smmaddr, cv): neighs = wc.grab_json_response('/scripts/neighdata.json') if not neighs: return - for idx in (4, 5): - if 'sha256' not in neighs[idx]: + for neigh in neighs: + if 'sha256' not in neigh: continue - yield 'sha256$' + b64tohex(neighs[idx]['sha256']) + yield 'sha256$' + b64tohex(neigh['sha256']) def get_nodename(cfg, handler, info):