pub async fn delete_group_members(
infra: &InfraContext<'_>,
token: &str,
group_name: &str,
host_expression: &str,
dry_run: bool,
) -> Result<(), Error>Expand description
Resolve host_expression and remove the resolved nodes from
group_name.
With dry_run = true, only the resolution runs — no backend
mutation. Errors from the per-node deletion abort the loop and
surface to the handler, so a partially completed batch is
possible.
§Errors
- [
Error::InvalidNodeId] / [Error::BadRequest] whenhost_expressioncan’t be parsed bycrate::service::node_ops::from_hosts_expression_to_xname_vec. - [
Error::BadRequest] when the resolution produces no xnames (a literal “nothing to do” guard). - [
Error::BadRequest] when the caller lacks access to one of the resolved xnames (viacrate::service::authorization::validate_user_group_members_access). - [
Error::NetError] / [Error::CsmError] fromget_node_metadata_availableand per-nodedelete_member_from_group.