Package org.jclouds.rackspace.cloudfiles.v1.options

Examples of org.jclouds.rackspace.cloudfiles.v1.options.CreateContainerOptions$Builder


import org.testng.annotations.Test;

@Test(groups = "unit", testName = "CloudFilesUKProviderTest")
public class CloudFilesUKProviderTest extends BaseProviderMetadataTest {
   public CloudFilesUKProviderTest() {
      super(new CloudFilesUKProviderMetadata(), new CloudFilesApiMetadata());
   }
View Full Code Here


   public void testEnable() throws Exception {
      for (String regionId : regions) {
         assertNotNull(api.getCDNApiForRegion(regionId).enable(name));
        
         CDNContainer container = api.getCDNApiForRegion(regionId).get(name);
         assertCDNContainerNotNull(container);
         assertTrue(container.isEnabled());
      }
   }
View Full Code Here

   public void testEnableWithTTL() throws Exception {
      for (String regionId : regions) {
         assertNotNull(api.getCDNApiForRegion(regionId).enable(name, 777777));

         CDNContainer container = api.getCDNApiForRegion(regionId).get(name);
         assertCDNContainerNotNull(container);
         assertTrue(container.isEnabled());
         assertTrue(container.getTtl() == 777777);
      }
   }
View Full Code Here

   public void testEnable() throws Exception {
      for (String regionId : regions) {
         assertNotNull(api.cdnApiInRegion(regionId).enable(name));
        
         CDNContainer container = api.cdnApiInRegion(regionId).get(name);
         assertCDNContainerNotNull(container);
         assertTrue(container.isEnabled());
      }
   }
View Full Code Here

   public void testEnableWithTTL() throws Exception {
      for (String regionId : regions) {
         assertNotNull(api.cdnApiInRegion(regionId).enable(name, 777777));

         CDNContainer container = api.cdnApiInRegion(regionId).get(name);
         assertCDNContainerNotNull(container);
         assertTrue(container.isEnabled());
         assertTrue(container.getTtl() == 777777);
      }
   }
View Full Code Here

   public void testDisable() throws Exception {
      for (String regionId : regions) {
         assertTrue(api.cdnApiInRegion(regionId).disable(name));

         CDNContainer container = api.cdnApiInRegion(regionId).get(name);
         assertFalse(container.isEnabled());
      }
   }
View Full Code Here

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

      }
   }

   public void testGet() throws Exception {
      for (String regionId : regions) {
         CDNContainer container = api.cdnApiInRegion(regionId).get(name);
         assertCDNContainerNotNull(container);
         assertTrue(container.isEnabled());
      }
   }
View Full Code Here

      for (String regionId : regions) {
         // enable with a ttl
         assertNotNull(api.cdnApiInRegion(regionId).enable(name, 777777));
        
         // now get the container
         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));
        
         // now get the updated container
         CDNContainer updated = api.cdnApiInRegion(regionId).get(name);
         assertFalse(updated.isEnabled());
         assertCDNContainerNotNull(updated);
        
         assertNotEquals(original.getTtl(), updated.getTtl());
         assertTrue(updated.isLogRetentionEnabled());
      }
   }
View Full Code Here

      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

TOP

Related Classes of org.jclouds.rackspace.cloudfiles.v1.options.CreateContainerOptions$Builder

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.