Package org.jclouds.route53

Examples of org.jclouds.route53.Route53ApiMetadataTest


   @Override
   public void setup() {
      super.setup();
      inSync = retry(new Predicate<Change>() {
         public boolean apply(Change input) {
            Change change = api.getChange(input.getId());
            return change != null && change.getStatus() == INSYNC;
         }
      }, 600, 1, 5, SECONDS);
   }
View Full Code Here


         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

   private static final SerializeRRS xml = new SerializeRRS();

   @SuppressWarnings("unchecked")
   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      ChangeBatch from = ChangeBatch.class.cast(payload);
      StringBuilder b = new StringBuilder();
      b.append("<ChangeResourceRecordSetsRequest xmlns=\"https://route53.amazonaws.com/doc/2012-02-29/\"><ChangeBatch>");
      if (from.getComment().isPresent())
         b.append("<Comment>").append(from.getComment().get()).append("</Comment>");
      b.append("<Changes>");
      for (ActionOnResourceRecordSet change : from)
         b.append("<Change>").append("<Action>").append(change.getAction()).append("</Action>")
               .append(xml.apply(change.getRRS())).append("</Change>");
      b.append("</Changes>");
View Full Code Here

      public boolean equals(Object obj) {
         if (this == obj)
            return true;
         if (obj == null || getClass() != obj.getClass())
            return false;
         ActionOnResourceRecordSet that = ActionOnResourceRecordSet.class.cast(obj);
         return equal(this.action, that.action) && equal(this.rrs, that.rrs);
      }
View Full Code Here

         this.comment = Optional.fromNullable(comment);
         return this;
      }

      public Builder create(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.CREATE, rrs));
         return this;
      }
View Full Code Here

            create(rrs);
         return this;
      }

      public Builder delete(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.DELETE, rrs));
         return this;
      }
View Full Code Here

      public boolean equals(Object obj) {
         if (this == obj)
            return true;
         if (obj == null || getClass() != obj.getClass())
            return false;
         ActionOnResourceRecordSet that = ActionOnResourceRecordSet.class.cast(obj);
         return equal(this.action, that.action) && equal(this.rrs, that.rrs);
      }
View Full Code Here

         this.comment = Optional.fromNullable(comment);
         return this;
      }

      public Builder create(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.CREATE, rrs));
         return this;
      }
View Full Code Here

            create(rrs);
         return this;
      }

      public Builder delete(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.DELETE, rrs));
         return this;
      }
View Full Code Here

         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

TOP

Related Classes of org.jclouds.route53.Route53ApiMetadataTest

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.