Update createDump to accept additional parameters
Updating create dump implementation to match the change
in the interface to accept the additional parameters.
Testing:
Created BMC dump
Created system dump
Dbus changes associated with this:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/37355
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I1402a9c4c8e0e5c6277055d835f7d024673831d8
diff --git a/dump-extensions/openpower-dumps/dump_manager_system.cpp b/dump-extensions/openpower-dumps/dump_manager_system.cpp
index 3f9d973..5d5890d 100644
--- a/dump-extensions/openpower-dumps/dump_manager_system.cpp
+++ b/dump-extensions/openpower-dumps/dump_manager_system.cpp
@@ -73,12 +73,19 @@
return;
}
-sdbusplus::message::object_path Manager::createDump()
+sdbusplus::message::object_path
+ Manager::createDump(std::map<std::string, std::string> params)
{
constexpr auto SYSTEMD_SERVICE = "org.freedesktop.systemd1";
constexpr auto SYSTEMD_OBJ_PATH = "/org/freedesktop/systemd1";
constexpr auto SYSTEMD_INTERFACE = "org.freedesktop.systemd1.Manager";
constexpr auto DIAG_MOD_TARGET = "obmc-host-diagnostic-mode@0.target";
+
+ if (!params.empty())
+ {
+ log<level::WARNING>("System dump accepts no additional parameters");
+ }
+
auto b = sdbusplus::bus::new_default();
auto method = bus.new_method_call(SYSTEMD_SERVICE, SYSTEMD_OBJ_PATH,
SYSTEMD_INTERFACE, "StartUnit");
diff --git a/dump-extensions/openpower-dumps/dump_manager_system.hpp b/dump-extensions/openpower-dumps/dump_manager_system.hpp
index 126bb59..3c1c9ae 100644
--- a/dump-extensions/openpower-dumps/dump_manager_system.hpp
+++ b/dump-extensions/openpower-dumps/dump_manager_system.hpp
@@ -69,7 +69,8 @@
*
* @return object_path - The path to the new dump entry.
*/
- sdbusplus::message::object_path createDump() override;
+ sdbusplus::message::object_path
+ createDump(std::map<std::string, std::string> params) override;
};
} // namespace system
diff --git a/dump_manager_bmc.cpp b/dump_manager_bmc.cpp
index 0236e46..aef7a3e 100644
--- a/dump_manager_bmc.cpp
+++ b/dump_manager_bmc.cpp
@@ -35,8 +35,13 @@
} // namespace internal
-sdbusplus::message::object_path Manager::createDump()
+sdbusplus::message::object_path
+ Manager::createDump(std::map<std::string, std::string> params)
{
+ if (!params.empty())
+ {
+ log<level::WARNING>("BMC dump accepts no additional parameters");
+ }
std::vector<std::string> paths;
auto id = captureDump(Type::UserRequested, paths);
diff --git a/dump_manager_bmc.hpp b/dump_manager_bmc.hpp
index 79a7bc7..24cfd0c 100644
--- a/dump_manager_bmc.hpp
+++ b/dump_manager_bmc.hpp
@@ -94,7 +94,8 @@
*
* @return object_path - The object path of the new dump entry.
*/
- sdbusplus::message::object_path createDump() override;
+ sdbusplus::message::object_path
+ createDump(std::map<std::string, std::string> params) override;
private:
/** @brief Create Dump entry d-bus object