Package org.jclouds.rackspace.cloudfiles.v1

Examples of org.jclouds.rackspace.cloudfiles.v1.CloudFilesApi.cdnApiInRegion()


      server.enqueue(addCommonHeaders(enabledResponse().setResponseCode(201)));
     
      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");

         CDNContainer cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
         assertCDNContainerNotNull(cdnContainer);
         assertEquals(mockCDNContainer, cdnContainer);

         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
View Full Code Here


      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");

         CDNContainer cdnContainer = api.cdnApiInRegion("DFW").get("container-1");

         assertAuthentication(server);
         assertRequest(server.takeRequest(), "HEAD", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/container-1");
         assertNull(cdnContainer);
      } finally {
View Full Code Here

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");

         // purge the object
         assertTrue(api.cdnApiInRegion("DFW").purgeObject("myContainer", "myObject", emails));

         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "DELETE", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer/myObject");
      } finally {
View Full Code Here

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");

         // purge the object
         assertFalse(api.cdnApiInRegion("DFW").purgeObject("myContainer", "myObject", emails));

         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "DELETE", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer/myObject");
      } finally {
View Full Code Here

      server.enqueue(addCommonHeaders(updatedResponse().setResponseCode(200)));

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");

         CDNContainer cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
         assertCDNContainerNotNull(cdnContainer);

         // update the CDN Container
         assertTrue(api.cdnApiInRegion("DFW").update("container-1", enabled(false).logRetention(true).ttl(7654321)));
View Full Code Here

         CDNContainer cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
         assertCDNContainerNotNull(cdnContainer);

         // update the CDN Container
         assertTrue(api.cdnApiInRegion("DFW").update("container-1", enabled(false).logRetention(true).ttl(7654321)));

         cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
         assertCDNContainerNotNull(cdnContainer);

         CDNContainer updatedContainer = CDNContainer.builder()
View Full Code Here

         assertCDNContainerNotNull(cdnContainer);

         // update the CDN Container
         assertTrue(api.cdnApiInRegion("DFW").update("container-1", enabled(false).logRetention(true).ttl(7654321)));

         cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
         assertCDNContainerNotNull(cdnContainer);

         CDNContainer updatedContainer = CDNContainer.builder()
               .name("container-1")
               .enabled(false)
View Full Code Here

      server.enqueue(addCommonHeaders(updatedResponse().setResponseCode(404)));

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");

         CDNContainer cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
         assertCDNContainerNotNull(cdnContainer);

         // update the CDN Container
         assertFalse(api.cdnApiInRegion("DFW").update("container-1", enabled(false).logRetention(true).ttl(7654321)));
View Full Code Here

         CDNContainer cdnContainer = api.cdnApiInRegion("DFW").get("container-1");
         assertCDNContainerNotNull(cdnContainer);

         // update the CDN Container
         assertFalse(api.cdnApiInRegion("DFW").update("container-1", enabled(false).logRetention(true).ttl(7654321)));

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "HEAD", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/container-1");
         assertRequest(server.takeRequest(), "POST", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/container-1");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.