Search in sources :

Example 1 with ConfigModelContext

use of com.yahoo.config.model.ConfigModelContext in project vespa by vespa-engine.

the class ContentClusterUtils method createCluster.

public static ContentCluster createCluster(String clusterXml, MockRoot root) {
    Document doc = XML.getDocument(clusterXml);
    Admin admin = new Admin(root, new DefaultMonitoring("vespa", 60), new Metrics(), Collections.emptyMap(), false, new FileDistributionConfigProducer(root, new MockFileRegistry(), null));
    ConfigModelContext context = ConfigModelContext.create(null, root.getDeployState(), null, root, null);
    return new ContentCluster.Builder(admin).build(Collections.emptyList(), context, doc.getDocumentElement());
}
Also used : FileDistributionConfigProducer(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer) Metrics(com.yahoo.vespa.model.admin.monitoring.builder.Metrics) DefaultMonitoring(com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring) Document(org.w3c.dom.Document) Admin(com.yahoo.vespa.model.admin.Admin) MockFileRegistry(com.yahoo.config.model.application.provider.MockFileRegistry) ConfigModelContext(com.yahoo.config.model.ConfigModelContext) ContentCluster(com.yahoo.vespa.model.content.cluster.ContentCluster)

Aggregations

ConfigModelContext (com.yahoo.config.model.ConfigModelContext)1 MockFileRegistry (com.yahoo.config.model.application.provider.MockFileRegistry)1 Admin (com.yahoo.vespa.model.admin.Admin)1 DefaultMonitoring (com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring)1 Metrics (com.yahoo.vespa.model.admin.monitoring.builder.Metrics)1 ContentCluster (com.yahoo.vespa.model.content.cluster.ContentCluster)1 FileDistributionConfigProducer (com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer)1 Document (org.w3c.dom.Document)1