private static ApplicationSpec createApplicationSpec(ConfigModelRepo plugins) {
        ApplicationSpec ret = new ApplicationSpec();

        for (ContentCluster cluster : Content.getContentClusters(plugins)) {
            for (com.yahoo.vespa.model.content.Distributor node : cluster.getDistributorNodes().getChildren().values()) {
                ret.addService(NAME, node.getConfigId() + "/default");
            }
        }

        for (ContainerCluster<?> containerCluster: ContainerModel.containerClusters(plugins)) {
            ContainerDocproc containerDocproc = containerCluster.getDocproc();
            if (containerDocproc != null) {
                createDocprocChainSpec(ret,
                                       containerDocproc.getChains().allChains().allComponents(),
                                       containerCluster.getContainers());
            }
        }

        return ret;
    }
Creates a service index based on the plugins loaded. This means to fill the index with all services known by this
protocol by traversing the plugins.

@param plugins All initialized plugins of the Vespa model
@return the index of all known services
config-model/src/main/java/com/yahoo/vespa/model/routing/DocumentProtocol.java