Package org.jclouds.dynect.v3.domain

Examples of org.jclouds.dynect.v3.domain.Record$ConcreteBuilder


        .id(50976579l).build();

   public void testGetNSWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, getNS, nsResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").getNS(nsId.getFQDN(), nsId.getId()).toString(),
                   new GetNSRecordResponseTest().expected().toString());
   }
View Full Code Here


        .id(50976579l).build();

   public void testGetPTRWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, getPTR, ptrResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").getPTR(ptrId.getFQDN(), ptrId.getId()).toString(),
                   new GetPTRRecordResponseTest().expected().toString());
   }
View Full Code Here

                            .id(50976579l).build();

   public void testGetWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, getSOA, soaResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").get(soaId).toString(),
                   new GetRecordResponseTest().expected().toString());
   }
View Full Code Here

   }

   public void testGetSOAWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, getSOA, soaResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").getSOA(soaId.getFQDN(), soaId.getId()).toString(),
                   new GetSOARecordResponseTest().expected().toString());
   }
View Full Code Here

      domainId = domain.getId();
   }

   @Test(dependsOnMethods = "testCreateDomain")
   public void testCreateReverseDNSRecords() throws Exception {
      Record createPTRRecordIPv4 = Record.builder().type("PTR").name(JCLOUDS_EXAMPLE).data(serverIPv4).ttl(11235)
            .build();

      Record createPTRRecordIPv6 = Record.builder().type("PTR").name(JCLOUDS_EXAMPLE).data(serverIPv6)
            .comment("Hello IPv6").build();

      List<Record> createRecords = ImmutableList.of(createPTRRecordIPv4, createPTRRecordIPv6);
      Set<RecordDetail> records = awaitComplete(api,
            api.getReverseDNSApiForService(CLOUD_SERVERS_OPEN_STACK).create(serverURI, createRecords));
View Full Code Here

      assertEquals(records.size(), 2);
   }

   @Test(dependsOnMethods = "testListReverseDNSRecords")
   public void testUpdateAndGetReverseDNSRecords() throws Exception {
      Record updatePTRRecordIPv4 = Record.builder().type("PTR").name(JCLOUDS_EXAMPLE).data(serverIPv4).ttl(12358)
            .build();

      Map<String, Record> idsToRecords = ImmutableMap.<String, Record> of(ptrRecordIPv4Id, updatePTRRecordIPv4);

      awaitComplete(api, api.getReverseDNSApiForService(CLOUD_SERVERS_OPEN_STACK).update(serverURI, idsToRecords));
View Full Code Here

      domainId = domain.getId();
   }  

   @Test(dependsOnMethods = "testCreateDomain")
   public void testCreateRecords() throws Exception {
      Record createMXRecord = Record.builder()
            .type("MX")
            .name(JCLOUDS_EXAMPLE)
            .data("mail." + JCLOUDS_EXAMPLE)
            .comment("MX Record")
            .priority(11235)
            .build();
     
      Record createARecord = Record.builder()
            .type("A")
            .name(JCLOUDS_EXAMPLE)
            .data("10.0.0.1")
            .build();
     
      Record createSRVRecord = Record.builder()
            .type("SRV")
            .name("_sip._tcp." + JCLOUDS_EXAMPLE)
            .ttl(86400)
            .data("1 3443 sip." + JCLOUDS_EXAMPLE) // weight port target
            .priority(11235)
View Full Code Here

      assertTrue(record.getUpdated().before(now));
   }

   @Test(dependsOnMethods = "testGetRecord")
   public void testUpdateRecord() throws Exception {     
      Record record = Record.builder()
            .name("_sip._udp." + JCLOUDS_EXAMPLE)
            .ttl(86401)
            .data("1 3444 sip." + JCLOUDS_EXAMPLE) // weight port target
            .priority(12358)
            .comment("Updated Protocol to UDP")
View Full Code Here

  
   static List<UpdateRecord> toUpdateRecordList(Map<String, Record> idsToRecords) {
      List<UpdateRecord> updateRecords = Lists.newArrayList();

      for (String recordId: idsToRecords.keySet()) {
         Record record = idsToRecords.get(recordId);
        
         UpdateRecord updateRecord = new UpdateRecord();
         updateRecord.id = recordId;
         updateRecord.name = record.getName();
         updateRecord.ttl = record.getTTL().isPresent() ? record.getTTL().get() : null;
         updateRecord.data = record.getData();
         updateRecord.priority = record.getPriority();
         updateRecord.comment = record.getComment();
        
         updateRecords.add(updateRecord);
      }
     
      return updateRecords;
View Full Code Here

               .endpoint(endpoint)
               .build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/domain-create-response.json")).build())
            .getDomainApi();

      Record createMXRecord = Record.builder()
            .type("MX")
            .name(JCLOUDS_EXAMPLE)
            .data("mail." + JCLOUDS_EXAMPLE)
            .priority(11235)
            .build();
     
      Record createARecord = Record.builder()
            .type("A")
            .name(JCLOUDS_EXAMPLE)
            .data("10.0.0.1")
            .build();
     
View Full Code Here

TOP

Related Classes of org.jclouds.dynect.v3.domain.Record$ConcreteBuilder

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.