Package org.jclouds.ultradns.ws

Examples of org.jclouds.ultradns.ws.UltraDNSWSApi


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

   public void testListByAccountAndTypeWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(listByAccountAndType, listByAccountResponse);

      assertEquals(
            success.getZoneApi().listByAccountAndType("AAAAAAAAAAAAAAAA", Type.PRIMARY).toString(),
            new GetZonesOfAccountResponseTest().expected().toString());
   }
View Full Code Here


            new GetZonesOfAccountResponseTest().expected().toString());
   }

   @Test(expectedExceptions = ResourceNotFoundException.class, expectedExceptionsMessageRegExp = "Account not found in the system. ID: AAAAAAAAAAAAAAAA")
   public void testListByAccountAndTypeWhenResponseError2401() {
      UltraDNSWSApi notFound = requestSendsResponse(listByAccountAndType, accountDoesntExist);
      notFound.getZoneApi().listByAccountAndType("AAAAAAAAAAAAAAAA", Type.PRIMARY);
   }
View Full Code Here

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

   public void testDeleteWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(delete, deleteResponse);
      success.getZoneApi().delete("jclouds.org.");
   }
View Full Code Here

      UltraDNSWSApi success = requestSendsResponse(delete, deleteResponse);
      success.getZoneApi().delete("jclouds.org.");
   }

   public void testDeleteWhenResponseError1801() {
      UltraDNSWSApi notFound = requestSendsResponse(delete, zoneDoesntExist);
      notFound.getZoneApi().delete("jclouds.org.");
   }
View Full Code Here

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

   public void testCreateAWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(createA, createResponse);
      assertEquals(
            success.getRoundRobinPoolApiForZone("jclouds.org.").createForDNameAndType("www.jclouds.org.", "foo",
                  A.getCode()), "060339AA04175655");
   }
View Full Code Here

            success.getRoundRobinPoolApiForZone("jclouds.org.").createForDNameAndType("www.jclouds.org.", "foo",
                  A.getCode()), "060339AA04175655");
   }

   public void testCreateAAAAWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(createAAAA, createResponse);
      assertEquals(
            success.getRoundRobinPoolApiForZone("jclouds.org.").createForDNameAndType("www.jclouds.org.", "foo",
                  AAAA.getCode()), "060339AA04175655");
   }
View Full Code Here

   HttpResponse alreadyCreated = HttpResponse.builder().statusCode(INTERNAL_SERVER_ERROR.getStatusCode())
         .payload(payloadFromResourceWithContentType("/lbpool_already_exists.xml", "application/xml")).build();

   @Test(expectedExceptions = ResourceAlreadyExistsException.class, expectedExceptionsMessageRegExp = "Pool already created for this host name : www.rrpool.adrianc.rrpool.ultradnstest.jclouds.org.")
   public void testCreateWhenResponseError2912() {
      UltraDNSWSApi already = requestSendsResponse(createA, alreadyCreated);
      already.getRoundRobinPoolApiForZone("jclouds.org.").createForDNameAndType("www.jclouds.org.", "foo",
            A.getCode());
   }
View Full Code Here

   HttpResponse listResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/rrpools.xml", "application/xml")).build();
  
   public void testListWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(list, listResponse);

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

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

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

      assertEquals(
            success.getRoundRobinPoolApiForZone("jclouds.org.").listRecords("04053D8E57C7931F").toString(),
            new GetResourceRecordsOfResourceRecordResponseTest().expected().toString());
   }
View Full Code Here

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

   public void testDeleteWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(delete, deleteResponse);
      success.getRoundRobinPoolApiForZone("jclouds.org.").delete("04053D8E57C7931F");
   }
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.