aboutsummaryrefslogtreecommitdiffstats
path: root/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@verizonmedia.com>2020-02-17 17:36:37 +0100
committerHåkon Hallingstad <hakon@verizonmedia.com>2020-02-17 17:36:37 +0100
commit42a095573cc800a163d1d0c4337b5ef8a4e38b36 (patch)
treec679c2e66f80f4c5a4bccd2bf7bf2418e3e20548 /orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java
parent3cf5d3624f8b16351c74c64df6822aa12250163b (diff)
Add host info to orchestrator REST API
Diffstat (limited to 'orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java')
-rw-r--r--orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java b/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java
index 3f14579dfba..2a582020bb3 100644
--- a/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java
+++ b/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/GetHostResponse.java
@@ -18,6 +18,7 @@ public class GetHostResponse {
public static final String FIELD_NAME_HOSTNAME = "hostname";
public static final String FIELD_NAME_STATE = "state";
+ public static final String FIELD_NAME_SUSPENDED_SINCE = "suspendedSince";
public static final String FIELD_NAME_APPLICATION_URL = "applicationUrl";
public static final String FIELD_NAME_SERVICES = "services";
@@ -25,15 +26,18 @@ public class GetHostResponse {
private final String state;
private final String applicationUrl;
private final List<HostService> services;
+ private final String suspendedSince;
@JsonCreator
public GetHostResponse(
@JsonProperty(FIELD_NAME_HOSTNAME) String hostname,
@JsonProperty(FIELD_NAME_STATE) String state,
+ @JsonProperty(FIELD_NAME_SUSPENDED_SINCE) String suspendedSince,
@JsonProperty(FIELD_NAME_APPLICATION_URL) String applicationUrl,
@JsonProperty(FIELD_NAME_SERVICES) List<HostService> services) {
this.hostname = hostname;
this.state = state;
+ this.suspendedSince = suspendedSince;
this.applicationUrl = applicationUrl;
this.services = services;
}
@@ -48,6 +52,11 @@ public class GetHostResponse {
return state;
}
+ @JsonProperty(FIELD_NAME_SUSPENDED_SINCE)
+ public String suspendedSince() {
+ return suspendedSince;
+ }
+
@JsonProperty(FIELD_NAME_APPLICATION_URL)
public String applicationUrl() {
return applicationUrl;
@@ -65,12 +74,13 @@ public class GetHostResponse {
GetHostResponse that = (GetHostResponse) o;
return Objects.equals(hostname, that.hostname) &&
Objects.equals(state, that.state) &&
+ Objects.equals(suspendedSince, that.suspendedSince) &&
Objects.equals(applicationUrl, that.applicationUrl) &&
Objects.equals(services, that.services);
}
@Override
public int hashCode() {
- return Objects.hash(hostname, state, applicationUrl, services);
+ return Objects.hash(hostname, state, suspendedSince, applicationUrl, services);
}
}