diff options
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java index 62b60858b3f..1cf7bcfa4f2 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java @@ -9,7 +9,6 @@ import com.yahoo.config.provision.ClusterSpec; import com.yahoo.config.provision.NodeResources; import com.yahoo.config.provision.NodeType; import com.yahoo.vespa.hosted.provision.node.ClusterId; -import com.yahoo.vespa.hosted.provision.node.IP; import java.util.ArrayList; import java.util.Comparator; @@ -330,12 +329,12 @@ public class NodeList extends AbstractFilteringList<Node, NodeList> { /** * Returns the number of unused IP addresses in the pool, assuming any and all unaccounted for hostnames - * in the pool are resolved to exactly 1 IP address (or 2 with {@link IP.IpAddresses.Protocol#dualStack}). + * in the pool are resolved to exactly 1 IP address (or 2 if dual-stack). */ public int eventuallyUnusedIpAddressCount(Node host) { // The count in this method relies on the size of the IP address pool if that's non-empty, // otherwise fall back to the address/hostname pool. - if (host.ipConfig().pool().ipSet().isEmpty()) { + if (host.ipConfig().pool().asSet().isEmpty()) { Set<String> allHostnames = cache().keySet(); return (int) host.ipConfig().pool().hostnames().stream() .filter(hostname -> !allHostnames.contains(hostname.value())) @@ -345,7 +344,7 @@ public class NodeList extends AbstractFilteringList<Node, NodeList> { old != null ? old : stream().flatMap(node -> node.ipConfig().primary().stream()) .collect(Collectors.toUnmodifiableSet()) ); - return (int) host.ipConfig().pool().ipSet().stream() + return (int) host.ipConfig().pool().asSet().stream() .filter(address -> !allIps.contains(address)) .count(); } |