protected void addSubResources(TreeNode<QueryInfo> queryTree,
                                 TreeNode<Set<String>> propertyTree) {

    QueryInfo queryInfo = queryTree.getObject();
    ResourceDefinition resource = queryInfo.getResource();
    Set<SubResourceDefinition> subResources = resource.getSubResourceDefinitions();
    for (SubResourceDefinition subResource : subResources) {
      Set<String> resourceProperties = new HashSet<>();
      populateSubResourceDefaults(subResource, resourceProperties);
      propertyTree.addChild(resourceProperties, subResource.getType().name());
    }
  }
Add available sub resources to property node.

@param queryTree     query tree
@param propertyTree  property tree
ambari-server/src/main/java/org/apache/ambari/server/api/query/render/BaseRenderer.java