diff options
author | Valerij Fredriksen <valerijf@oath.com> | 2017-09-08 16:06:00 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@oath.com> | 2017-09-08 16:06:00 +0200 |
commit | 2952790e42fb85a70f87dec52b8cdf0683e09dea (patch) | |
tree | 42de7a9e6a16ea0fdb14e1e953306356d8989065 /node-repository/src/main/java/com | |
parent | de8c68fc845fd90f1c93c9003b99edd9967ade6a (diff) |
Remove hardwareFailureType
Diffstat (limited to 'node-repository/src/main/java/com')
2 files changed, 1 insertions, 12 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodePatcher.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodePatcher.java index 2beabcd8e8f..d146e976121 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodePatcher.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodePatcher.java @@ -30,7 +30,6 @@ import java.util.stream.Collectors; */ public class NodePatcher { - public static final String HARDWARE_FAILURE_TYPE = "hardwareFailureType"; public static final String HARDWARE_FAILURE_DESCRIPTION = "hardwareFailureDescription"; private final NodeFlavors nodeFlavors; private final Inspector inspector; @@ -79,14 +78,7 @@ public class NodePatcher { List<Node> children = nodeRepository.getChildNodes(node.hostname()); boolean modified = false; - // TODO: Remove when all clients have switched to hardwareFailureDescription - if (inspector.field(HARDWARE_FAILURE_TYPE).valid()) { - Optional<String> hardwareFailure = asOptionalString(inspector.field(HARDWARE_FAILURE_TYPE)); - modified = true; - children = children.stream() - .map(node -> node.with(node.status().withHardwareFailureDescription(hardwareFailure))) - .collect(Collectors.toList()); - } else if (inspector.field(HARDWARE_FAILURE_DESCRIPTION).valid()) { + if (inspector.field(HARDWARE_FAILURE_DESCRIPTION).valid()) { Optional<String> hardwareFailure = asOptionalString(inspector.field(HARDWARE_FAILURE_DESCRIPTION)); modified = true; children = children.stream() @@ -121,7 +113,6 @@ public class NodePatcher { case "flavor" : return node.with(nodeFlavors.getFlavorOrThrow(asString(value))); case HARDWARE_FAILURE_DESCRIPTION: - case HARDWARE_FAILURE_TYPE: return node.with(node.status().withHardwareFailureDescription(asOptionalString(value))); case "parentHostname" : return node.withParentHostname(asString(value)); diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java index a7efc3ccd82..78bd2b5e165 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java @@ -168,8 +168,6 @@ class NodesResponse extends HttpResponse { }); object.setLong("failCount", node.status().failCount()); object.setBool("hardwareFailure", node.status().hardwareFailureDescription().isPresent()); - // TODO: Remove when all clients have switched to hardwareFailureDescription - node.status().hardwareFailureDescription().ifPresent(failure -> object.setString("hardwareFailureType", failure)); node.status().hardwareFailureDescription().ifPresent(failure -> object.setString("hardwareFailureDescription", failure)); object.setBool("wantToRetire", node.status().wantToRetire()); object.setBool("wantToDeprovision", node.status().wantToDeprovision()); |