diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-DELETE-in-MetricReportDefinitions-st.patch')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-DELETE-in-MetricReportDefinitions-st.patch | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-DELETE-in-MetricReportDefinitions-st.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-DELETE-in-MetricReportDefinitions-st.patch deleted file mode 100644 index dee5a158b..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-DELETE-in-MetricReportDefinitions-st.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 5a1eef4a6c74c29d9b9026676e59e6cdf0a7e8bd Mon Sep 17 00:00:00 2001 -From: "Wludzik, Jozef" <jozef.wludzik@intel.com> -Date: Mon, 18 May 2020 12:40:15 +0200 -Subject: [PATCH 07/10] Add support for DELETE in MetricReportDefinitions/<str> - -Added support for DELETE action in MetricReportDefinitions/<str> -node. It allows user to remove MetricReportDefinition together -with MetricReport connected to it. - -Tested: - - Succesfully passed RedfishServiceValidator.py - - Validated DELETE action by removing exisiting - MetricReportDefinitions from MonitoringService - - Validated DELETE action with negative cases when - MetricReportDefinition does not exist - -Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> -Change-Id: Iffde9f7bbf2955376e9714ac8d833967bd25eaa3 - -%% original patch: 0003-Add-support-for-DELETE-in-MetricReportDefinitions-st.patch - -Change-Id: I2930b9354fd4cf1f8d9a97af33b81c7b689fe0ef ---- - redfish-core/lib/metric_report_definition.hpp | 32 +++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp -index c6b09f8..3191a8f 100644 ---- a/redfish-core/lib/metric_report_definition.hpp -+++ b/redfish-core/lib/metric_report_definition.hpp -@@ -531,6 +531,38 @@ class MetricReportDefinition : public Node - "xyz.openbmc_project.MonitoringService.Report"); - } - -+ void doDelete(crow::Response& res, const crow::Request&, -+ const std::vector<std::string>& params) override -+ { -+ auto asyncResp = std::make_shared<AsyncResp>(res); -+ if (params.size() != 1) -+ { -+ messages::internalError(asyncResp->res); -+ return; -+ } -+ -+ const std::string& id = params[0]; -+ telemetry::getReport(asyncResp, id, schemaType, deleteReport); -+ } -+ -+ static void deleteReport(const std::shared_ptr<AsyncResp>& asyncResp, -+ const std::string& path, const std::string&) -+ { -+ crow::connections::systemBus->async_method_call( -+ [asyncResp](const boost::system::error_code ec) { -+ if (ec) -+ { -+ BMCWEB_LOG_ERROR << "respHandler DBus error " << ec; -+ messages::internalError(asyncResp->res); -+ return; -+ } -+ -+ asyncResp->res.result(boost::beast::http::status::no_content); -+ }, -+ "xyz.openbmc_project.MonitoringService", path, -+ "xyz.openbmc_project.Object.Delete", "Delete"); -+ } -+ - public: - static constexpr const char* schemaType = - "#MetricReportDefinition.v1_3_0.MetricReportDefinition"; --- -2.16.6 - |