| #include "chassis.hpp" | |
| #include "boost/system/error_code.hpp" // NOLINT | |
| #include "error_messages.hpp" | |
| #include "subprocess_utils.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) { | |
| SubprocessUtilsBase::getInstance()->childProcessRun(asyncResp, | |
| ResetCmd(delayTimeSecs)); | |
| } | |
| } // namespace redfish |