blob: ddaa922c9135c7dcce4c6aa459e3be6ee404e501 [file] [log] [blame]
Andrew Geissler70d72f82022-03-23 13:15:05 -05001#pragma once
Andrew Geissler03b30822022-03-24 11:04:40 -05002
Andrew Geisslercdac8f42022-03-24 15:02:13 -05003#include <sdbusplus/bus.hpp>
4
Andrew Geissler03b30822022-03-24 11:04:40 -05005/** @brief Determine if a side switch is needed
6 *
Andrew Geisslercdac8f42022-03-24 15:02:13 -05007 * @param[in] bus - The Dbus bus object
Andrew Geissler03b30822022-03-24 11:04:40 -05008 * @return True if side switch needed, false otherwise
9 */
Andrew Geisslercdac8f42022-03-24 15:02:13 -050010bool sideSwitchNeeded(sdbusplus::bus::bus& bus);
11
12/** @brief Power off the system
13 *
14 * @param[in] bus - The Dbus bus object
15 * @return True if chassis off success, false otherwise
16 */
17bool powerOffSystem(sdbusplus::bus::bus& bus);
Andrew Geissler788c6a62022-03-24 15:27:24 -050018
19/** @brief Configure BMC to auto power on the host after reboot
20 *
21 * @param[in] bus - The Dbus bus object
22 * @return True if policy set correctly, false otherwise
23 */
24bool setAutoPowerRestart(sdbusplus::bus::bus& bus);
Andrew Geisslera3cec432022-03-24 16:08:14 -050025
26/** @brief Reboot the BMC
27 *
28 * @param[in] bus - The Dbus bus object
29 * @return True if reboot request had no error, false otherwise
30 */
31bool rebootTheBmc(sdbusplus::bus::bus& bus);