commit | dd7090e6d6869c0383796589e9e40a793e825247 | [log] [tgz] |
---|---|---|
author | Gunnar Mills <gmills@us.ibm.com> | Tue Jul 30 15:23:05 2024 -0500 |
committer | Gunnar Mills <gmills@us.ibm.com> | Wed Aug 21 15:09:03 2024 -0500 |
tree | fe89a24f6caa5cda60fe439a028845db8fd86ed2 | |
parent | 68896206a0425b06461cc1c52183d1d097fa7b7b [diff] [blame] |
Fix 404 on Hypervisor Reset /redfish/v1/Systems/hypervisor/Actions/ComputerSystem.Reset was returning a 404. On closer inspection, it was due to hitting the System .Reset Action and not making it to the Hypervisor specific action. [1]. Remove the Hypervisor specific action and call the method from the System .Reset Action. This is how we do the handleHypervisorSystemGet already. Believe this was broke by 7f3e84a151. [2] It is only now being discovered due to a recent rebase with upstream. Follow the commit before and put this behind the new Hypervisor Computer System Option. [1]: https://github.com/openbmc/bmcweb/blob/cd504a94c827fbc98908b2a712f49ea0adf7aab8/redfish-core/lib/systems.hpp#L3493 [2]: https://github.com/openbmc/bmcweb/commit/7f3e84a151e106d9227d08358e9ee3fd225b34c4 Tested: On Patchset 2, /redfish/v1/Systems/hypervisor/Actions/ComputerSystem.Reset returns a 204. Change-Id: I3599bb8419604d71684ce61ca992f4b87c1d3fa5 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp index f90bb83..4ad92dd 100644 --- a/redfish-core/lib/systems.hpp +++ b/redfish-core/lib/systems.hpp
@@ -2872,6 +2872,16 @@ { return; } + + if constexpr (BMCWEB_HYPERVISOR_COMPUTER_SYSTEM) + { + if (systemName == "hypervisor") + { + handleHypervisorSystemResetPost(req, asyncResp); + return; + } + } + if (systemName != BMCWEB_REDFISH_SYSTEM_URI_NAME) { messages::resourceNotFound(asyncResp->res, "ComputerSystem",