diff options
author | Martin Polden <mpolden@mpolden.no> | 2019-01-04 15:36:43 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2019-01-07 09:46:33 +0100 |
commit | 7ff11c33a2a4e353f2306b1580ee9b7cd6164bd9 (patch) | |
tree | 437a31550f1f4642965ca8cea35f509b9467dcfe /controller-api | |
parent | 505753a6fd032c025197dcedb229721960a89eeb (diff) |
Fix global rotation override
Removes guesswork and sends the correct identifier (upstream name) to the API on the config server.
Diffstat (limited to 'controller-api')
2 files changed, 16 insertions, 6 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 1dff20c77be..e3599b3e652 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 @@ -51,6 +51,7 @@ public interface ConfigServer { * @param status The new status with metadata * @throws IOException If trouble contacting the server */ + // TODO: Remove checked exception from signature void setGlobalRotationStatus(DeploymentId deployment, String endpoint, EndpointStatus status) throws IOException; /** @@ -61,6 +62,7 @@ public interface ConfigServer { * @return The endpoint status with metadata * @throws IOException If trouble contacting the server */ + // TODO: Remove checked exception from signature EndpointStatus getGlobalRotationStatus(DeploymentId deployment, String endpoint) throws IOException; /** The node repository on this config server */ diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java index b7c4af96a43..95ca7988d58 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java @@ -9,25 +9,33 @@ public class RoutingEndpoint { private final boolean isGlobal; private final String endpoint; private final String hostname; + private final String upstreamName; - public RoutingEndpoint(String endpoint, String hostname, boolean isGlobal) { + public RoutingEndpoint(String endpoint, String hostname, boolean isGlobal, String upstreamName) { this.endpoint = endpoint; this.hostname = hostname; this.isGlobal = isGlobal; + this.upstreamName = upstreamName; } - /** @return True if the endpoint is global */ + /** Whether this is a global endpoint */ public boolean isGlobal() { return isGlobal; } - /* @return The URI for the endpoint */ - public String getEndpoint() { + /** URL for this endpoint */ + public String endpoint() { return endpoint; } - /** @return The hostname for this endpoint */ - public String getHostname() { + /** First hostname for an upstream behind this endpoint */ + public String hostname() { return hostname; } + + /** The upstream name of this endpoint */ + public String upstreamName() { + return upstreamName; + } + } |