summaryrefslogtreecommitdiff
path: root/redfish-core/lib/log_services.hpp
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2021-03-30 01:33:15 +0300
committerEd Tanous <ed@tanous.net>2021-04-03 00:31:35 +0300
commit8401529e4fb52caa1725caaa4777536f541d10e8 (patch)
tree7fcae44884c45ed68a9917872068e7f173d8b26b /redfish-core/lib/log_services.hpp
parent400fd1fb4020028ad58b1cfd965f26d21f63b8c8 (diff)
downloadbmcweb-8401529e4fb52caa1725caaa4777536f541d10e8.tar.xz
log_services: Remove raw PECI command
The raw PECI command is recommended not to include in a standard build, so removing it from the bmcweb to avoid accidental inclusion. Tested: Confirmed that the raw PECI command is gone. Change-Id: I2b52e0ede089da6df6ca3ad304194de8af27b709 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'redfish-core/lib/log_services.hpp')
-rw-r--r--redfish-core/lib/log_services.hpp82
1 files changed, 0 insertions, 82 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 2a52830097..7614ec05d7 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -47,8 +47,6 @@ constexpr char const* deleteAllInterface =
"xyz.openbmc_project.Collection.DeleteAll";
constexpr char const* crashdumpOnDemandInterface =
"com.intel.crashdump.OnDemand";
-constexpr char const* crashdumpRawPECIInterface =
- "com.intel.crashdump.SendRawPeci";
constexpr char const* crashdumpTelemetryInterface =
"com.intel.crashdump.Telemetry";
@@ -2601,13 +2599,6 @@ class CrashdumpService : public Node
{"#LogService.CollectDiagnosticData",
{{"target", "/redfish/v1/Systems/system/LogServices/Crashdump/"
"Actions/LogService.CollectDiagnosticData"}}}};
-
-#ifdef BMCWEB_ENABLE_REDFISH_RAW_PECI
- asyncResp->res.jsonValue["Actions"]["Oem"] = {
- {"#Crashdump.SendRawPeci",
- {{"target", "/redfish/v1/Systems/system/LogServices/Crashdump/"
- "Actions/Oem/Crashdump.SendRawPeci"}}}};
-#endif
}
};
@@ -3037,79 +3028,6 @@ class CrashdumpCollect : public Node
}
};
-class SendRawPECI : public Node
-{
- public:
- SendRawPECI(App& app) :
- Node(app,
- "/redfish/v1/Systems/system/LogServices/Crashdump/Actions/Oem/"
- "Crashdump.SendRawPeci/")
- {
- // Note: Deviated from redfish privilege registry for GET & HEAD
- // method for security reasons.
- entityPrivileges = {
- {boost::beast::http::verb::get, {{"ConfigureComponents"}}},
- {boost::beast::http::verb::head, {{"ConfigureComponents"}}},
- {boost::beast::http::verb::patch, {{"ConfigureComponents"}}},
- {boost::beast::http::verb::put, {{"ConfigureComponents"}}},
- {boost::beast::http::verb::delete_, {{"ConfigureComponents"}}},
- {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
- }
-
- private:
- void doPost(crow::Response& res, const crow::Request& req,
- const std::vector<std::string>&) override
- {
- std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
- std::vector<std::vector<uint8_t>> peciCommands;
-
- if (!json_util::readJson(req, res, "PECICommands", peciCommands))
- {
- return;
- }
- uint32_t idx = 0;
- for (auto const& cmd : peciCommands)
- {
- if (cmd.size() < 3)
- {
- std::string s("[");
- for (auto const& val : cmd)
- {
- if (val != *cmd.begin())
- {
- s += ",";
- }
- s += std::to_string(val);
- }
- s += "]";
- messages::actionParameterValueFormatError(
- res, s, "PECICommands[" + std::to_string(idx) + "]",
- "SendRawPeci");
- return;
- }
- idx++;
- }
- // Callback to return the Raw PECI response
- auto sendRawPECICallback =
- [asyncResp](const boost::system::error_code ec,
- const std::vector<std::vector<uint8_t>>& resp) {
- if (ec)
- {
- BMCWEB_LOG_DEBUG << "failed to process PECI commands ec: "
- << ec.message();
- messages::internalError(asyncResp->res);
- return;
- }
- asyncResp->res.jsonValue = {{"Name", "PECI Command Response"},
- {"PECIResponse", resp}};
- };
- // Call the SendRawPECI command with the provided data
- crow::connections::systemBus->async_method_call(
- std::move(sendRawPECICallback), crashdumpObject, crashdumpPath,
- crashdumpRawPECIInterface, "SendRawPeci", peciCommands);
- }
-};
-
/**
* DBusLogServiceActionsClear class supports POST method for ClearLog action.
*/