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

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


     
      if (map == null || map.size() == 0)
         return null;
     
      NodeWithCLBMetadata nodeWithCLBMetadata = Iterables.get(map.values(), 0);
      Node node = Node.builder()
            .address(nodeWithCLBMetadata.getAddress())
            .port(nodeWithCLBMetadata.getPort())
            .condition(nodeWithCLBMetadata.getCondition())
            .type(nodeWithCLBMetadata.getType())
            .weight(nodeWithCLBMetadata.getWeight())
View Full Code Here


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

      Node node = api.get(410);
      assertEquals(node, testNode());
   }
View Full Code Here

      return metadata;
   }

   private Set<Node> getExpectedNodes() {
      Node node1 = Node.builder()
            .id(410)
            .address("10.1.1.1")
            .port(80)
            .condition(Node.Condition.ENABLED)
            .type(Node.Type.PRIMARY)
            .status(Node.Status.ONLINE)
            .weight(3)
            .build();

      Node node2 = Node.builder()
            .id(411)
            .address("10.1.1.2")
            .port(80)
            .condition(Node.Condition.ENABLED)
            .type(Node.Type.SECONDARY)
            .status(Node.Status.ONLINE)
            .weight(8)
            .build();

      Node node3 = Node.builder()
            .id(412)
            .address("10.1.1.3")
            .port(80)
            .condition(Node.Condition.DISABLED)
            .type(Node.Type.PRIMARY)
View Full Code Here

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

      SSLTermination sslTermination = api.get();
      assertEquals(sslTermination, getSSLTermination());
   }
View Full Code Here

            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(NOT_FOUND.getStatusCode()).build()
      ).getSSLTerminationApiForZoneAndLoadBalancer("DFW", 2000);

      SSLTermination sslTermination = api.get();
      assertNull(sslTermination);
   }
View Full Code Here

      String privateKey = Strings2.toStringAndClose(
            SSLTerminationApiExpectTest.class.getResourceAsStream("/ssltermination-privatekey.txt"));
      String intermediateCertificate = Strings2.toStringAndClose(
            SSLTerminationApiExpectTest.class.getResourceAsStream("/ssltermination-intermediatecertificate.txt"));
     
      SSLTermination sslTermination = SSLTermination.builder()
            .enabled(true)
            .secureTrafficOnly(false)
            .securePort(443)
            .certificate(certificate)
            .privatekey(privateKey)
View Full Code Here

   public void testCreateAndGetSSLTermination() throws Exception {
      api.getSSLTerminationApiForZoneAndLoadBalancer(zone, lb.getId()).createOrUpdate(
            SSLTerminationApiExpectTest.getSSLTermination());
      assertTrue(awaitAvailable(api.getLoadBalancerApiForZone(zone)).apply(lb));
     
      SSLTermination sslTermination =
            api.getSSLTerminationApiForZoneAndLoadBalancer(zone, lb.getId()).get();

      assertEquals(sslTermination, SSLTerminationApiExpectTest.getSSLTermination());
   }
View Full Code Here

   @Test(dependsOnMethods = "testCreateAndGetSSLTermination")
   public void testRemoveAndGetSSLTermination() throws Exception {
      assertTrue(api.getSSLTerminationApiForZoneAndLoadBalancer(zone, lb.getId()).delete());
      assertTrue(awaitAvailable(api.getLoadBalancerApiForZone(zone)).apply(lb));
     
      SSLTermination sslTermination =
            api.getSSLTerminationApiForZoneAndLoadBalancer(zone, lb.getId()).get();
     
      assertNull(sslTermination);
   }
View Full Code Here

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

      SessionPersistence sessionPersistence = api.get();
      assertEquals(sessionPersistence, SessionPersistence.HTTP_COOKIE);
   }
View Full Code Here

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

      SessionPersistence sessionPersistence = api.get();
      assertNull(sessionPersistence);
   }
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.