summaryrefslogtreecommitdiff
path: root/redfish-core/lib
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2020-02-13 22:19:43 +0300
committerGunnar Mills <gmills@us.ibm.com>2020-02-13 22:36:42 +0300
commitf9dcc11cc7f71426078fece76e5fb8eef0eec430 (patch)
treefa91d1401297a4a95e0197008eeb63190940bf40 /redfish-core/lib
parent09b9d45e5426631ff38a5665c652eb9e76643706 (diff)
downloadbmcweb-f9dcc11cc7f71426078fece76e5fb8eef0eec430.tar.xz
Redfish: Processor: Add new 2019.4 properties
In 2019.4 was a new 1.7.0 Processor schema that included PartNumber, SerialNumber, and Version. Tested: Ran validator. curl -k https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 { "@odata.context": "/redfish/v1/$metadata#Processor.Processor", "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0", "@odata.type": "#Processor.v1_7_0.Processor", "Id": "cpu0", "InstructionSet": "PowerISA", "Manufacturer": "IBM", "Model": "", "Name": "Processor", "PartNumber": "02CY102", "ProcessorArchitecture": "Power", "ProcessorType": "CPU", "SerialNumber": "YA1934292547", "Status": { "Health": "OK", "State": "Enabled" }, "TotalCores": 18, "Version": "22" } Change-Id: I6ad02eacf77640965d126a9db6c51cdfdb691978 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'redfish-core/lib')
-rw-r--r--redfish-core/lib/cpudimm.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/redfish-core/lib/cpudimm.hpp b/redfish-core/lib/cpudimm.hpp
index ce36a0b9e5..b31a2f1542 100644
--- a/redfish-core/lib/cpudimm.hpp
+++ b/redfish-core/lib/cpudimm.hpp
@@ -139,6 +139,18 @@ void getCpuDataByInterface(std::shared_ptr<AsyncResp> aResp,
aResp->res.jsonValue["Model"] = *value;
}
}
+ else if (property.first == "PartNumber")
+ {
+ aResp->res.jsonValue["PartNumber"] = property.second;
+ }
+ else if (property.first == "SerialNumber")
+ {
+ aResp->res.jsonValue["SerialNumber"] = property.second;
+ }
+ else if (property.first == "Version")
+ {
+ aResp->res.jsonValue["Version"] = property.second;
+ }
else if (property.first == "Present")
{
present = std::get_if<bool>(&property.second);
@@ -560,7 +572,7 @@ class Processor : public Node
return;
}
const std::string &processorId = params[0];
- res.jsonValue["@odata.type"] = "#Processor.v1_3_1.Processor";
+ res.jsonValue["@odata.type"] = "#Processor.v1_7_0.Processor";
res.jsonValue["@odata.context"] =
"/redfish/v1/$metadata#Processor.Processor";
res.jsonValue["@odata.id"] =