summaryrefslogtreecommitdiffstats
path: root/config-provisioning
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2016-10-25 08:22:21 +0200
committerHarald Musum <musum@yahoo-inc.com>2016-10-25 08:22:21 +0200
commit24cdc69fb571ac32f1f3f85258e7e9e596fa4e8f (patch)
tree7842db1a2a18fb297333b0e2094134a4a4e16dbe /config-provisioning
parentb0cf4fa2591530a85ed5dc88f94972a1598ac0d4 (diff)
Docker image should not be considered when allocating nodes
* Ignore (wanted) docker image when allocating nodes, since this is not an attribute of the node as it is used today, it might change at any time (e.g. when upgrading Vespa)
Diffstat (limited to 'config-provisioning')
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java b/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java
index 35666832929..6a397d0e17a 100644
--- a/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java
@@ -70,7 +70,19 @@ public final class ClusterSpec {
return true;
}
+ /** Returns whether this is equal, disregarding the group value and wanted docker image */
+ public boolean equalsIgnoringGroupAndDockerImage(Object o) {
+ if (o == this) return true;
+ if ( ! (o instanceof ClusterSpec)) return false;
+ ClusterSpec other = (ClusterSpec)o;
+ if ( ! other.type.equals(this.type)) return false;
+ if ( ! other.id.equals(this.id)) return false;
+ return true;
+ }
+
+ // TODO: Remove when no version older than 6.41 is used
/** Returns whether this is equal, disregarding the group value */
+ @Deprecated
public boolean equalsIgnoringGroup(Object o) {
if (o == this) return true;
if ( ! (o instanceof ClusterSpec)) return false;