Skip to content

Commit dfbd232

Browse files
authored
Merge pull request #203 from DMTF/Fix197-ServiceIdentification
Added support for showing ServiceIdentification in the output of 'rf_discover.py'
2 parents 76872c0 + 64d5042 commit dfbd232

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/rf_discover.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@
3838
groups = re.search(r"^(.+)\/redfish\/v1\/?$", services[service])
3939
url = groups.group(1)
4040
redfish_obj = redfish.redfish_client(base_url=url, timeout=15, max_retry=3)
41-
print("{}: {} ({})".format(service, services[service], redfish_obj.root["Product"]))
41+
print(
42+
"{}: {} ({}, {})".format(
43+
service,
44+
services[service],
45+
redfish_obj.root.get("Product", "N/A"),
46+
redfish_obj.root.get("ServiceIdentification", "N/A"),
47+
)
48+
)
4249
except Exception:
4350
print("{}: {}".format(service, services[service]))
4451

0 commit comments

Comments
 (0)