Package org.jclouds.rackspace.cloudfiles.v1.handlers

Examples of org.jclouds.rackspace.cloudfiles.v1.handlers.CloudFilesErrorHandler


      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/cdn_container_list_at.json"))));

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");
         ListCDNContainerOptions options = new ListCDNContainerOptions().marker("cdn-container-3");
         ImmutableList<CDNContainer> containers = api.getCDNApiForRegion("DFW").list(options).toList();

         for(CDNContainer container : containers) {
            assertCDNContainerNotNull(container);
         }
View Full Code Here


      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");
         ListCDNContainerOptions options = ListCDNContainerOptions.Builder.marker("cdn-container-3");
         FluentIterable<CDNContainer> containers = api.getCDNApiForRegion("DFW").list(options);

         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/?format=json&enabled_only=true&marker=cdn-container-3");
View Full Code Here

   }

   public void testListWithOptions() throws Exception {
      String lexicographicallyBeforeName = name.substring(0, name.length() - 1);
      for (String regionId : regions) {
         ListCDNContainerOptions options = new ListCDNContainerOptions().marker(lexicographicallyBeforeName);
         
         CDNContainer cdnContainer = api.getCDNApiForRegion(regionId).list(options).get(0);
         assertCDNContainerNotNull(cdnContainer);
         assertTrue(cdnContainer.isEnabled());
      }
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/cdn_container_list_at.json"))));

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");
         ListCDNContainerOptions options = new ListCDNContainerOptions().marker("cdn-container-3");
         ImmutableList<CDNContainer> containers = api.getCDNApiForRegion("DFW").list(options).toList();

         for (CDNContainer container : containers) {
            assertCDNContainerNotNull(container);
         }
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         CloudFilesApi api = api(server.getUrl("/").toString(), "rackspace-cloudfiles");
         ListCDNContainerOptions options = ListCDNContainerOptions.Builder.marker("cdn-container-3");
         FluentIterable<CDNContainer> containers = api.getCDNApiForRegion("DFW").list(options);

         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/?format=json&enabled_only=true&marker=cdn-container-3");
View Full Code Here

         CDNContainer original = api.cdnApiInRegion(regionId).get(name);
         assertTrue(original.isEnabled());
         assertCDNContainerNotNull(original);

         // update options
         UpdateCDNContainerOptions opts = new UpdateCDNContainerOptions()
                                                .ttl(1234567)
                                                .logRetention(true)
                                                .enabled(false);
         // update the container
         assertTrue(api.cdnApiInRegion(regionId).update(name, opts));
View Full Code Here

         CDNContainer original = api.getCDNApiForRegion(regionId).get(name);
         assertTrue(original.isEnabled());
         assertCDNContainerNotNull(original);

         // update options
         UpdateCDNContainerOptions opts = new UpdateCDNContainerOptions()
                                                .ttl(1234567)
                                                .logRetention(true)
                                                .enabled(false);
         // update the container
         assertTrue(api.getCDNApiForRegion(regionId).update(name, opts));
View Full Code Here

         CDNContainer original = api.getCDNApiForRegion(regionId).get(name);
         assertTrue(original.isEnabled());
         assertCDNContainerNotNull(original);

         // update options
         UpdateCDNContainerOptions opts = new UpdateCDNContainerOptions()
                                                .ttl(1234567)
                                                .logRetention(true)
                                                .enabled(false);
         // update the container
         assertTrue(api.getCDNApiForRegion(regionId).update(name, opts));
View Full Code Here

TOP

Related Classes of org.jclouds.rackspace.cloudfiles.v1.handlers.CloudFilesErrorHandler

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.