validate_group_deletion

Function validate_group_deletion 

Source
pub async fn validate_group_deletion(
    infra: &InfraContext<'_>,
    token: &str,
    label: &str,
) -> Result<(), Error>
Expand description

Check that deleting label would not leave any node without a group.

An xname is “orphaned” if label is its only HSM group. When at least one such node exists, returns Error::Conflict listing the orphans so the operator can decide whether to move them first or pass force to delete_group.

§Errors

  • [Error::Conflict] when one or more members would be orphaned; the message lists the affected xnames sorted alphabetically.
  • [Error::NetError] / [Error::CsmError] from the get_member_vec_from_group_name_vec and get_group_map_and_filter_by_group_vec backend calls.