pub async fn resolve_target_nodes(
infra: &InfraContext<'_>,
token: &str,
hosts_expression_opt: Option<&str>,
group_name_arg_opt: Option<&str>,
settings_group_name_opt: Option<&str>,
) -> Result<Vec<String>, Error>Expand description
Resolve target nodes from either a hosts expression, an explicit HSM group name, or the settings-level HSM group.
Priority order (first non-None wins):
hosts_expression_opt— parsed and validated viafrom_user_hosts_expression_to_xname_vec. Returns a sorted, deduplicatedVec<String>of xnames.group_name_arg_opt— the group name supplied by the CLI’s--groupflag (also accepted as--hsm-group); validated for access viacrate::service::authorization::validate_user_group_access, then expanded to member xnames.settings_group_name_opt— the group configured incli.toml’shsm_group; same treatment as (2).
§Errors
- [
Error::BadRequest] when all three options areNone, or when the caller lacks access to the chosen group. - Any error from
from_user_hosts_expression_to_xname_vecin the hosts-expression branch. - [
Error::NetError] / [Error::CsmError] fromget_member_vec_from_group_name_vec.