Search in sources :

Example 1 with UpdateLoadBalancer

use of org.jclouds.rackspace.cloudloadbalancers.v1.domain.UpdateLoadBalancer in project legacy-jclouds-examples by jclouds.

the class UpdateLoadBalancers method updateLoadBalancer.

private void updateLoadBalancer(LoadBalancer loadBalancer) throws TimeoutException {
    System.out.println("Update Load Balancer");
    UpdateLoadBalancer updateLB = UpdateLoadBalancer.builder().name(Constants.NAME + "-update").protocol("HTTPS").port(443).algorithm(LoadBalancer.Algorithm.RANDOM).build();
    lbApi.update(loadBalancer.getId(), updateLB);
    // /jclouds-example/rackspace/src/main/java/org/jclouds/examples/rackspace/Logging.java
    if (!LoadBalancerPredicates.awaitAvailable(lbApi).apply(loadBalancer)) {
        throw new TimeoutException("Timeout on loadBalancer: " + loadBalancer);
    }
    System.out.println("  " + true);
}
Also used : UpdateLoadBalancer(org.jclouds.rackspace.cloudloadbalancers.v1.domain.UpdateLoadBalancer) TimeoutException(java.util.concurrent.TimeoutException)

Aggregations

TimeoutException (java.util.concurrent.TimeoutException)1 UpdateLoadBalancer (org.jclouds.rackspace.cloudloadbalancers.v1.domain.UpdateLoadBalancer)1