private ApplicationMutex parentLockOrNull(NodeType type) {
        return NodeCandidate.canMakeHostExclusive(type, nodeRepository.zone().cloud().allowHostSharing()) ?
               nodeRepository.applications().lock(InfrastructureApplication.withNodeType(type.parentNodeType()).id()) :
               null;
    }
Ensure sufficient nodes are reserved or active for the given application, group and cluster

@param application        the application we are allocating to
@param cluster            the cluster and group we are allocating to
@param requested          a specification of the requested nodes
@return the list of nodes this cluster group will have allocated if activated
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/Preparer.java