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>
diff --git a/redfish-core/lib/cpudimm.hpp b/redfish-core/lib/cpudimm.hpp
index ce36a0b..b31a2f1 100644
--- a/redfish-core/lib/cpudimm.hpp
+++ b/redfish-core/lib/cpudimm.hpp
@@ -139,6 +139,18 @@
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 @@
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"] =