Update to the new ResetType mapping
This updates Redfish ResetType with the new states added in the
document below:
ref: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/28706
Tested:
Sent a POST with the updated ResetType values and confirmed the correct
behavior:
ForceRestart: host restarted using Host.ForceWarmReboot
GracefulRestart: host restarted using Host.GracefulWarmReboot
PowerCycle: host restarted using Host.Reboot
Change-Id: I053919f2aaa709ba92685d67c1692bfc88b10d39
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 9280d8f..2e88367 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -1427,8 +1427,9 @@
}
else if (resetType == "ForceRestart")
{
- command = "xyz.openbmc_project.State.Chassis.Transition.Reset";
- hostCommand = false;
+ command =
+ "xyz.openbmc_project.State.Host.Transition.ForceWarmReboot";
+ hostCommand = true;
}
else if (resetType == "GracefulShutdown")
{
@@ -1437,13 +1438,14 @@
}
else if (resetType == "GracefulRestart")
{
- command = "xyz.openbmc_project.State.Host.Transition.Reboot";
+ command =
+ "xyz.openbmc_project.State.Host.Transition.GracefulWarmReboot";
hostCommand = true;
}
else if (resetType == "PowerCycle")
{
- command = "xyz.openbmc_project.State.Chassis.Transition.PowerCycle";
- hostCommand = false;
+ command = "xyz.openbmc_project.State.Host.Transition.Reboot";
+ hostCommand = true;
}
else if (resetType == "Nmi")
{