Show hypervisor path on GET of Systems collection
Redfish GET on `/redfish/v1/Systems` is missing to show the hypervisor
resource in its members list, even though hypervisor is available.
This commit fixes missing hypervisor resource in a GET response on
Systems collection. The `Members@odata.count` is retrieved as `uint64_t`
pointer. But the Json library might store this value as "int" or
"size_t". Therefore, directly casting it to uint64_t* might not work
as expected.
Tested By:
Verified "GET https://${bmc}/redfish/v1/Systems" returns the hypervisor
resource
Change-Id: If8713fc70663cf72cc555f695b8f4ec6547215a2
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 5d7dba1..93d4ef5 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -2817,7 +2817,7 @@
BMCWEB_LOG_CRITICAL("Count wasn't found??");
return;
}
- uint64_t* count = val->get_ptr<uint64_t*>();
+ int64_t* count = val->get_ptr<int64_t*>();
if (count == nullptr)
{
BMCWEB_LOG_CRITICAL("Count wasn't found??");