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

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


            .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

      }

      @Override
      protected Function<Object, IterableWithMarker<LoadBalancerUsage>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.isPresent() ? arg0.get().toString() : null;
         final ReportApi reportApi = api.getReportApiForZone(zone);
        
         return new Function<Object, IterableWithMarker<LoadBalancerUsage>>() {

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

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

      }

      @Override
      protected Function<Object, IterableWithMarker<LoadBalancerUsage>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.get().toString();
         final ReportApi reportApi = api.getReportApiForZone(zone);
        
         return new Function<Object, IterableWithMarker<LoadBalancerUsage>>() {

            @Override
            public IterableWithMarker<LoadBalancerUsage> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               IterableWithMarker<LoadBalancerUsage> list = reportApi.listLoadBalancerUsage(paginationOptions);
               return list;
            }

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

*/
@Test(groups = "unit")
public class ListOptionsTest {

   public void testMarker() {
      ListOptions options = new ListOptions().marker("1");
      assertEquals(ImmutableList.of("1"), options.buildQueryParameters().get("marker"));
   }
View Full Code Here

      assertEquals(ImmutableList.of("1"), options.buildQueryParameters().get("marker"));
   }

   public void testLimit() {
      int limit = 1;
      ListOptions options = new ListOptions().limit(limit);
      assertEquals(ImmutableList.of("1"), options.buildQueryParameters().get("limit"));
   }
View Full Code Here

      ListOptions options = new ListOptions().limit(limit);
      assertEquals(ImmutableList.of("1"), options.buildQueryParameters().get("limit"));
   }

   public void testMarkerStatic() {
      ListOptions options = marker("1");
      assertEquals(ImmutableList.of("1"), options.buildQueryParameters().get("marker"));
   }
View Full Code Here

      ListOptions options = marker("1");
      assertEquals(ImmutableList.of("1"), options.buildQueryParameters().get("marker"));
   }

   public void testLimitStatic() {
      ListOptions options = limit(1);
      assertEquals(ImmutableList.of("1"), options.buildQueryParameters().get("limit"));
   }
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.