diff options
Diffstat (limited to 'meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0007-Add-critical-thresholds-to-redfish.patch')
-rw-r--r-- | meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0007-Add-critical-thresholds-to-redfish.patch | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0007-Add-critical-thresholds-to-redfish.patch b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0007-Add-critical-thresholds-to-redfish.patch index 7f17907cd8..56f6e40644 100644 --- a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0007-Add-critical-thresholds-to-redfish.patch +++ b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0007-Add-critical-thresholds-to-redfish.patch @@ -1,6 +1,6 @@ -From 769c987c73a51ea376ffc814db909a0d9ae7d1cd Mon Sep 17 00:00:00 2001 +From e147e3a45d7985b2f7c3393a6216288687cf5496 Mon Sep 17 00:00:00 2001 From: "Evgeny Alekseev (IBS Group)" <ealekseev@ibs.sila.ru> -Date: Fri, 12 Aug 2022 15:29:40 +0300 +Date: Tue, 6 Sep 2022 15:08:39 +0300 Subject: [PATCH] Add critical thresholds to redfish --- @@ -8,17 +8,17 @@ Subject: [PATCH] Add critical thresholds to redfish 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp -index 1601e8ed..5a0efecf 100644 +index 1c636f20..f7d6bc3b 100644 --- a/redfish-core/lib/sensors.hpp +++ b/redfish-core/lib/sensors.hpp -@@ -2924,9 +2924,11 @@ inline void setSensorsWarning( +@@ -2876,9 +2876,11 @@ inline void setSensorsWarning( std::unordered_map<std::string, std::tuple<double, std::string, std::string>> overrideMap; std::string memberId; std::string thresholdName; - static const std::unordered_map<std::string, std::string> validThresholdNames = - {{std::string {"LowerThresholdNonCritical"},std::string {"WarningLow"}}, - {std::string {"UpperThresholdNonCritical"},std::string {"WarningHigh"}}}; -+ static const std::unordered_map<std::string, std::tuple<std::string, std::string>> validThresholdNames = ++ static const std::unordered_map<std::string, std::tuple<std::string, std::string>> validThresholdNames = + {{std::string {"LowerThresholdNonCritical"},std::make_tuple(std::string("WarningLow"), std::string("xyz.openbmc_project.Sensor.Threshold.Warning"))}, + {std::string {"UpperThresholdNonCritical"},std::make_tuple(std::string("WarningHigh"), std::string("xyz.openbmc_project.Sensor.Threshold.Warning"))}, + {std::string {"LowerThresholdCritical"},std::make_tuple(std::string("CriticalLow"), std::string("xyz.openbmc_project.Sensor.Threshold.Critical"))}, @@ -26,19 +26,19 @@ index 1601e8ed..5a0efecf 100644 double value = 0.0; for (auto& collectionItems : allCollections) { -@@ -2936,6 +2938,11 @@ inline void setSensorsWarning( - for(auto const &elem: validThresholdNames) +@@ -2888,6 +2890,11 @@ inline void setSensorsWarning( { if(item.contains(elem.first))propertyValueName = elem.first.c_str(); -+ } + } + if(!propertyValueName) + { -+ messages::actionParameterMissing(sensorAsyncResp->asyncResp->res, collectionItems.first, "Threshold"); ++ messages::actionParameterMissing(sensorAsyncResp->asyncResp->res, collectionItems.first, "Threshold"); + return; - } ++ } if (!json_util::readJson(item, sensorAsyncResp->asyncResp->res, "MemberId", memberId, propertyValueName, -@@ -3013,7 +3020,7 @@ inline void setSensorsWarning( + value)) +@@ -2964,7 +2971,7 @@ inline void setSensorsWarning( messages::internalError(sensorAsyncResp->asyncResp->res); return; } @@ -47,7 +47,7 @@ index 1601e8ed..5a0efecf 100644 crow::connections::systemBus->async_method_call( [sensorAsyncResp](const boost::system::error_code ec) { -@@ -3037,7 +3044,7 @@ inline void setSensorsWarning( +@@ -2988,7 +2995,7 @@ inline void setSensorsWarning( } }, item.second, item.first, "org.freedesktop.DBus.Properties", @@ -56,3 +56,6 @@ index 1601e8ed..5a0efecf 100644 dbus::utility::DbusVariantType(std::get<0>(iterator->second))); } }; +-- +2.35.1 + |