Redfish: BMC dump logEntry service implementation
This commit supports adding a BMC dump entry under /redfish/
v1/Managers/bmc/LogServices/Dump
* Removed the option for enabling each dump separately. Instead
introduced one common option to enable dump.
* Defined few methods that are common for both BMC and System dumps.
* Compilation flag DBMCWEB_ENABLE_REDFISH_DUMP_LOG must be enabled.
Tested-By:
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump/Entries
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump/Entries/<dump-id>
* curl -k -H "X-Auth-Token: $bmc_token" -X DELETE https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump/Entries/<dump-id>
Redfish Validator passed.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: Iac9daa8242154e249fad66609b837cf7d2b16091
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index cc98e1a..5dee66b 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -104,12 +104,17 @@
nodes.emplace_back(std::make_unique<PostCodesEntry>(app));
nodes.emplace_back(std::make_unique<PostCodesEntryCollection>(app));
-#ifdef BMCWEB_ENABLE_REDFISH_SYSTEMDUMP_LOG
+#ifdef BMCWEB_ENABLE_REDFISH_DUMP_LOG
nodes.emplace_back(std::make_unique<SystemDumpService>(app));
nodes.emplace_back(std::make_unique<SystemDumpEntryCollection>(app));
nodes.emplace_back(std::make_unique<SystemDumpEntry>(app));
nodes.emplace_back(std::make_unique<SystemDumpEntryDownload>(app));
nodes.emplace_back(std::make_unique<SystemDumpClear>(app));
+
+ nodes.emplace_back(std::make_unique<BMCDumpService>(app));
+ nodes.emplace_back(std::make_unique<BMCDumpEntryCollection>(app));
+ nodes.emplace_back(std::make_unique<BMCDumpEntry>(app));
+
#endif
#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES