Update to the new Host State Transitions
This updates x86-power-control to take the correct action based
on the new Host State Transitions.
Host.Reboot now does a forced power cycle
Host.GracefulWarmReboot now does a graceful power cycle
Host.ForceWarmReboot now does a reset
Chassis.Reset is no longer needed and is removed.
ref: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/28706
Change-Id: Iea545f1c51678e08637be22578921480802d53c2
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index bb24b4b..20ea9cd 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -2139,10 +2139,22 @@
else if (requested ==
"xyz.openbmc_project.State.Host.Transition.Reboot")
{
+ sendPowerControlEvent(power_control::Event::powerCycleRequest);
+ addRestartCause(power_control::RestartCause::command);
+ }
+ else if (requested == "xyz.openbmc_project.State.Host.Transition."
+ "GracefulWarmReboot")
+ {
sendPowerControlEvent(
power_control::Event::gracefulPowerCycleRequest);
addRestartCause(power_control::RestartCause::command);
}
+ else if (requested == "xyz.openbmc_project.State.Host.Transition."
+ "ForceWarmReboot")
+ {
+ sendPowerControlEvent(power_control::Event::resetRequest);
+ addRestartCause(power_control::RestartCause::command);
+ }
else
{
std::cerr << "Unrecognized host state transition request.\n";
@@ -2188,12 +2200,6 @@
sendPowerControlEvent(power_control::Event::powerCycleRequest);
addRestartCause(power_control::RestartCause::command);
}
- else if (requested ==
- "xyz.openbmc_project.State.Chassis.Transition.Reset")
- {
- addRestartCause(power_control::RestartCause::command);
- sendPowerControlEvent(power_control::Event::resetRequest);
- }
else
{
std::cerr << "Unrecognized chassis state transition request.\n";