From 04b462712dc0541c44773b87529c38c144b40c88 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 11 Jan 2022 16:53:46 -0500 Subject: [PATCH] Tolerate redfish variations and fix loop Some redfish omit the trailing /, and the correct move on non-redfish is to continue to next candidate, not break. --- confluent_server/confluent/discovery/protocols/ssdp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/discovery/protocols/ssdp.py b/confluent_server/confluent/discovery/protocols/ssdp.py index ea925c03..65c662c7 100644 --- a/confluent_server/confluent/discovery/protocols/ssdp.py +++ b/confluent_server/confluent/discovery/protocols/ssdp.py @@ -358,8 +358,8 @@ def _find_service(service, target): querypool = gp.GreenPool() pooltargs = [] for nid in peerdata: - if '/redfish/v1/' not in peerdata[nid].get('urls', ()): - break + if '/redfish/v1/' not in peerdata[nid].get('urls', ()) and '/redfish/v1' not in peerdata[nid].get('urls', ()): + continue if '/DeviceDescription.json' in peerdata[nid]['urls']: pooltargs.append(('/DeviceDescription.json', peerdata[nid])) # For now, don't interrogate generic redfish bmcs