Remove unused methods
Converting hpp -> cpp determined that these functions were unused. Fix
them.
Tested: Code compiles.
Change-Id: Ifb712cb12085c187847666194b59caa959f37f83
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index 53fc598..6c84497 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -1392,28 +1392,6 @@
}
}
-inline void handleReportDelete(
- App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, std::string_view id)
-{
- if (!redfish::setUpRedfishRoute(app, req, asyncResp))
- {
- return;
- }
-
- const std::string reportPath = getDbusReportPath(id);
-
- dbus::utility::async_method_call(
- asyncResp,
- [asyncResp,
- reportId = std::string(id)](const boost::system::error_code& ec) {
- if (!formatMessageOnError(asyncResp->res, reportId, ec))
- {
- asyncResp->res.result(boost::beast::http::status::no_content);
- }
- },
- service, reportPath, "xyz.openbmc_project.Object.Delete", "Delete");
-}
} // namespace telemetry
inline void afterRetrieveUriToDbusMap(
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 92d9202..a7278a3 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -462,19 +462,6 @@
return objPath.str;
}
-inline void handleBmcNetworkProtocolHead(
- crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
-{
- if (!redfish::setUpRedfishRoute(app, req, asyncResp))
- {
- return;
- }
- asyncResp->res.addHeader(
- boost::beast::http::field::link,
- "</redfish/v1/JsonSchemas/ManagerNetworkProtocol/ManagerNetworkProtocol.json>; rel=describedby");
-}
-
inline void handleManagersNetworkProtocolPatch(
App& app, const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 090fb95..6a961f0 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -709,25 +709,6 @@
std::bind_front(handlePCIeFunctionCollectionGet, std::ref(app)));
}
-inline bool validatePCIeFunctionId(
- uint64_t pcieFunctionId,
- const dbus::utility::DBusPropertiesMap& pcieDevProperties)
-{
- std::string functionName = "Function" + std::to_string(pcieFunctionId);
- std::string devIDProperty = functionName + "DeviceId";
-
- const std::string* devIdProperty = nullptr;
- for (const auto& property : pcieDevProperties)
- {
- if (property.first == devIDProperty)
- {
- devIdProperty = std::get_if<std::string>(&property.second);
- break;
- }
- }
- return (devIdProperty != nullptr && !devIdProperty->empty());
-}
-
inline void addPCIeFunctionProperties(
crow::Response& resp, uint64_t pcieFunctionId,
const dbus::utility::DBusPropertiesMap& pcieDevProperties)
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 881c21a..be56cc9 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -194,17 +194,6 @@
asyncResp->res.jsonValue["Description"] = "Session Collection";
}
-inline void handleSessionCollectionMembersGet(
- crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
-{
- if (!redfish::setUpRedfishRoute(app, req, asyncResp))
- {
- return;
- }
- asyncResp->res.jsonValue = getSessionCollectionMembers();
-}
-
inline void processAfterSessionCreation(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const crow::Request& req, const std::string& username,
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index b064f23..19d04b1 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -62,64 +62,6 @@
protocolToDBusForSystems{
{{"SSH", "obmc-console-ssh"}, {"IPMI", "phosphor-ipmi-net"}}};
-/**
- * @brief Updates the Functional State of DIMMs
- *
- * @param[in] asyncResp Shared pointer for completing asynchronous calls
- * @param[in] dimmState Dimm's Functional state, true/false
- *
- * @return None.
- */
-inline void updateDimmProperties(
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, bool isDimmFunctional)
-{
- BMCWEB_LOG_DEBUG("Dimm Functional: {}", isDimmFunctional);
-
- // Set it as Enabled if at least one DIMM is functional
- // Update STATE only if previous State was DISABLED and current Dimm is
- // ENABLED.
- const nlohmann::json& prevMemSummary =
- asyncResp->res.jsonValue["MemorySummary"]["Status"]["State"];
- if (prevMemSummary == "Disabled")
- {
- if (isDimmFunctional)
- {
- asyncResp->res.jsonValue["MemorySummary"]["Status"]["State"] =
- "Enabled";
- }
- }
-}
-
-/*
- * @brief Update "ProcessorSummary" "Status" "State" based on
- * CPU Functional State
- *
- * @param[in] asyncResp Shared pointer for completing asynchronous calls
- * @param[in] cpuFunctionalState is CPU functional true/false
- *
- * @return None.
- */
-inline void modifyCpuFunctionalState(
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, bool isCpuFunctional)
-{
- BMCWEB_LOG_DEBUG("Cpu Functional: {}", isCpuFunctional);
-
- const nlohmann::json& prevProcState =
- asyncResp->res.jsonValue["ProcessorSummary"]["Status"]["State"];
-
- // Set it as Enabled if at least one CPU is functional
- // Update STATE only if previous State was Non_Functional and current CPU is
- // Functional.
- if (prevProcState == "Disabled")
- {
- if (isCpuFunctional)
- {
- asyncResp->res.jsonValue["ProcessorSummary"]["Status"]["State"] =
- "Enabled";
- }
- }
-}
-
/*
* @brief Update "ProcessorSummary" "Count" based on Cpu PresenceState
*