class VirtualGroupService {

    public void cleanupVirtualGroups(String accountId, String environmentCrn) {
        for (UmsRight right : UmsRight.values()) {
            try {
                LOGGER.debug("Start deleting virtual groups from UMS for environment '{}'", environmentCrn);
                grpcUmsClient.deleteWorkloadAdministrationGroupName(INTERNAL_ACTOR_CRN, accountId,
                        MDCUtils.getRequestId(), right.getRight(), environmentCrn);
                LOGGER.debug("Virtual groups deletion from UMS has been finished successfully for environment '{}'", environmentCrn);
            } catch (RuntimeException ex) {
                LOGGER.warn("UMS virtualgroup delete failed (this is not critical)", ex);
            }
        }
    }

}