summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhikui Ren <zhikui.ren@intel.com>2020-09-10 21:13:14 +0300
committerZhikui Ren <zhikui.ren@intel.com>2020-09-10 21:35:37 +0300
commit9cf21522554fb4db984ea3291bb512c9737b0a0d (patch)
treef5e45b4a85b1731738161a59878f2ab0c807ba81
parent7c486a180c492d5f0080ad59ad44b0b59787ac31 (diff)
downloadbmcweb-9cf21522554fb4db984ea3291bb512c9737b0a0d.tar.xz
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
-rw-r--r--redfish-core/lib/systems.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index da92be3fca..0788e84661 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -326,7 +326,7 @@ inline void getComputerSystem(std::shared_ptr<AsyncResp> aResp,
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 @@ inline void getComputerSystem(std::shared_ptr<AsyncResp> aResp,
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>(