Add sys command for powercycle on host shutdown.
The new command will trigger a power cycle the next time the host shuts
down. This can exist in parallel with the existing mechanism to trigger
a power cycle after a specified time interval.
The implementation of host state detection and power cycling is platfrom
specific; the new command will just add a temporary file that marks the
system ready to powercycle on the next shutdown. Usually, a systemd unit
would be enabled by the presence of this file to handle the power
cycling process.
Signed-off-by: Shounak Mitra <shounak@google.com>
Change-Id: I0cc40307748fb996be3f6062d8cba1a4b5049683
diff --git a/test/handler_mock.hpp b/test/handler_mock.hpp
index f214db8..e20886a 100644
--- a/test/handler_mock.hpp
+++ b/test/handler_mock.hpp
@@ -26,6 +26,7 @@
std::tuple<std::uint8_t, std::uint8_t, std::uint8_t,
std::uint8_t>(unsigned int));
MOCK_CONST_METHOD1(psuResetDelay, void(std::uint32_t));
+ MOCK_CONST_METHOD0(psuResetOnShutdown, void());
MOCK_METHOD2(getEntityName, std::string(std::uint8_t, std::uint8_t));
MOCK_METHOD0(getMachineName, std::string());
MOCK_METHOD0(buildI2cPcieMapping, void());