summaryrefslogtreecommitdiffstats
path: root/controller-server/src/main
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2019-05-31 15:19:48 +0200
committerGitHub <noreply@github.com>2019-05-31 15:19:48 +0200
commita77e3458e427cff87b4b594a7ca927427b906cea (patch)
tree7329111e78bbbfcc023230ab2cd125b4e90ea463 /controller-server/src/main
parent5014e38c8f059459c0b63b8cc9a79796ffedb122 (diff)
parent5b29a06b30010499b50113f1d656cb97a7de7062 (diff)
Merge pull request #9632 from vespa-engine/mpolden/avoid-explicit-system-name
Use SystemName#isCd and SystemName#isPublic
Diffstat (limited to 'controller-server/src/main')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java
index 1b90a43421b..6c9b8dd0784 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java
@@ -119,7 +119,7 @@ public class Endpoint {
private static String separator(SystemName system, boolean directRouting, boolean tls) {
if (!tls) return ".";
if (directRouting) return ".";
- if (isPublic(system)) return ".";
+ if (system.isPublic()) return ".";
return "--";
}
@@ -141,7 +141,7 @@ public class Endpoint {
}
private static String systemPart(SystemName system, String separator) {
- if (system == SystemName.main || isPublic(system)) return "";
+ if (!system.isCd()) return "";
return system.value() + separator;
}
@@ -160,10 +160,6 @@ public class Endpoint {
}
}
- private static boolean isPublic(SystemName system) { // TODO: Remove and inline once we're down to one
- return system == SystemName.Public || system == SystemName.vaas;
- }
-
/** An endpoint's scope */
public enum Scope {
@@ -277,7 +273,7 @@ public class Endpoint {
} else {
throw new IllegalArgumentException("Must set either cluster or rotation target");
}
- if (isPublic(system) && !directRouting) {
+ if (system.isPublic() && !directRouting) {
throw new IllegalArgumentException("Public system only supports direct routing endpoints");
}
if (directRouting && !port.isDefault()) {