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

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


*/
@Test(groups = "unit", testName = "CloudLoadBalancersApiMetadataTest")
public class CloudLoadBalancersApiMetadataTest extends BaseLoadBalancerServiceApiMetadataTest {

   public CloudLoadBalancersApiMetadataTest() {
      super(new CloudLoadBalancersApiMetadata());
   }
View Full Code Here


   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder(){
         id("rackspace-cloudloadbalancers-us")
         .name("Rackspace Cloud Load Balancers US")
         .apiMetadata(new CloudLoadBalancersApiMetadata().toBuilder()
                  .defaultEndpoint("https://identity.api.rackspacecloud.com/v2.0/")
                  .build())
         .homepage(URI.create("http://www.rackspace.com/cloud/public/loadbalancers/"))
         .console(URI.create("https://mycloud.rackspace.com"))
         .linkedServices("rackspace-cloudservers-us", "cloudfiles-us", "rackspace-cloudblockstorage-us")
View Full Code Here

*/
@Test(groups = "unit", testName = "CloudLoadBalancersUSProviderTest")
public class CloudLoadBalancersUSProviderTest extends BaseProviderMetadataTest {

   public CloudLoadBalancersUSProviderTest() {
      super(new CloudLoadBalancersUSProviderMetadata(), new CloudLoadBalancersApiMetadata());
   }
View Full Code Here

*/
@Test(groups = "unit", testName = "CloudLoadBalancersUKProviderTest")
public class CloudLoadBalancersUKProviderTest extends BaseProviderMetadataTest {

   public CloudLoadBalancersUKProviderTest() {
      super(new CloudLoadBalancersUKProviderMetadata(), new CloudLoadBalancersApiMetadata());
   }
View Full Code Here

   }
  
   @Test(dependsOnMethods = "testCreateAccessList")
   public void testRemoveSingleAccessRule() throws Exception {
      Iterable<AccessRuleWithId> actualAccessList = api.getAccessRuleApiForZoneAndLoadBalancer(zone, lb.getId()).list();
      AccessRuleWithId removedAccessRule = Iterables.getFirst(actualAccessList, null);
      accessRules.remove(removedAccessRule.getAddress());
     
      assertTrue(api.getAccessRuleApiForZoneAndLoadBalancer(zone, lb.getId()).delete(removedAccessRule.getId()));
      assertTrue(awaitAvailable(api.getLoadBalancerApiForZone(zone)).apply(lb));
     
      assertExpectedAccessRules(accessRules);
   }
View Full Code Here

   }
  
   @Test(dependsOnMethods = "testRemoveSingleAccessRule")
   public void testRemoveManyAccessRules() throws Exception {
      Iterable<AccessRuleWithId> actualAccessList = api.getAccessRuleApiForZoneAndLoadBalancer(zone, lb.getId()).list();
      AccessRuleWithId removedAccessRule1 = Iterables.getFirst(actualAccessList, null);
      AccessRuleWithId removedAccessRule2 = Iterables.getLast(actualAccessList);
      List<Integer> removedAccessRuleIds = ImmutableList.<Integer> of(removedAccessRule1.getId(), removedAccessRule2.getId());
      accessRules.remove(removedAccessRule1.getAddress());
      accessRules.remove(removedAccessRule2.getAddress());
     
      assertTrue(api.getAccessRuleApiForZoneAndLoadBalancer(zone, lb.getId()).delete(removedAccessRuleIds));
      assertTrue(awaitAvailable(api.getLoadBalancerApiForZone(zone)).apply(lb));
     
      assertExpectedAccessRules(accessRules);
View Full Code Here

            .healthMonitor(HealthMonitor.builder().type(Type.CONNECT).delay(10).timeout(5).attemptsBeforeDeactivation(2).build())
            .sslTermination(SSLTermination.builder().enabled(true).secureTrafficOnly(false).securePort(443).build())
            .sourceAddresses(SourceAddresses.builder().ipv6Public("2001:4800:7901::5/64").ipv4Public("174.143.139.137").ipv4Servicenet("10.183.250.137").build())
            .connectionThrottle(ConnectionThrottle.builder().maxConnections(100).minConnections(10).maxConnectionRate(50).rateInterval(60).build())
            .accessRules(ImmutableSet.of(
                  new AccessRuleWithId(22215, "1.2.3.4/32", AccessRule.Type.DENY),
                  new AccessRuleWithId(22217, "12.0.0.0/8", AccessRule.Type.ALLOW)))
            .virtualIPs(ImmutableSet.of(
                  new VirtualIPWithId(VirtualIP.Type.PUBLIC, VirtualIP.IPVersion.IPV4, 1000, "206.10.10.210"),
                  new VirtualIPWithId(VirtualIP.Type.PUBLIC, VirtualIP.IPVersion.IPV6, 1001, "2001:4800:7901:0000:9a32:3c2a:0000:0001")))
            .nodes(ImmutableSet.of(
                  Node.builder().id(1041).address("10.1.1.1").port(80).condition(Node.Condition.ENABLED).status(Node.Status.ONLINE).build(),
View Full Code Here

      accessRules.put(accessRule3.getAddress(), accessRule3);
      accessRules.put(accessRule4.getAddress(), accessRule4);
   }

   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 = "ORD";//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

      accessRules.put(accessRule4.getAddress(), accessRule4);
   }

   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 = "ORD";//Iterables.getFirst(api.getConfiguredZones(), null);
      lb = api.getLoadBalancerApiForZone(zone).create(createLB);
     
View Full Code Here

TOP

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

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.