diff options
author | toby <smorgrav@yahoo-inc.com> | 2017-10-03 12:24:33 +0200 |
---|---|---|
committer | toby <smorgrav@yahoo-inc.com> | 2017-10-10 13:39:36 +0200 |
commit | 5f0cdc5c18c74ea9ead5f2f3f03e57874935aa5e (patch) | |
tree | 88609292d47a3bac89603d6bb82045292de0fdf0 /controller-api | |
parent | ad3dc7890a7bc72ba16998ff448d39061f5937d0 (diff) |
Add getNodeList to configserverclient
Diffstat (limited to 'controller-api')
2 files changed, 44 insertions, 1 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java index a96f7637738..8c8b5fdf22e 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java @@ -67,5 +67,12 @@ public interface ConfigServerClient { */ EndpointStatus getGlobalRotationStatus(DeploymentId deployment, String endpoint) throws IOException; - //JsonNode getClusterInfo(DeploymentId deployment, String endpoint) throws IOException; + /** + * The nodes allocated to the deployment + * + * @param deployment The application/zone pair + * @return The nodes for this deployment + * @throws IOException If unable to retrieve the node list + */ + NodeList getNodeList(DeploymentId deployment) throws IOException; } diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NodeList.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NodeList.java new file mode 100644 index 00000000000..755bec2fcec --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NodeList.java @@ -0,0 +1,36 @@ +package com.yahoo.vespa.hosted.controller.api.integration.configserver;// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +/** + * @author smorgrav + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class NodeList { + + @JsonProperty("nodes") + public List<Node> nodes; + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class Node { + @JsonProperty("hostname") + public String hostname; + @JsonProperty("flavor") + public String flavor; + @JsonProperty("membership") + public Membership membership; + @JsonProperty("cost") + public int cost; + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class Membership { + @JsonProperty("clustertype") + public String clusterType; + @JsonProperty("clusterid") + public String clusterId; + } + } +}
\ No newline at end of file |