diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2024-04-01 23:25:51 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-04-02 02:58:57 +0300 |
commit | 51bd2d8a8b9d73d4e86981c0d68056aa9e2c76b2 (patch) | |
tree | a19696e6447200311a0cc7092ab6b7b550d771cb /redfish-core | |
parent | 1873a04f43bb414408d1da9a5a775c05474603d2 (diff) | |
download | bmcweb-51bd2d8a8b9d73d4e86981c0d68056aa9e2c76b2.tar.xz |
Remove redfish-enable-proccessor-memory-status
The redfish-enable-proccessor-memory-status option was scheduled to be
removed in 1Q 2024. It is now 2Q, so remove the option. No upstream
layers enabled it and I could not find a downstream layer that did
either.
Redfish deprecated the Processor/Memory Summary Status (state, health,
healthrollup) attributes.
Discussion on discord, when disabling:
[1]: https://discord.com/channels/775381525260664832/855566794994221117/1093939076710793296
Commit disabling this (merged 10 months ago):
[2]: https://github.com/openbmc/bmcweb/commit/5fd0aafb0f14fb3011970e8575647bb608688c7c
Tested: Code builds.
Change-Id: I539cd5f384633afa7badf1cecfc6c7a87062f672
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'redfish-core')
-rw-r--r-- | redfish-core/lib/systems.hpp | 92 |
1 files changed, 4 insertions, 88 deletions
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp index 87b413b96b..272a24b65a 100644 --- a/redfish-core/lib/systems.hpp +++ b/redfish-core/lib/systems.hpp @@ -210,26 +210,6 @@ inline void "xyz.openbmc_project.Inventory.Item", "Present", std::move(getCpuPresenceState)); - if constexpr (bmcwebEnableProcMemStatus) - { - auto getCpuFunctionalState = - [asyncResp](const boost::system::error_code& ec3, - const bool cpuFunctionalCheck) { - if (ec3) - { - BMCWEB_LOG_ERROR("DBUS response error {}", ec3); - return; - } - modifyCpuFunctionalState(asyncResp, cpuFunctionalCheck); - }; - - // Get the Functional State - sdbusplus::asio::getProperty<bool>( - *crow::connections::systemBus, service, path, - "xyz.openbmc_project.State.Decorator.OperationalStatus", - "Functional", std::move(getCpuFunctionalState)); - } - sdbusplus::asio::getAllProperties( *crow::connections::systemBus, service, path, "xyz.openbmc_project.Inventory.Item.Cpu", @@ -250,39 +230,18 @@ inline void * @brief processMemoryProperties fields * * @param[in] asyncResp Shared pointer for completing asynchronous calls - * @param[in] service dbus service for memory Information - * @param[in] path dbus path for Memory * @param[in] DBUS properties for memory * * @return None. */ inline void processMemoryProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, - [[maybe_unused]] const std::string& service, - [[maybe_unused]] const std::string& path, const dbus::utility::DBusPropertiesMap& properties) { BMCWEB_LOG_DEBUG("Got {} Dimm properties.", properties.size()); if (properties.empty()) { - if constexpr (bmcwebEnableProcMemStatus) - { - sdbusplus::asio::getProperty<bool>( - *crow::connections::systemBus, service, path, - "xyz.openbmc_project.State." - "Decorator.OperationalStatus", - "Functional", - [asyncResp](const boost::system::error_code& ec3, - bool dimmState) { - if (ec3) - { - BMCWEB_LOG_ERROR("DBUS response error {}", ec3); - return; - } - updateDimmProperties(asyncResp, dimmState); - }); - } return; } @@ -314,11 +273,6 @@ inline void static_cast<double>(*memorySizeInKB) / (1024 * 1024) + *preValue; } - if constexpr (bmcwebEnableProcMemStatus) - { - asyncResp->res.jsonValue["MemorySummary"]["Status"]["State"] = - "Enabled"; - } } } @@ -347,7 +301,7 @@ inline void messages::internalError(asyncResp->res); return; } - processMemoryProperties(asyncResp, service, path, properties); + processMemoryProperties(asyncResp, properties); }); } @@ -466,7 +420,6 @@ inline void inline void afterSystemGetSubTree( const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, - const std::shared_ptr<HealthPopulate>& systemHealth, const boost::system::error_code& ec, const dbus::utility::MapperGetSubTreeResponse& subtree) { @@ -491,24 +444,6 @@ inline void afterSystemGetSubTree( continue; } - std::shared_ptr<HealthPopulate> memoryHealth = nullptr; - std::shared_ptr<HealthPopulate> cpuHealth = nullptr; - - if constexpr (bmcwebEnableProcMemStatus) - { - memoryHealth = std::make_shared<HealthPopulate>( - asyncResp, "/MemorySummary/Status"_json_pointer); - systemHealth->children.emplace_back(memoryHealth); - - if constexpr (bmcwebEnableHealthPopulate) - { - cpuHealth = std::make_shared<HealthPopulate>( - asyncResp, "/ProcessorSummary/Status"_json_pointer); - - systemHealth->children.emplace_back(cpuHealth); - } - } - // This is not system, so check if it's cpu, dimm, UUID or // BiosVer for (const auto& connection : connectionNames) @@ -520,11 +455,6 @@ inline void afterSystemGetSubTree( BMCWEB_LOG_DEBUG("Found Dimm, now get its properties."); getMemorySummary(asyncResp, connection.first, path); - - if constexpr (bmcwebEnableProcMemStatus) - { - memoryHealth->inventory.emplace_back(path); - } } else if (interfaceName == "xyz.openbmc_project.Inventory.Item.Cpu") @@ -532,11 +462,6 @@ inline void afterSystemGetSubTree( BMCWEB_LOG_DEBUG("Found Cpu, now get its properties."); getProcessorSummary(asyncResp, connection.first, path); - - if constexpr (bmcwebEnableProcMemStatus) - { - cpuHealth->inventory.emplace_back(path); - } } else if (interfaceName == "xyz.openbmc_project.Common.UUID") { @@ -579,13 +504,11 @@ inline void afterSystemGetSubTree( * @brief Retrieves computer system properties over dbus * * @param[in] asyncResp Shared pointer for completing asynchronous calls - * @param[in] systemHealth Shared HealthPopulate pointer * * @return None. */ inline void - getComputerSystem(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, - const std::shared_ptr<HealthPopulate>& systemHealth) + getComputerSystem(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { BMCWEB_LOG_DEBUG("Get available system components."); constexpr std::array<std::string_view, 5> interfaces = { @@ -597,7 +520,7 @@ inline void }; dbus::utility::getSubTree( "/xyz/openbmc_project/inventory", 0, interfaces, - std::bind_front(afterSystemGetSubTree, asyncResp, systemHealth)); + std::bind_front(afterSystemGetSubTree, asyncResp)); } /** @@ -3253,13 +3176,6 @@ inline void asyncResp->res.jsonValue["SystemType"] = "Physical"; asyncResp->res.jsonValue["Description"] = "Computer System"; asyncResp->res.jsonValue["ProcessorSummary"]["Count"] = 0; - if constexpr (bmcwebEnableProcMemStatus) - { - asyncResp->res.jsonValue["ProcessorSummary"]["Status"]["State"] = - "Disabled"; - asyncResp->res.jsonValue["MemorySummary"]["Status"]["State"] = - "Disabled"; - } asyncResp->res.jsonValue["MemorySummary"]["TotalSystemMemoryGiB"] = double(0); asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system"; @@ -3348,7 +3264,7 @@ inline void getSystemLocationIndicatorActive(asyncResp); // TODO (Gunnar): Remove IndicatorLED after enough time has passed getIndicatorLedState(asyncResp); - getComputerSystem(asyncResp, health); + getComputerSystem(asyncResp); getHostState(asyncResp); getBootProperties(asyncResp); getBootProgress(asyncResp); |