| #include "chassis.hpp" |
| |
| #include "error_messages.hpp" |
| #include "utils/subprocess_utils.hpp" |
| #include <boost/process.hpp> |
| #include <boost/system/error_code.hpp> |
| |
| |
| namespace redfish |
| { |
| |
| static std::vector<std::string> ResetCmd(const int& delayTimeSecs) |
| { |
| std::vector<std::string> resetCmd = {"systemd-run", |
| "--on-active=" + std::to_string(delayTimeSecs), |
| "--timer-property=AccuracySec=100ms", |
| "--", "systemctl", "start", "gbmc-psu-hardreset.target"}; |
| return resetCmd; |
| } |
| |
| void delayResetCN(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, |
| int delayTimeSecs) |
| { |
| childProcessRun(asyncResp, ResetCmd(delayTimeSecs)); |
| } |
| |
| } // namespace redfish |
| |