Package org.jclouds.route53.domain

Examples of org.jclouds.route53.domain.Change


         checkAllRRs(zone.getId());
      }
   }

   private void checkAllRRs(String zoneId) {
      HostedZone zone = api.getHostedZoneApi().get(zoneId).getZone();
      List<ResourceRecordSet> records = api(zone.getId()).list().concat().toList();
      assertEquals(zone.getResourceRecordSetCount(), records.size());

      for (ResourceRecordSet rrs : records) {
         recordTypeCounts.getUnchecked(rrs.getType()).addAndGet(
               rrs.getAliasTarget().isPresent() ? 1 : rrs.getValues().size());
         checkRRS(rrs);
View Full Code Here


public class GetHostedZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/hosted_zone.xml");

      HostedZoneAndNameServers expected = expected();

      GetHostedZoneResponseHandler handler = injector.getInstance(GetHostedZoneResponseHandler.class);
      HostedZoneAndNameServers result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

      this.changeHandler = changeHandler;
   }

   @Override
   public NewHostedZone getResult() {
      HostedZoneAndNameServers zone = zoneHandler.getResult();
      return NewHostedZone.create(zone, changeHandler.getResult());
   }
View Full Code Here

public class GetHostedZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/hosted_zone.xml");

      HostedZoneAndNameServers expected = expected();

      GetHostedZoneResponseHandler handler = injector.getInstance(GetHostedZoneResponseHandler.class);
      HostedZoneAndNameServers result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

   @Test
   public void testCreateAndDeleteHostedZone() {
      String name = System.getProperty("user.name").replace('.', '-') + ".zone.route53test.jclouds.org.";
      String nonce = name + " @ " + new Date();
      String comment = name + " for " + JcloudsVersion.get();
      NewHostedZone newHostedZone = api().createWithReferenceAndComment(name, nonce, comment);
      getAnonymousLogger().info("created zone: " + newHostedZone);
      try {
         checkHostedZone(newHostedZone.getZone());
         assertEquals(newHostedZone.getChange().getStatus(), PENDING, "invalid status on zone " + newHostedZone);
         assertTrue(newHostedZone.getNameServers().size() > 0, "no name servers for zone " + newHostedZone);
         assertEquals(newHostedZone.getZone().getName(), name);
         assertEquals(newHostedZone.getZone().getCallerReference(), nonce);
         assertEquals(newHostedZone.getZone().getComment().get(), comment);
        
         assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone);
      } finally {
         Change delete = api().delete(newHostedZone.getZone().getId());
         assertTrue(inSync.apply(delete), "delete didn't sync " + delete);
      }
   }
View Full Code Here

public class CreateHostedZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/new_zone.xml");

      NewHostedZone expected = expected();

      CreateHostedZoneResponseHandler handler = injector.getInstance(CreateHostedZoneResponseHandler.class);
      NewHostedZone result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

   private String recreateZone(String name) {
      clearAndDeleteHostedZonesNamed(name);
      String nonce = name + " @ " + new Date();
      String comment = name + " for " + JcloudsVersion.get();
      NewHostedZone newHostedZone = api.getHostedZoneApi()
            .createWithReferenceAndComment(name, nonce, comment);
      getAnonymousLogger().info("created zone: " + newHostedZone);
      assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone);
      return newHostedZone.getZone().getId();
   }
View Full Code Here

   @Test
   public void testCreateAndDeleteHostedZone() {
      String name = System.getProperty("user.name").replace('.', '-') + ".zone.route53test.jclouds.org.";
      String nonce = name + " @ " + new Date();
      String comment = name + " for " + JcloudsVersion.get();
      NewHostedZone newHostedZone = api().createWithReferenceAndComment(name, nonce, comment);
      getAnonymousLogger().info("created zone: " + newHostedZone);
      try {
         checkHostedZone(newHostedZone.getZone());
         assertEquals(newHostedZone.getChange().getStatus(), PENDING, "invalid status on zone " + newHostedZone);
         assertTrue(newHostedZone.getNameServers().size() > 0, "no name servers for zone " + newHostedZone);
         assertEquals(newHostedZone.getZone().getName(), name);
         assertEquals(newHostedZone.getZone().getCallerReference(), nonce);
         assertEquals(newHostedZone.getZone().getComment().get(), comment);
        
         assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone);
      } finally {
         Change delete = api().delete(newHostedZone.getZone().getId());
         assertTrue(inSync.apply(delete), "delete didn't sync " + delete);
      }
   }
View Full Code Here

   @Test
   public void testCreateAndDeleteHostedZone() {
      String name = System.getProperty("user.name").replace('.', '-') + ".zone.route53test.jclouds.org.";
      String nonce = name + " @ " + new Date();
      String comment = name + " for " + JcloudsVersion.get();
      NewHostedZone newHostedZone = api().createWithReferenceAndComment(name, nonce, comment);
      getAnonymousLogger().info("created zone: " + newHostedZone);
      try {
         checkHostedZone(newHostedZone.getZone());
         assertEquals(newHostedZone.getChange().getStatus(), PENDING, "invalid status on zone " + newHostedZone);
         assertTrue(newHostedZone.getNameServers().size() > 0, "no name servers for zone " + newHostedZone);
         assertEquals(newHostedZone.getZone().getName(), name);
         assertEquals(newHostedZone.getZone().getCallerReference(), nonce);
         assertEquals(newHostedZone.getZone().getComment().get(), comment);
        
         assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone);
      } finally {
         Change delete = api().delete(newHostedZone.getZone().getId());
         assertTrue(inSync.apply(delete), "delete didn't sync " + delete);
      }
   }
View Full Code Here

public class CreateHostedZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/new_zone.xml");

      NewHostedZone expected = expected();

      CreateHostedZoneResponseHandler handler = injector.getInstance(CreateHostedZoneResponseHandler.class);
      NewHostedZone result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.route53.domain.Change

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.