public List<Node> activeNodesOn(String switchHostname, ApplicationId application, ClusterSpec.Id cluster) {
        NodeList allNodes = nodeRepository.nodes().list();
        NodeList activeNodes = allNodes.state(Node.State.active).owner(application).cluster(cluster);
        return activeNodes.stream().filter(node -> {
            Optional<String> allocatedSwitchHostname = allNodes.parentOf(node).flatMap(Node::switchHostname);
            return allocatedSwitchHostname.isPresent() &&
                   allocatedSwitchHostname.get().equals(switchHostname);
        }).toList();
    }
Returns the hosts from the input list which are not retired
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java