Package org.jclouds.ultradns.ws

Examples of org.jclouds.ultradns.ws.UltraDNSWSApi


                                            .mapRegionToTerritories("United States (US)",
                                                  ImmutableSet.of("Maryland", "Texas"))
                                            .build();

   public void testAddRecordIntoNewGroupWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(addRecordIntoNewGroup, recordCreatedResponse);
      assertEquals(
            success.getDirectionalPoolApiForZone("jclouds.org.").addRecordIntoNewGroup("06063DC355055E68", record,
                  group), "06063DC355058294");
   }
View Full Code Here


         .addHeader(HOST, "ultra-api.ultradns.com:8443")
         .payload(payloadFromResourceWithContentType("/create_directionalrecord_existinggroup.xml", "application/xml"))
         .build();

   public void testAddRecordIntoExistingGroupWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(addRecordIntoExistingGroup, recordCreatedResponse);
      assertEquals(
            success.getDirectionalPoolApiForZone("jclouds.org.").addRecordIntoExistingGroup("06063DC355055E68",
                  record, "AAABBBCCCDDDEEE"), "06063DC355058294");
   }
View Full Code Here

   HttpResponse updateRecordResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/directionalrecord_updated.xml", "application/xml")).build();

   public void testUpdateRecordWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(updateRecord, updateRecordResponse);
      success.getDirectionalPoolApiForZone("jclouds.org.").updateRecord("04053D8E57C7931F", record);
   }
View Full Code Here

   HttpResponse recordDoesntExist = HttpResponse.builder().message("Server Error").statusCode(INTERNAL_SERVER_ERROR.getStatusCode())
         .payload(payloadFromResource("/directionalrecord_doesnt_exist.xml")).build();

   @Test(expectedExceptions = ResourceNotFoundException.class, expectedExceptionsMessageRegExp = "Directional Pool Record does not exist in the system")
   public void testUpdateRecordWhenResponseNotFound() {
      UltraDNSWSApi notFound = requestSendsResponse(updateRecord, recordDoesntExist);
      notFound.getDirectionalPoolApiForZone("jclouds.org.").updateRecord("04053D8E57C7931F", record);
   }
View Full Code Here

         .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01")
         .addHeader(HOST, "ultra-api.ultradns.com:8443")
         .payload(payloadFromResourceWithContentType("/update_directionalrecord_group.xml", "application/xml")).build();

   public void testUpdateRecordAndGroupWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(updateRecordAndGroup, updateRecordResponse);
      success.getDirectionalPoolApiForZone("jclouds.org.").updateRecordAndGroup("04053D8E57C7931F", record, group);
   }
View Full Code Here

   HttpResponse deleteRecordResponse = HttpResponse.builder().statusCode(404)
         .payload(payloadFromResourceWithContentType("/directionalrecord_deleted.xml", "application/xml")).build();

   public void testDeleteRecordWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(deleteRecord, deleteRecordResponse);
      success.getDirectionalPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
   }
View Full Code Here

      UltraDNSWSApi success = requestSendsResponse(deleteRecord, deleteRecordResponse);
      success.getDirectionalPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
   }

   public void testDeleteRecordWhenResponseNotFound() {
      UltraDNSWSApi notFound = requestSendsResponse(deleteRecord, recordDoesntExist);
      notFound.getDirectionalPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
   }
View Full Code Here

   HttpResponse listResponse = HttpResponse.builder().statusCode(OK.getStatusCode())

         .payload(payloadFromResourceWithContentType("/directionalpools.xml", "application/xml")).build();
  
   public void testListWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(list, listResponse);

      assertEquals(success.getDirectionalPoolApiForZone("jclouds.org.").list().toString(),
            new GetDirectionalPoolsByZoneResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse listRecordsResponse = HttpResponse.builder().statusCode(OK.getStatusCode())

         .payload(payloadFromResourceWithContentType("/directionalrecords.xml", "application/xml")).build();

   public void testListRecordsWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(listRecords, listRecordsResponse);

      assertEquals(success.getDirectionalPoolApiForZone("jclouds.org.").listRecordsByDNameAndType("www.jclouds.org.", 1)
            .toString(), new GetDirectionalDNSRecordsForHostResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse listGroupNamesByRecordNameAndTypeResponse = HttpResponse.builder().statusCode(OK.getStatusCode())

         .payload(payloadFromResourceWithContentType("/directionalgroup_names.xml", "application/xml")).build();
  
   public void testListGroupNamesByRecordNameAndTypeWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(listGroupNamesByRecordNameAndType, listGroupNamesByRecordNameAndTypeResponse);

      assertEquals(success.getDirectionalGroupApiForAccount("accountid").listGroupNamesByDNameAndType("www.jclouds.org.", 1).toString(),
            new GetAvailableGroupsResponseTest().expected().toString());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.ultradns.ws.UltraDNSWSApi

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.