Search in sources :

Example 1 with LoadBalancerDescription

use of com.vmware.photon.controller.model.resources.LoadBalancerDescriptionService.LoadBalancerDescription in project photon-model by vmware.

the class LoadBalancerDescriptionServiceTest method buildValidStartState.

public static LoadBalancerDescription buildValidStartState() {
    LoadBalancerDescription state = new LoadBalancerDescription();
    state.id = UUID.randomUUID().toString();
    state.name = "lbName";
    state.endpointLink = EndpointService.FACTORY_LINK + "/my-endpoint";
    state.computeDescriptionLinks = Arrays.asList(ComputeDescriptionService.FACTORY_LINK + "/a-compute-desc");
    state.networkName = "lb-net";
    state.regionId = "regionId";
    state.tenantLinks = new ArrayList<>();
    state.tenantLinks.add("tenant-linkA");
    RouteConfiguration route1 = new RouteConfiguration();
    route1.protocol = Protocol.HTTP.name();
    route1.port = "80";
    route1.instanceProtocol = Protocol.HTTP.name();
    route1.instancePort = "80";
    route1.healthCheckConfiguration = new HealthCheckConfiguration();
    route1.healthCheckConfiguration.protocol = Protocol.HTTP.name();
    route1.healthCheckConfiguration.port = "80";
    RouteConfiguration route2 = new RouteConfiguration();
    route2.protocol = Protocol.HTTPS.name();
    route2.port = "443";
    route2.instanceProtocol = Protocol.HTTP.name();
    route2.instancePort = "443";
    state.routes = Arrays.asList(route1, route2);
    return state;
}
Also used : HealthCheckConfiguration(com.vmware.photon.controller.model.resources.LoadBalancerDescriptionService.LoadBalancerDescription.HealthCheckConfiguration) RouteConfiguration(com.vmware.photon.controller.model.resources.LoadBalancerDescriptionService.LoadBalancerDescription.RouteConfiguration) LoadBalancerDescription(com.vmware.photon.controller.model.resources.LoadBalancerDescriptionService.LoadBalancerDescription)

Aggregations

LoadBalancerDescription (com.vmware.photon.controller.model.resources.LoadBalancerDescriptionService.LoadBalancerDescription)1 HealthCheckConfiguration (com.vmware.photon.controller.model.resources.LoadBalancerDescriptionService.LoadBalancerDescription.HealthCheckConfiguration)1 RouteConfiguration (com.vmware.photon.controller.model.resources.LoadBalancerDescriptionService.LoadBalancerDescription.RouteConfiguration)1