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

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


            responseWithAccess,
            authenticatedGET().method(PUT).payload(payloadFromResource("/loadbalancer-update.json")).endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(ACCEPTED.getStatusCode()).payload("").build()
      ).getLoadBalancerApiForZone("DFW");

      UpdateLoadBalancer updateLB = UpdateLoadBalancer.builder()
            .name("foo")
            .protocol("HTTPS")
            .port(443)
            .algorithm(LoadBalancer.Algorithm.RANDOM)
            .build();
View Full Code Here


            responseWithAccess,
            authenticatedGET().method(PUT).payload(payloadFromResource("/loadbalancer-update.json")).endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(ACCEPTED.getStatusCode()).payload("").build()
      ).getLoadBalancerApiForZone("DFW");

      UpdateLoadBalancer updateLB = UpdateLoadBalancer.builder()
            .name("foo")
            .protocol("HTTPS")
            .port(443)
            .algorithm(LoadBalancer.Algorithm.RANDOM)
            .build();
View Full Code Here

            responseWithAccess,
            authenticatedGET().method(PUT).payload(payloadFromResource("/node-update.json")).endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).build()
      ).getNodeApiForZoneAndLoadBalancer("DFW", 2000);

      UpdateNode updateNode = UpdateNode.builder()
            .condition(Node.Condition.DISABLED)
            .type(Node.Type.SECONDARY)
            .weight(20)
            .build();
View Full Code Here

            responseWithAccess,
            authenticatedGET().method(PUT).payload(payloadFromResource("/node-update.json")).endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).build()
      ).getNodeApiForZoneAndLoadBalancer("DFW", 2000);

      UpdateNode updateNode = UpdateNode.builder()
            .condition(Node.Condition.DISABLED)
            .type(Node.Type.SECONDARY)
            .weight(20)
            .build();
View Full Code Here

                  .port(80)
                  .algorithm(Algorithm.RANDOM)
                  .status(Status.ACTIVE)
                  .nodeCount(1)
                  .virtualIPs(ImmutableSet.of(
                        new VirtualIPWithId(VirtualIP.Type.PUBLIC, VirtualIP.IPVersion.IPV4, 403, "206.55.130.1")))
                  .created(new SimpleDateFormatDateService().iso8601SecondsDateParse("2010-11-30T03:23:42Z"))
                  .updated(new SimpleDateFormatDateService().iso8601SecondsDateParse("2010-11-30T03:23:44Z"))
                  .uri(URI.create("https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/123123/loadbalancers/71")).build(),
            LoadBalancer
                  .builder()
                  .region("DFW")
                  .name("lb-site2")
                  .id(166)
                  .protocol("HTTP")
                  .port(80)
                  .algorithm(Algorithm.RANDOM)
                  .status(Status.ACTIVE)
                  .nodeCount(1)
                  .virtualIPs(ImmutableSet.of(
                        new VirtualIPWithId(VirtualIP.Type.PUBLIC, VirtualIP.IPVersion.IPV4, 401, "206.55.130.2")))
                  .created(new SimpleDateFormatDateService().iso8601SecondsDateParse("2010-11-30T03:23:42Z"))
                  .updated(new SimpleDateFormatDateService().iso8601SecondsDateParse("2010-11-30T03:23:44Z"))
                  .uri(URI.create("https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/123123/loadbalancers/166")).build());
   }
View Full Code Here

            .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(),
                  Node.builder().id(1411).address("10.1.1.2").port(80).condition(Node.Condition.ENABLED).status(Node.Status.ONLINE).build()))
            .sessionPersistenceType(SessionPersistence.HTTP_COOKIE)
            .clusterName("c1.dfw1")
View Full Code Here

            .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(),
                  Node.builder().id(1411).address("10.1.1.2").port(80).condition(Node.Condition.ENABLED).status(Node.Status.ONLINE).build()))
            .sessionPersistenceType(SessionPersistence.HTTP_COOKIE)
            .clusterName("c1.dfw1")
View Full Code Here

   @Override
   @AfterGroups(groups = "live")
   protected void tearDown() {
      for (Entry<LoadBalancer, Set<Node>> entry : nodes.entrySet()) {
         LoadBalancer lb = entry.getKey();
         LoadBalancerApi lbClient = api.getLoadBalancerApiForZone(lb.getRegion());

         if (lbClient.get(lb.getId()).getStatus() != Status.DELETED) {
            assertTrue(awaitAvailable(api.getLoadBalancerApiForZone(lb.getRegion())).apply(lb));
            lbClient.delete(lb.getId());
         }
         assertTrue(awaitDeleted(api.getLoadBalancerApiForZone(lb.getRegion())).apply(lb));
      }
      super.tearDown();
   }
View Full Code Here

      }

      @Override
      protected Function<Object, IterableWithMarker<LoadBalancer>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.isPresent() ? arg0.get().toString() : null;
         final LoadBalancerApi loadBalancerApi = api.getLoadBalancerApiForZone(zone);
        
         return new Function<Object, IterableWithMarker<LoadBalancer>>() {

            @Override
            public IterableWithMarker<LoadBalancer> apply(Object input) {
               IterableWithMarker<LoadBalancer> list = loadBalancerApi.list(marker(input.toString()));
               return list;
            }

            @Override
            public String toString() {
View Full Code Here

      }

      @Override
      protected Function<Object, IterableWithMarker<Node>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.isPresent() ? arg0.get().toString() : null;
         final NodeApi nodeApi = api.getNodeApiForZoneAndLoadBalancer(zone, lbId);
        
         return new Function<Object, IterableWithMarker<Node>>() {

            @Override
            public IterableWithMarker<Node> apply(Object input) {
               IterableWithMarker<Node> list = nodeApi.list(marker(input.toString()));
               return list;
            }

            @Override
            public String toString() {
View Full Code Here

TOP

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

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.