feat(power): add Sleep action_kind to host_power #122
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/VA-120-host-power-sleep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a Sleep variant to PowerAction so host_power can suspend the host in addition to reboot and shutdown. parse accepts "sleep" and "suspend"; as_str returns "sleep". Sleep maps to system suspend-to-RAM (S3), never hibernate: Linux systemctl suspend (returns Unsupported when systemctl is absent, since shutdown(8) cannot suspend), macOS pmset sleepnow, Windows rundll32.exe powrprof.dll,SetSuspendState 0,1,0.
The unknown-action_kind error path is unchanged and the missing-action_kind message now lists sleep alongside reboot and shutdown. reply_host_power already echoes requestid into responseid on every reply, so server-relayed commands stay correlatable; no change was needed there.
#VA-120