diff options
author | Harald Musum <musum@yahooinc.com> | 2022-05-10 14:48:44 +0200 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2022-05-10 14:48:44 +0200 |
commit | a82cebd766ca79beb1bb0b539d6b12fd9aa72261 (patch) | |
tree | 209570c96ece641a666d41c24cef0d8ad46f9bf3 /routing-generator/src/main | |
parent | 11b07429bbd90936870d25eeb1c53d414f6083f6 (diff) |
Remove use of routing method 'shared'
Diffstat (limited to 'routing-generator/src/main')
-rw-r--r-- | routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java index 90a38da8687..90a246ad424 100644 --- a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java +++ b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/RoutingTable.java @@ -10,7 +10,6 @@ import com.yahoo.config.provision.InstanceName; import com.yahoo.config.provision.TenantName; import com.yahoo.config.provision.zone.RoutingMethod; import com.yahoo.config.provision.zone.ZoneId; - import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; @@ -24,6 +23,8 @@ import java.util.TreeMap; import java.util.stream.Collectors; import java.util.stream.Stream; +import static com.yahoo.cloud.config.LbServicesConfig.Tenants.Applications.Endpoints.RoutingMethod.Enum.sharedLayer4; + /** * A routing table for a hosted Vespa zone. This holds the details necessary for the routing layer to route traffic to * deployments. @@ -127,10 +128,9 @@ public class RoutingTable { } private static RoutingMethod routingMethodFrom(LbServicesConfig.Tenants.Applications.Endpoints endpoint) { - switch (endpoint.routingMethod()) { - case shared: return RoutingMethod.shared; - case sharedLayer4: return RoutingMethod.sharedLayer4; - } + if (endpoint.routingMethod() == sharedLayer4) + return RoutingMethod.sharedLayer4; + throw new IllegalArgumentException("Unhandled routing method: " + endpoint.routingMethod()); } |