use of com.yahoo.vespa.serviceview.bindings.ModelResponse in project vespa by vespa-engine.
the class ServiceModelTest method setUp.
@Before
public void setUp() {
ModelResponse model = syntheticModelResponse();
this.model = new ServiceModel(model);
}
use of com.yahoo.vespa.serviceview.bindings.ModelResponse in project vespa by vespa-engine.
the class ServiceModelTest method syntheticModelResponse.
static ModelResponse syntheticModelResponse() {
ModelResponse model = new ModelResponse();
HostService h = new HostService();
h.name = "vespa.yahoo.com";
com.yahoo.vespa.serviceview.bindings.Service service0 = new com.yahoo.vespa.serviceview.bindings.Service();
{
service0.clustername = "examplecluster";
service0.clustertype = "somethingservers";
service0.index = 1L;
service0.type = "something";
service0.name = "examplename";
service0.configid = "blblb/lbl.0";
ServicePort port = new ServicePort();
port.number = Defaults.getDefaults().vespaWebServicePort();
port.tags = "state http";
service0.ports = Collections.singletonList(port);
}
com.yahoo.vespa.serviceview.bindings.Service service1 = new com.yahoo.vespa.serviceview.bindings.Service();
{
service1.clustername = "examplecluster";
service1.clustertype = "somethingservers";
service1.index = 2L;
service1.type = "container-clustercontroller";
service1.name = "clustercontroller";
service1.configid = "clustercontroller/lbl.0";
ServicePort port = new ServicePort();
port.number = 4090;
port.tags = "state http";
service1.ports = Collections.singletonList(port);
}
com.yahoo.vespa.serviceview.bindings.Service service2 = new com.yahoo.vespa.serviceview.bindings.Service();
{
service2.clustername = "tralala";
service2.clustertype = "admin";
service2.index = 3L;
service2.type = "configserver";
service2.name = "configservername";
service2.configid = "clustercontroller/lbl.0";
ServicePort port = new ServicePort();
port.number = 5000;
port.tags = "state http";
service2.ports = Collections.singletonList(port);
}
h.services = Arrays.asList(service0, service1, service2);
model.hosts = Collections.singletonList(h);
return model;
}
Aggregations