Add redfish-oem-manager-fan-data option
IBM doesn't use the Redfish OEM fan data in OemManager.
IBM does not use phosphor-pid-control instead using
phosphor-fan-presence and such.
This is data such as PidControllers, StepwiseControllers, FanZones,
FanControllers, and Profile.
This has been in bmcweb since Oct 2018 so defaulting this flag to
enabled to not break anyone.
Why we want a flag:
1) Have observed 500 errors with getting the thermalMode.
"Jan 24 16:34:57 rain534 bmcweb[435]: (2022-01-24 16:34:57) [ERROR
"managers.hpp":1196] GetPIDValues: Can't get thermalModeIface
/xyz/openbmc_project/control/thermal/0"
2) This Redfish OEM fan data includes PATCHing.
Commit turning this off in meta-ibm:
https://gerrit.openbmc.org/c/openbmc/openbmc/+/56327
Tested: With this flag enabled and disabled.
Manager resource looks as expected.
Before on a dummy PATCH to this:
curl -k -X PATCH https://$bmc/redfish/v1/Managers/bmc -d \
'{"Oem":{"OpenBmc":{"Fan":{"Profile":"Acoustic"}}}}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request failed due to an internal service...
With this change and the meta-ibm change (instead see a PropertyUnknown)
curl -k -X PATCH https://$bmc/redfish/v1/Managers/bmc -d \
'{"Oem":{"OpenBmc":{"Fan":{"Profile" : "Acoustic"} }}}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The property %1 is not in the list of valid...
"MessageArgs": [
"Oem"
],
"MessageId": "Base.1.13.0.PropertyUnknown",
PATCHed the DateTime with this enabled.
Change-Id: I374292ca2798e096b18d49df5bbc7a93c7f1c400
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index d1e43fb..dcd7876 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -2063,8 +2063,10 @@
managerDiagnosticData["@odata.id"] =
"/redfish/v1/Managers/bmc/ManagerDiagnosticData";
+#ifdef BMCWEB_ENABLE_REDFISH_OEM_MANAGER_FAN_DATA
auto pids = std::make_shared<GetPIDValues>(asyncResp);
pids->run();
+#endif
getMainChassisId(asyncResp,
[](const std::string& chassisId,
@@ -2215,6 +2217,7 @@
if (oem)
{
+#ifdef BMCWEB_ENABLE_REDFISH_OEM_MANAGER_FAN_DATA
std::optional<nlohmann::json> openbmc;
if (!redfish::json_util::readJson(*oem, asyncResp->res, "OpenBmc",
openbmc))
@@ -2244,6 +2247,10 @@
pid->run();
}
}
+#else
+ messages::propertyUnknown(asyncResp->res, "Oem");
+ return;
+#endif
}
if (links)
{