Package org.jclouds.cloudservers.domain

Examples of org.jclouds.cloudservers.domain.Addresses


   public void testApplyInputStreamDetails() throws UnknownHostException {
      InputStream is = getClass().getResourceAsStream("/test_list_addresses.json");

      UnwrapOnlyJsonValue<Addresses> parser = i.getInstance(Key.get(new TypeLiteral<UnwrapOnlyJsonValue<Addresses>>() {
      }));
      Addresses response = parser.apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());
      List<String> publicAddresses = ImmutableList.of("67.23.10.132", "67.23.10.131");

      List<String> privateAddresses = ImmutableList.of("10.176.42.16");

      assertEquals(response.getPublicAddresses(), publicAddresses);
      assertEquals(response.getPrivateAddresses(), privateAddresses);
   }
View Full Code Here


      assertEquals(response.getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0");
      assertEquals(response.getStatus(), ServerStatus.BUILD);
      assertEquals(response.getProgress(), Integer.valueOf(60));
      List<String> publicAddresses = Lists.newArrayList("67.23.10.132", "67.23.10.131");
      List<String> privateAddresses = Lists.newArrayList("10.176.42.16");
      Addresses addresses1 = Addresses.builder().publicAddresses(publicAddresses).privateAddresses(privateAddresses).build();
      assertEquals(response.getAddresses(), addresses1);
      assertEquals(response.getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1"));

   }
View Full Code Here

      assertEquals(response.get(0).getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0");
      assertEquals(response.get(0).getStatus(), ServerStatus.BUILD);
      assertEquals(response.get(0).getProgress(), Integer.valueOf(60));
      List<String> publicAddresses = Lists.newArrayList("67.23.10.132", "67.23.10.131");
      List<String> privateAddresses = Lists.newArrayList("10.176.42.16");
      Addresses addresses1 = Addresses.builder().privateAddresses(privateAddresses).publicAddresses(publicAddresses).build();
      assertEquals(response.get(0).getAddresses(), addresses1);
      assertEquals(response.get(0).getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1"));
      assertEquals(response.get(1).getId(), 5678);
      assertEquals(response.get(1).getName(), "sample-server2");
      assertEquals(response.get(1).getImageId(), Integer.valueOf(2));
      assertEquals(response.get(1).getFlavorId(), Integer.valueOf(1));
      assertEquals(response.get(1).getHostId(), "9e107d9d372bb6826bd81d3542a419d6");
      assertEquals(response.get(1).getStatus(), ServerStatus.ACTIVE);
      assertEquals(response.get(1).getProgress(), null);
      List<String> publicAddresses2 = Lists.newArrayList("67.23.10.133");
      List<String> privateAddresses2 = Lists.newArrayList("10.176.42.17");
      Addresses addresses2 = Addresses.builder().privateAddresses(privateAddresses2).publicAddresses(publicAddresses2).build();
      assertEquals(response.get(1).getAddresses(), addresses2);
      assertEquals(response.get(1).getMetadata(), ImmutableMap.of("Server Label", "DB 1"));

   }
View Full Code Here

   public void testApplyInputStreamDetails() throws UnknownHostException {
      InputStream is = getClass().getResourceAsStream("/test_list_addresses.json");

      UnwrapOnlyJsonValue<Addresses> parser = i.getInstance(Key.get(new TypeLiteral<UnwrapOnlyJsonValue<Addresses>>() {
      }));
      Addresses response = parser.apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());
      List<String> publicAddresses = ImmutableList.of("67.23.10.132", "67.23.10.131");

      List<String> privateAddresses = ImmutableList.of("10.176.42.16");

      assertEquals(response.getPublicAddresses(), publicAddresses);
      assertEquals(response.getPrivateAddresses(), privateAddresses);
   }
View Full Code Here

      assertEquals(response.getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0");
      assertEquals(response.getStatus(), ServerStatus.BUILD);
      assertEquals(response.getProgress(), Integer.valueOf(60));
      List<String> publicAddresses = Lists.newArrayList("67.23.10.132", "67.23.10.131");
      List<String> privateAddresses = Lists.newArrayList("10.176.42.16");
      Addresses addresses1 = Addresses.builder().publicAddresses(publicAddresses).privateAddresses(privateAddresses).build();
      assertEquals(response.getAddresses(), addresses1);
      assertEquals(response.getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1"));

   }
View Full Code Here

      assertEquals(response.get(0).getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0");
      assertEquals(response.get(0).getStatus(), ServerStatus.BUILD);
      assertEquals(response.get(0).getProgress(), Integer.valueOf(60));
      List<String> publicAddresses = Lists.newArrayList("67.23.10.132", "67.23.10.131");
      List<String> privateAddresses = Lists.newArrayList("10.176.42.16");
      Addresses addresses1 = Addresses.builder().privateAddresses(privateAddresses).publicAddresses(publicAddresses).build();
      assertEquals(response.get(0).getAddresses(), addresses1);
      assertEquals(response.get(0).getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1"));
      assertEquals(response.get(1).getId(), 5678);
      assertEquals(response.get(1).getName(), "sample-server2");
      assertEquals(response.get(1).getImageId(), Integer.valueOf(2));
      assertEquals(response.get(1).getFlavorId(), Integer.valueOf(1));
      assertEquals(response.get(1).getHostId(), "9e107d9d372bb6826bd81d3542a419d6");
      assertEquals(response.get(1).getStatus(), ServerStatus.ACTIVE);
      assertEquals(response.get(1).getProgress(), null);
      List<String> publicAddresses2 = Lists.newArrayList("67.23.10.133");
      List<String> privateAddresses2 = Lists.newArrayList("10.176.42.17");
      Addresses addresses2 = Addresses.builder().privateAddresses(privateAddresses2).publicAddresses(publicAddresses2).build();
      assertEquals(response.get(1).getAddresses(), addresses2);
      assertEquals(response.get(1).getMetadata(), ImmutableMap.of("Server Label", "DB 1"));

   }
View Full Code Here

      assertEquals(response.getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0");
      assertEquals(response.getStatus(), ServerStatus.BUILD);
      assertEquals(response.getProgress(), Integer.valueOf(60));
      List<String> publicAddresses = Lists.newArrayList("67.23.10.132", "67.23.10.131");
      List<String> privateAddresses = Lists.newArrayList("10.176.42.16");
      Addresses addresses1 = Addresses.builder().publicAddresses(publicAddresses).privateAddresses(privateAddresses).build();
      assertEquals(response.getAddresses(), addresses1);
      assertEquals(response.getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1"));

   }
View Full Code Here

      assertEquals(response.get(0).getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0");
      assertEquals(response.get(0).getStatus(), ServerStatus.BUILD);
      assertEquals(response.get(0).getProgress(), Integer.valueOf(60));
      List<String> publicAddresses = Lists.newArrayList("67.23.10.132", "67.23.10.131");
      List<String> privateAddresses = Lists.newArrayList("10.176.42.16");
      Addresses addresses1 = Addresses.builder().privateAddresses(privateAddresses).publicAddresses(publicAddresses).build();
      assertEquals(response.get(0).getAddresses(), addresses1);
      assertEquals(response.get(0).getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1"));
      assertEquals(response.get(1).getId(), 5678);
      assertEquals(response.get(1).getName(), "sample-server2");
      assertEquals(response.get(1).getImageId(), Integer.valueOf(2));
      assertEquals(response.get(1).getFlavorId(), Integer.valueOf(1));
      assertEquals(response.get(1).getHostId(), "9e107d9d372bb6826bd81d3542a419d6");
      assertEquals(response.get(1).getStatus(), ServerStatus.ACTIVE);
      assertEquals(response.get(1).getProgress(), null);
      List<String> publicAddresses2 = Lists.newArrayList("67.23.10.133");
      List<String> privateAddresses2 = Lists.newArrayList("10.176.42.17");
      Addresses addresses2 = Addresses.builder().privateAddresses(privateAddresses2).publicAddresses(publicAddresses2).build();
      assertEquals(response.get(1).getAddresses(), addresses2);
      assertEquals(response.get(1).getMetadata(), ImmutableMap.of("Server Label", "DB 1"));

   }
View Full Code Here

   public void testApplyInputStreamDetails() throws UnknownHostException {
      InputStream is = getClass().getResourceAsStream("/test_list_addresses.json");

      UnwrapOnlyJsonValue<Addresses> parser = i.getInstance(Key.get(new TypeLiteral<UnwrapOnlyJsonValue<Addresses>>() {
      }));
      Addresses response = parser.apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());
      List<String> publicAddresses = ImmutableList.of("67.23.10.132", "67.23.10.131");

      List<String> privateAddresses = ImmutableList.of("10.176.42.16");

      assertEquals(response.getPublicAddresses(), publicAddresses);
      assertEquals(response.getPrivateAddresses(), privateAddresses);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.cloudservers.domain.Addresses

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.