summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/systems.hpp92
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);