aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2018-08-15 14:27:04 +0200
committerMartin Polden <mpolden@mpolden.no>2018-08-15 15:18:31 +0200
commit80753ed191edfed23809d5d5ffedf990a239593e (patch)
tree5f42c82a3e703a671c9e47f89c095ed23ef3fe16 /controller-api
parent506ea9c1367748ddd4ff20203fc13211d635f5a6 (diff)
Support new fields in node-repository API
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java93
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeUpgrade.java13
2 files changed, 71 insertions, 35 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java
index 717be040a9f..e12908f6aa8 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Arrays;
import java.util.Set;
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -45,6 +46,10 @@ public class NodeRepositoryNode {
private String vespaVersion;
@JsonProperty("wantedVespaVersion")
private String wantedVespaVersion;
+ @JsonProperty("currentOsVersion")
+ private String currentOsVersion;
+ @JsonProperty("wantedOsVersion")
+ private String wantedOsVersion;
@JsonProperty("failCount")
private Integer failCount;
@JsonProperty("hardwareFailure")
@@ -356,42 +361,62 @@ public class NodeRepositoryNode {
return allowedToBeDown;
}
+ public String getCurrentOsVersion() {
+ return currentOsVersion;
+ }
+
+ public void setCurrentOsVersion(String currentOsVersion) {
+ this.currentOsVersion = currentOsVersion;
+ }
+
+ public String getWantedOsVersion() {
+ return wantedOsVersion;
+ }
+
+ public void setWantedOsVersion(String wantedOsVersion) {
+ this.wantedOsVersion = wantedOsVersion;
+ }
+
@Override
public String toString() {
return "NodeRepositoryNode{" +
- "url='" + url + '\'' +
- ", id='" + id + '\'' +
- ", state=" + state +
- ", hostname='" + hostname + '\'' +
- ", ipAddresses='" + ipAddresses + '\'' +
- ", additionalIpAddresses='" + additionalIpAddresses + '\'' +
- ", openStackId='" + openStackId + '\'' +
- ", flavor='" + flavor + '\'' +
- ", canonicalFlavor='" + canonicalFlavor + '\'' +
- ", membership=" + membership +
- ", owner=" + owner +
- ", restartGeneration=" + restartGeneration +
- ", rebootGeneration=" + rebootGeneration +
- ", currentRestartGeneration=" + currentRestartGeneration +
- ", currentRebootGeneration=" + currentRebootGeneration +
- ", vespaVersion='" + vespaVersion + '\'' +
- ", wantedVespaVersion='" + wantedVespaVersion + '\'' +
- ", failCount=" + failCount +
- ", hardwareFailure=" + hardwareFailure +
- ", hardwareFailureDescription='" + hardwareFailureDescription + '\'' +
- ", hardwareDivergence='" + hardwareDivergence + '\'' +
- ", environment=" + environment +
- ", type=" + type +
- ", wantedDockerImage='" + wantedDockerImage + '\'' +
- ", currentDockerImage='" + currentDockerImage + '\'' +
- ", wantToRetire='" + wantToRetire + '\'' +
- ", wantToDeprovision='" + wantToDeprovision + '\'' +
- ", minDiskAvailableGb='" + minDiskAvailableGb + '\'' +
- ", minMainMemoryAvailableGb='" + minMainMemoryAvailableGb + '\'' +
- ", cost='" + cost + '\'' +
- ", minCpuCores='" + minCpuCores + '\'' +
- ", description='" + description + '\'' +
- ", allowedToBeDown='" + allowedToBeDown + '\'' +
- '}';
+ "url='" + url + '\'' +
+ ", id='" + id + '\'' +
+ ", state=" + state +
+ ", hostname='" + hostname + '\'' +
+ ", ipAddresses=" + ipAddresses +
+ ", additionalIpAddresses=" + additionalIpAddresses +
+ ", openStackId='" + openStackId + '\'' +
+ ", flavor='" + flavor + '\'' +
+ ", canonicalFlavor='" + canonicalFlavor + '\'' +
+ ", membership=" + membership +
+ ", owner=" + owner +
+ ", restartGeneration=" + restartGeneration +
+ ", rebootGeneration=" + rebootGeneration +
+ ", currentRestartGeneration=" + currentRestartGeneration +
+ ", currentRebootGeneration=" + currentRebootGeneration +
+ ", vespaVersion='" + vespaVersion + '\'' +
+ ", wantedVespaVersion='" + wantedVespaVersion + '\'' +
+ ", currentOsVersion='" + currentOsVersion + '\'' +
+ ", wantedOsVersion='" + wantedOsVersion + '\'' +
+ ", failCount=" + failCount +
+ ", hardwareFailure=" + hardwareFailure +
+ ", hardwareFailureDescription='" + hardwareFailureDescription + '\'' +
+ ", hardwareDivergence='" + hardwareDivergence + '\'' +
+ ", environment=" + environment +
+ ", type=" + type +
+ ", wantedDockerImage='" + wantedDockerImage + '\'' +
+ ", currentDockerImage='" + currentDockerImage + '\'' +
+ ", parentHostname='" + parentHostname + '\'' +
+ ", wantToRetire=" + wantToRetire +
+ ", wantToDeprovision=" + wantToDeprovision +
+ ", minDiskAvailableGb=" + minDiskAvailableGb +
+ ", minMainMemoryAvailableGb=" + minMainMemoryAvailableGb +
+ ", cost=" + cost +
+ ", minCpuCores=" + minCpuCores +
+ ", description='" + description + '\'' +
+ ", history=" + Arrays.toString(history) +
+ ", allowedToBeDown=" + allowedToBeDown +
+ '}';
}
}
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeUpgrade.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeUpgrade.java
index 6b6af02b88c..21c1d23ba3a 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeUpgrade.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeUpgrade.java
@@ -3,23 +3,30 @@ package com.yahoo.vespa.hosted.controller.api.integration.noderepository;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author mpolden
*/
@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
public class NodeUpgrade {
@JsonProperty("version")
private final String version;
+ @JsonProperty("osVersion")
+ private final String osVersion;
+
@JsonProperty("force")
private final boolean force;
@JsonCreator
- public NodeUpgrade(@JsonProperty("version") String version, @JsonProperty("force") boolean force) {
+ public NodeUpgrade(@JsonProperty("version") String version, @JsonProperty("osVersion") String osVersion,
+ @JsonProperty("force") boolean force) {
this.version = version;
+ this.osVersion = osVersion;
this.force = force;
}
@@ -27,6 +34,10 @@ public class NodeUpgrade {
return version;
}
+ public String getOsVersion() {
+ return osVersion;
+ }
+
public boolean isForce() {
return force;
}