Package org.jclouds.route53.domain

Examples of org.jclouds.route53.domain.Change


   @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

public class GetChangeResponseTest extends BaseHandlerTest {

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

      Change expected = expected();

      ChangeHandler handler = injector.getInstance(ChangeHandler.class);
      Change result = factory.create(handler).parse(is);

      assertEquals(result, expected);
      assertEquals(result.getStatus(), expected.getStatus());
      assertEquals(result.getSubmittedAt(), expected.getSubmittedAt());
   }
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

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.