From d70021be865ec43eca6d8a34b35d5ac1bb49e4fd Mon Sep 17 00:00:00 2001 From: jonmv Date: Wed, 31 May 2023 12:45:12 +0200 Subject: Re-add "unused" methods that were in use after all --- .../main/java/com/yahoo/config/provision/Capacity.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'config-provisioning/src/main/java/com/yahoo/config') diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/Capacity.java b/config-provisioning/src/main/java/com/yahoo/config/provision/Capacity.java index d75634d8c55..a0669df06d2 100644 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/Capacity.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/Capacity.java @@ -120,6 +120,21 @@ public final class Capacity { return new Capacity(min, max, groupSize, required, canFail, NodeType.tenant, cloudAccount, clusterInfo); } + // TODO: remove at some point, much later than March 2023 ... ? + public static Capacity from(ClusterResources min, ClusterResources max, boolean required, boolean canFail) { + return new Capacity(min, max, IntRange.empty(), required, canFail, NodeType.tenant, Optional.empty(), ClusterInfo.empty()); + } + + // TODO: remove at some point, much later than March 2023 ... ? + public static Capacity from(ClusterResources min, ClusterResources max, boolean required, boolean canFail, Optional cloudAccount) { + return new Capacity(min, max, IntRange.empty(), required, canFail, NodeType.tenant, cloudAccount, ClusterInfo.empty()); + } + + // TODO: remove at some point, much later than March 2023 ... ? + public static Capacity from(ClusterResources min, ClusterResources max, IntRange groupSize, boolean required, boolean canFail, Optional cloudAccount) { + return new Capacity(min, max, groupSize, required, canFail, NodeType.tenant, cloudAccount, ClusterInfo.empty()); + } + /** Creates this from a node type */ public static Capacity fromRequiredNodeType(NodeType type) { return from(new ClusterResources(0, 1, NodeResources.unspecified()), true, false, type, Duration.ZERO); -- cgit v1.2.3