resolve_target_xnames

Function resolve_target_xnames 

Source
pub async fn resolve_target_xnames(
    infra: &InfraContext<'_>,
    token: &str,
    target_type: PowerTargetType,
    host_expression: &str,
) -> Result<Vec<String>, Error>
Expand description

Resolve host_expression into the concrete xname list to pass to apply_power.

For PowerTargetType::Cluster the expression is a single HSM group name and we fetch its members; for PowerTargetType::Nodes it’s a hostlist / NID / xname expression resolved through node_ops::from_user_hosts_expression_to_xname_vec. The caller’s group access to every resolved xname is validated before return. An empty resolution yields Error::BadRequest so PCS is never called with nothing to do.