1 #include "bmc_dump_entry.hpp" 2 3 #include "dump_manager.hpp" 4 #include "dump_offload.hpp" 5 6 #include <phosphor-logging/lg2.hpp> 7 8 namespace phosphor 9 { 10 namespace dump 11 { 12 namespace bmc 13 { 14 15 void Entry::delete_() 16 { 17 // Delete Dump file from Permanent location 18 try 19 { 20 std::filesystem::remove_all(file.parent_path()); 21 } 22 catch (const std::filesystem::filesystem_error& e) 23 { 24 // Log Error message and continue 25 lg2::error("Failed to delete dump file, errormsg: {ERROR}", "ERROR", e); 26 } 27 28 // Remove Dump entry D-bus object 29 phosphor::dump::Entry::delete_(); 30 } 31 32 void Entry::initiateOffload(std::string uri) 33 { 34 phosphor::dump::offload::requestOffload(file, id, uri); 35 offloaded(true); 36 } 37 38 } // namespace bmc 39 } // namespace dump 40 } // namespace phosphor 41