summaryrefslogtreecommitdiffstats
path: root/controller-api/src
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2019-08-29 11:19:29 +0200
committerGitHub <noreply@github.com>2019-08-29 11:19:29 +0200
commit1dc9c56b091a55e359624ba01bc0d39ea8882ce6 (patch)
treefdf8edbec5f839731ed1ba6aed7f06f281e9fb47 /controller-api/src
parentef6f3a83ca9f64a7ac76ad4a7dc060325aa3f97e (diff)
parent9f33cdc198aab30c979dfc03297b3a16e353a2ca (diff)
Merge pull request #10442 from vespa-engine/mpolden/ignore-inactive-lbs
Ignore inactive load balancers in routing policies
Diffstat (limited to 'controller-api/src')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java
index 0ad15e9cabe..05bdf3c3412 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java
@@ -19,14 +19,16 @@ public class LoadBalancer {
private final ApplicationId application;
private final ClusterSpec.Id cluster;
private final HostName hostname;
+ private final State state;
private final Optional<String> dnsZone;
- public LoadBalancer(String id, ApplicationId application, ClusterSpec.Id cluster, HostName hostname,
+ public LoadBalancer(String id, ApplicationId application, ClusterSpec.Id cluster, HostName hostname, State state,
Optional<String> dnsZone) {
this.id = Objects.requireNonNull(id, "id must be non-null");
this.application = Objects.requireNonNull(application, "application must be non-null");
this.cluster = Objects.requireNonNull(cluster, "cluster must be non-null");
this.hostname = Objects.requireNonNull(hostname, "hostname must be non-null");
+ this.state = Objects.requireNonNull(state, "state must be non-null");
this.dnsZone = Objects.requireNonNull(dnsZone, "dnsZone must be non-null");
}
@@ -50,4 +52,15 @@ public class LoadBalancer {
return dnsZone;
}
+ public State state() {
+ return state;
+ }
+
+ public enum State {
+ active,
+ inactive,
+ reserved,
+ unknown
+ }
+
}