diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2020-11-30 12:58:03 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2020-11-30 12:58:03 +0100 |
commit | c9d5015a556142f1e6025615badc0335ffdfd2d4 (patch) | |
tree | 31adcd5539cd492bad09a31e02f78f878941936e | |
parent | 59af1d07ae7f4692cc75bfcad62648ca3e72e9df (diff) |
Require HostResource bandwidth
-rw-r--r-- | flags/src/main/java/com/yahoo/vespa/flags/custom/HostResources.java | 3 | ||||
-rw-r--r-- | flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/custom/HostResources.java b/flags/src/main/java/com/yahoo/vespa/flags/custom/HostResources.java index c0b5d7a523c..129e1020b04 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/custom/HostResources.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/custom/HostResources.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -import java.util.Optional; import java.util.Set; /** @@ -45,7 +44,7 @@ public class HostResources { this.vcpu = requirePositive("vcpu", vcpu); this.memoryGb = requirePositive("memoryGb", memoryGb); this.diskGb = requirePositive("diskGb", diskGb); - this.bandwidthGbps = requirePositive("bandwidthGbps", Optional.ofNullable(bandwidthGbps).orElse(0.3)); + this.bandwidthGbps = requirePositive("bandwidthGbps", bandwidthGbps); this.diskSpeed = validateEnum("diskSpeed", validDiskSpeeds, diskSpeed); this.storageType = validateEnum("storageType", validStorageTypes, storageType); this.containers = requirePositive("containers", containers); diff --git a/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java b/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java index 28e84bcf3e5..636eea2c33c 100644 --- a/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java +++ b/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java @@ -112,7 +112,7 @@ public class FlagsTest { @Test public void testSharedHostFlag() { SharedHost sharedHost = new SharedHost(List.of(new HostResources( - 4.0, 16.0, 50.0, null, + 4.0, 16.0, 50.0, 0.3, "fast", "local", 10))); testGeneric(Flags.SHARED_HOST, sharedHost); |