fix processor summary
update processor summary to use cpu property correctly.
Tested:
1. Verified redfish validator passed
2. Get cpu details from Redfish
GET: https://<BMC-IP>/redfish/v1/Systems/system/Processors
{
"@odata.id": "/redfish/v1/Systems/system/Processors/",
"@odata.type": "#ProcessorCollection.ProcessorCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu0"
}
],
"Members@odata.count": 1,
"Name": "Processor Collection"
}
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: I1f36118cdc80aabf05f2d678afc6ffc329d07872
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index da92be3..0788e84 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -326,7 +326,7 @@
if (properties.size() > 0)
{
- const uint32_t* processorId = nullptr;
+ const uint64_t* processorId = nullptr;
const std::string* procFamily = nullptr;
nlohmann::json& procSummary =
aResp->res.jsonValue["ProcessorSumm"
@@ -345,18 +345,17 @@
for (const auto& property : properties)
{
- if (property.first == "ProcessorId")
+ if (property.first == "Id")
{
processorId =
- std::get_if<uint32_t>(
+ std::get_if<uint64_t>(
&property.second);
if (nullptr != procFamily)
break;
continue;
}
- if (property.first ==
- "ProcessorFamily")
+ if (property.first == "Family")
{
procFamily =
std::get_if<std::string>(