diff options
author | Valerij Fredriksen <freva@users.noreply.github.com> | 2023-05-31 12:46:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 12:46:04 +0200 |
commit | 12c86f66442accd75c67fd3f41ff0201c72412f9 (patch) | |
tree | c3dcf2e0d11e74edd875efdd5f4664dd4be52f24 | |
parent | b63561b464e586dad8add939d8074c78e9c93e5e (diff) | |
parent | d70021be865ec43eca6d8a34b35d5ac1bb49e4fd (diff) |
Merge pull request #27239 from vespa-engine/jonmv/custom-host-ttl
Re-add "unused" methods that were in use after all
-rw-r--r-- | config-provisioning/src/main/java/com/yahoo/config/provision/Capacity.java | 15 |
1 files changed, 15 insertions, 0 deletions
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> 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> 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); |