private static StorageNode createStorageNode(DeployState deployState, ContentCluster parent, HostResource hostResource, StorageGroup parentGroup, ClusterMembership clusterMembership) {
            StorageNode sNode = new StorageNode(deployState.getProperties(), parent.getStorageCluster(), null, clusterMembership.index(), clusterMembership.retired());
            sNode.setHostResource(hostResource);
            sNode.initService(deployState);

            // TODO: Supplying null as XML is not very nice
            PersistenceEngine provider = parent.getPersistence().create(deployState, sNode, parentGroup, null);
            Distributor d = new Distributor(deployState.getProperties(), parent.getDistributorNodes(), clusterMembership.index(), null, provider);
            d.setHostResource(sNode.getHostResource());
            d.initService(deployState);
            return sNode;
        }
Creates a content group builder from a group and/or nodes element.
These are the possibilities:
<ul>
<li>group and nodes is present: This is a leaf group specifying a set of nodes</li>
<li>only group is present: This is a nonleaf group</li>
<li>only nodes is present: This is the implicitly specified toplevel leaf group, or a set of groups
                           specified using a group count attribute.
<li>Neither element is present: Create a single node.
</ul>

Note: DO NOT change allocation behaviour to allow version X and Y of the config-model to allocate a different
set of nodes. Such changes must be guarded by a common condition (e.g. feature flag) so the behaviour can be
changed simultaneously for all active config models.
config-model/src/main/java/com/yahoo/vespa/model/content/StorageGroup.java