diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-02-08 11:59:21 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-02-08 11:59:21 +0100 |
commit | b2a181bdad617a3533ba2f4de2529fe107f830ad (patch) | |
tree | c40fd0521f0b5c03317089716710d1aee7536486 | |
parent | fe0ce8c88845be27203a2ec36ef1ac5e4b30e05a (diff) |
Check isHost instead
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java | 2 | ||||
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodeAclResponse.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java index d6a8f107841..f9a20fb2325 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java @@ -225,7 +225,7 @@ public class NodeRepository extends AbstractComponent { * @return the list of node ACLs */ public List<NodeAcl> getChildAcls(Node host) { - if ( host.type() != NodeType.host) throw new IllegalArgumentException("Only hosts have children"); + if ( host.type().isHost()) throw new IllegalArgumentException("Only hosts have children"); NodeList allNodes = list(); return list().childrenOf(host).asList().stream() .map(childNode -> childNode.acl(allNodes, loadBalancers)) diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodeAclResponse.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodeAclResponse.java index e8002cf41ac..2d2feccc114 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodeAclResponse.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodeAclResponse.java @@ -31,7 +31,7 @@ public class NodeAclResponse extends HttpResponse { super(200); this.nodeRepository = nodeRepository; this.slime = new Slime(); - this.aclsForChildren = request.getBooleanProperty(CHILDREN_REQUEST_PROPERTY); + this.aclsForChildren = request.getBooleanProperty(CHILDREN_REQUEST_PROPERTY); // This is always true? Cursor root = slime.setObject(); String hostname = baseName(request.getUri().getPath()); |