summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2020-01-24 09:42:51 +0100
committerMartin Polden <mpolden@mpolden.no>2020-01-24 09:46:57 +0100
commit2acdd6878cd8a67d4ce10a22661c3356503c2827 (patch)
tree42149e6385273488d292dd0d3802fc9c383da2e4 /controller-api
parent963e50d08a81dcc9d4b5fe5293a62e5156465f11 (diff)
Support setting changing zone status in ConfigServer
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java
index 77919b0ae54..ed83c83a1a2 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java
@@ -67,14 +67,16 @@ public interface ConfigServer {
* deployment in the shared routing layer
* @param status The new status
*/
- // TODO(mpolden): Implement a zone-variant of this
void setGlobalRotationStatus(DeploymentId deployment, String upstreamName, EndpointStatus status);
/**
- * Get the endpoint status for an app in one zone
+ * Set the new status for an entire zone.
*
- * @param deployment The application/zone pair
- * @param endpoint The endpoint to modify
+ * @param zone the zone
+ * @param in whether to set zone status to 'in' or 'out'
+ */
+ void setGlobalRotationStatus(ZoneId zone, boolean in);
+
/**
* Get the endpoint status for an app in one zone.
*
@@ -85,6 +87,14 @@ public interface ConfigServer {
*/
EndpointStatus getGlobalRotationStatus(DeploymentId deployment, String upstreamName);
+ /**
+ * Get the status for an entire zone.
+ *
+ * @param zone the zone
+ * @return whether the zone status is 'in'
+ */
+ boolean getGlobalRotationStatus(ZoneId zone);
+
/** The node repository on this config server */
NodeRepository nodeRepository();