aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2019-10-09 15:30:07 +0200
committerMartin Polden <mpolden@mpolden.no>2019-10-10 09:17:25 +0200
commit9ed8162d11b2f1e7042fef2d4a5e030af71948ed (patch)
tree0a865094af55d9565ec87ff26d0267e790196571 /controller-api
parentc047a2364581b470d367fc345c8031a38aaf9af8 (diff)
Change status of all endpoints when overriding global status
Since a deployment can now be a member of multiple global endpoints, we need to change the status of all of them when status is overridden by tenant.
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java18
1 files changed, 18 insertions, 0 deletions
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 95ca7988d58..59ad23aaa23 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
@@ -1,6 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.routing;
+import java.util.Objects;
+
/**
* @author smorgrav
*/
@@ -38,4 +40,20 @@ public class RoutingEndpoint {
return upstreamName;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ RoutingEndpoint that = (RoutingEndpoint) o;
+ return isGlobal == that.isGlobal &&
+ endpoint.equals(that.endpoint) &&
+ hostname.equals(that.hostname) &&
+ upstreamName.equals(that.upstreamName);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(isGlobal, endpoint, hostname, upstreamName);
+ }
+
}