Module power

Module power 

Source
Expand description

Power on/off/reset operations against PCS.

POST /power (handler post_power) now returns immediately with the PCS transition id; the polling loop that used to live in pcs_transitions_post_block runs CLI-side. The CLI snapshots the transition with GET /power/transitions/{id} (handler get_power_transition) every few seconds until it completes.

Structs§

ApplyPowerParams
Typed parameters for the power-action service call.

Enums§

PowerAction
The power operation to apply to a list of xnames.
PowerTargetType
Whether the caller’s host_expression is a hosts expression (xnames / NIDs / hostlist) or a single HSM group name whose members should be targeted.

Functions§

apply_power
Start a PCS power transition (on, soft-off, force-off, soft-restart, hard-restart) against params.xnames and return the transition id immediately. The CLI is responsible for polling get_power_transition until the transition reports completed.
get_power_transition
Fetch the current snapshot of a PCS power transition by id. The CLI’s poll loop calls this every few seconds after apply_power returned the transition id.
resolve_target_xnames
Resolve host_expression into the concrete xname list to pass to apply_power.