Package org.jclouds.rackspace.cloudloadbalancers.v1.domain

Examples of org.jclouds.rackspace.cloudloadbalancers.v1.domain.ConnectionThrottle


public class ContentCachingApiLiveTest extends BaseCloudLoadBalancersApiLiveTest {
   private LoadBalancer lb;
   private String zone;

   public void testCreateLoadBalancer() {
      AddNode addNode = AddNode.builder().address("192.168.1.1").port(8080).build();
      CreateLoadBalancer createLB = CreateLoadBalancer.builder()
            .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(addNode).build();

      zone = Iterables.getFirst(api.getConfiguredZones(), null);
      lb = api.getLoadBalancerApiForZone(zone).create(createLB);
View Full Code Here


                  .endpoint(endpoint)
                  .build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/loadbalancer-get.json")).build()
      ).getLoadBalancerApiForZone("DFW");

      AddNode addNode1 = AddNode.builder()
            .address("10.1.1.1")
            .condition(Node.Condition.ENABLED)
            .port(80)
            .build();
     
      AddNode addNode2 = AddNode.builder()
            .address("10.1.1.2")
            .condition(Node.Condition.ENABLED)
            .port(80)
            .build();
     
View Full Code Here

            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/connectionthrottle-get.json")).build()
      ).getConnectionApiForZoneAndLoadBalancer("DFW", 2000);

      ConnectionThrottle connectionThrottle = api.getConnectionThrottle();
      assertEquals(connectionThrottle, getConnectionThrottle());
   }
View Full Code Here

            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/connectionthrottle-get-deleted.json")).build()
      ).getConnectionApiForZoneAndLoadBalancer("DFW", 2000);

      ConnectionThrottle connectionThrottle = api.getConnectionThrottle();
      assertNull(connectionThrottle);
   }
View Full Code Here

     
      api.disableConnectionLogging();
   }  

   public static ConnectionThrottle getConnectionThrottle() {
      ConnectionThrottle connectionThrottle = ConnectionThrottle.builder()
            .maxConnections(100)
            .maxConnectionRate(100)
            .minConnections(10)
            .rateInterval(100)
            .build();
View Full Code Here

   public void testCreateAndGetConnectionThrottling() throws Exception {
      api.getConnectionApiForZoneAndLoadBalancer(zone, lb.getId()).createOrUpdateConnectionThrottle(
            ConnectionApiExpectTest.getConnectionThrottle());
      assertTrue(awaitAvailable(api.getLoadBalancerApiForZone(zone)).apply(lb));
     
      ConnectionThrottle connectionThrottle =
            api.getConnectionApiForZoneAndLoadBalancer(zone, lb.getId()).getConnectionThrottle();

      assertEquals(connectionThrottle, ConnectionApiExpectTest.getConnectionThrottle());
   }
View Full Code Here

   @Test(dependsOnMethods = "testCreateAndGetConnectionThrottling")
   public void testRemoveAndGetConnectionThrottle() throws Exception {
      assertTrue(api.getConnectionApiForZoneAndLoadBalancer(zone, lb.getId()).deleteConnectionThrottle());
      assertTrue(awaitAvailable(api.getLoadBalancerApiForZone(zone)).apply(lb));
     
      ConnectionThrottle connectionThrottle =
            api.getConnectionApiForZoneAndLoadBalancer(zone, lb.getId()).getConnectionThrottle();
     
      assertNull(connectionThrottle);
   }
View Full Code Here

            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/connectionthrottle-get.json")).build()
      ).getConnectionApiForZoneAndLoadBalancer("DFW", 2000);

      ConnectionThrottle connectionThrottle = api.getConnectionThrottle();
      assertEquals(connectionThrottle, getConnectionThrottle());
   }
View Full Code Here

            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/connectionthrottle-get-deleted.json")).build()
      ).getConnectionApiForZoneAndLoadBalancer("DFW", 2000);

      ConnectionThrottle connectionThrottle = api.getConnectionThrottle();
      assertNull(connectionThrottle);
   }
View Full Code Here

     
      api.disableConnectionLogging();
   }  

   public static ConnectionThrottle getConnectionThrottle() {
      ConnectionThrottle connectionThrottle = ConnectionThrottle.builder()
            .maxConnections(100)
            .maxConnectionRate(100)
            .minConnections(10)
            .rateInterval(100)
            .build();
View Full Code Here

TOP

Related Classes of org.jclouds.rackspace.cloudloadbalancers.v1.domain.ConnectionThrottle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.