Package com.amazonaws.services.route53.model

Examples of com.amazonaws.services.route53.model.Change


  }

  private AmazonRoute53 newClient() {

    final AmazonRoute53 amazonClient = new AmazonRoute53Client(credentials);

    return amazonClient;

  }
View Full Code Here


        this(config.get("aws.route53.access"), config.get("aws.route53.secret"));
    }

    public AwsRoute53Client(String accessKey, String secretKey) {
        BasicAWSCredentials awsCredentials = new BasicAWSCredentials(accessKey, secretKey);
        this.restClient = new AmazonRoute53Client(awsCredentials);
    }
View Full Code Here

  }

  private AmazonRoute53 newClient() {

    final AmazonRoute53 amazonClient = new AmazonRoute53Client(credentials);

    return amazonClient;

  }
View Full Code Here

            int originalCount = hcrr.size();
            hcrr.addAll(hcrr.subList(0, recordsPerRecordSet - 1));

            /* Pick overlapping slices across the pseudo-ring */
            for (int i = 0; i < originalCount; i++) {
                AnswerSet answer = new AnswerSet();
                answer.addAll(hcrr.subList(i, i + recordsPerRecordSet));
                rrs.addAll(answer.toResourceRecordSets(hostedZoneId, name, type, ttl));
            }

            return rrs;
        }

        /*
         * We have <= recordsPerRecordSet records. Add an answer with all of
         * them, and secondary answers covering each record failure.
         */
        AnswerSet answer = new AnswerSet();
        answer.addAll(hcrr);
        rrs.addAll(answer.toResourceRecordSets(hostedZoneId, name, type, ttl));

        for (List<HealthCheckedResourceRecord> fragment : new IterableSubListGenerator<HealthCheckedResourceRecord>(
                records, recordsPerRecordSet - 1)) {
            answer = new AnswerSet();
            answer.addAll(fragment);
            rrs.addAll(answer.toResourceRecordSets(hostedZoneId, name, type, ttl));
            rrs.get(rrs.size() - 1).setWeight(0L);
        }

        return rrs;
    }
View Full Code Here

public class AnswerSetTests {

    @Test
    public void testOrdering() {
        AnswerSet answer = new AnswerSet();
        answer.add(new ComparableResourceRecord("3.3.3.3"));
        answer.add(new ComparableResourceRecord("2.2.2.2"));
        answer.add(new ComparableResourceRecord("1.1.1.1"));

        if (answer.add(new ComparableResourceRecord("1.1.1.1"))) {
            fail("Duplicate record accepted");
        }

        ComparableResourceRecord[] records = new ComparableResourceRecord[3];
        answer.toArray(records);
        assertEquals(records[0].getValue(), "1.1.1.1");
        assertEquals(records[1].getValue(), "2.2.2.2");
        assertEquals(records[2].getValue(), "3.3.3.3");
    }
View Full Code Here

        assertEquals(records[2].getValue(), "3.3.3.3");
    }

    @Test
    public void testSimpleRRSet() {
        AnswerSet answer = new AnswerSet();
        answer.add(new ComparableResourceRecord("3.3.3.3"));
        answer.add(new ComparableResourceRecord("2.2.2.2"));
        answer.add(new ComparableResourceRecord("1.1.1.1"));

        assertEquals(1, answer.toResourceRecordSets("Z123", "www.example.com", "A", 60L).size());
        ResourceRecordSet rrset = answer.toResourceRecordSets("Z123", "www.example.com", "A", 60L).get(0);
        assertEquals(new Long(60L), rrset.getTTL());
        assertEquals("A", rrset.getType());
        assertEquals("www.example.com", rrset.getName());
        assertEquals("1.1.1.1", rrset.getResourceRecords().get(0).getValue());
        assertEquals("2.2.2.2", rrset.getResourceRecords().get(1).getValue());
View Full Code Here

        assertEquals("3.3.3.3", rrset.getResourceRecords().get(2).getValue());
    }

    @Test
    public void testHealthCheckedRRSet() {
        AnswerSet answer = new AnswerSet();
        answer.add(new HealthCheckedResourceRecord("hcid1", "3.3.3.3"));
        answer.add(new HealthCheckedResourceRecord("hcid2", "2.2.2.2"));
        answer.add(new HealthCheckedResourceRecord("hcid3", "1.1.1.1"));

        List<ResourceRecordSet> rrsets = answer.toResourceRecordSets("Z123", "www.example.com", "A", 60L);
        assertEquals(3, rrsets.size());

        /* First rrset should be the leafnode */
        assertEquals(new Long(60L), rrsets.get(0).getTTL());
        assertEquals("A", rrsets.get(0).getType());
View Full Code Here

public class AnswerSetTests {

    @Test
    public void testOrdering() {
        AnswerSet answer = new AnswerSet();
        answer.add(new ComparableResourceRecord("3.3.3.3"));
        answer.add(new ComparableResourceRecord("2.2.2.2"));
        answer.add(new ComparableResourceRecord("1.1.1.1"));

        if (answer.add(new ComparableResourceRecord("1.1.1.1"))) {
            fail("Duplicate record accepted");
        }

        ComparableResourceRecord[] records = new ComparableResourceRecord[3];
        answer.toArray(records);
View Full Code Here

    }

    @Test
    public void testSimpleRRSet() {
        AnswerSet answer = new AnswerSet();
        answer.add(new ComparableResourceRecord("3.3.3.3"));
        answer.add(new ComparableResourceRecord("2.2.2.2"));
        answer.add(new ComparableResourceRecord("1.1.1.1"));

        assertEquals(1, answer.toResourceRecordSets("Z123", "www.example.com", "A", 60L).size());
        ResourceRecordSet rrset = answer.toResourceRecordSets("Z123", "www.example.com", "A", 60L).get(0);
        assertEquals(new Long(60L), rrset.getTTL());
        assertEquals("A", rrset.getType());
View Full Code Here

    }

    @Test
    public void testHealthCheckedRRSet() {
        AnswerSet answer = new AnswerSet();
        answer.add(new HealthCheckedResourceRecord("hcid1", "3.3.3.3"));
        answer.add(new HealthCheckedResourceRecord("hcid2", "2.2.2.2"));
        answer.add(new HealthCheckedResourceRecord("hcid3", "1.1.1.1"));

        List<ResourceRecordSet> rrsets = answer.toResourceRecordSets("Z123", "www.example.com", "A", 60L);
        assertEquals(3, rrsets.size());

        /* First rrset should be the leafnode */
 
View Full Code Here

TOP

Related Classes of com.amazonaws.services.route53.model.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.