diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-02-05 00:15:49 +0300 |
---|---|---|
committer | Jason Bills <jason.m.bills@linux.intel.com> | 2020-02-13 21:09:47 +0300 |
commit | 86a0851afa06adb728c00658bbf8cd8608bd8ff3 (patch) | |
tree | 141a7fffa6dfe84f37d4d47e6366edd9f75819c7 /redfish-core/lib | |
parent | 14b0b8d5240cf96647025a083b453fb1239d4cfe (diff) | |
download | bmcweb-86a0851afa06adb728c00658bbf8cd8608bd8ff3.tar.xz |
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>
Diffstat (limited to 'redfish-core/lib')
-rw-r--r-- | redfish-core/lib/systems.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp index 9280d8f356..2e883676a8 100644 --- a/redfish-core/lib/systems.hpp +++ b/redfish-core/lib/systems.hpp @@ -1427,8 +1427,9 @@ class SystemActionsReset : public Node } 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 @@ class SystemActionsReset : public Node } 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") { |