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

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


      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

         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

      pDataObjectMetaDataIn.put("dataObjectkey3", "value3");

      Payload payloadIn;
      Payload payloadOut;

      CreateContainerOptions pCreateContainerOptions = CreateContainerOptions.Builder.metadata(pContainerMetaDataIn);
      ContainerApi containerApi = cdmiContext.getApi().getApi();
      DataApi dataApi = cdmiContext.getApi().getDataApiForContainer(containerName);
      DataNonCDMIContentTypeApi dataNonCDMIContentTypeApi = cdmiContext.getApi()
               .getDataNonCDMIContentTypeApiForContainer(containerName);
      Logger.getAnonymousLogger().info("create: " + containerName);
View Full Code Here

      Map<String, String> pDataObjectMetaDataIn = Maps.newLinkedHashMap();
      pDataObjectMetaDataIn.put("dataObjectkey1", "value1");
      pDataObjectMetaDataIn.put("dataObjectkey2", "value2");
      pDataObjectMetaDataIn.put("dataObjectkey3", "value3");

      CreateContainerOptions pCreateContainerOptions = CreateContainerOptions.Builder.metadata(pContainerMetaDataIn);
      ContainerApi containerApi = cdmiContext.getApi().getApi();
      DataApi dataApi = cdmiContext.getApi().getDataApiForContainer(containerName);
      Logger.getAnonymousLogger().info("create: " + containerName);
      Container container = containerApi.create(containerName, pCreateContainerOptions);
      try {
View Full Code Here

      Map<String, String> pDataObjectMetaDataIn = Maps.newLinkedHashMap();
      pDataObjectMetaDataIn.put("dataObjectkey1", "value1");
      pDataObjectMetaDataIn.put("dataObjectkey2", "value2");
      pDataObjectMetaDataIn.put("dataObjectkey3", "value3");

      CreateContainerOptions pCreateContainerOptions = CreateContainerOptions.Builder.metadata(pContainerMetaDataIn);
      ContainerApi containerApi = cdmiContext.getApi().getApi();
      DataApi dataApi = cdmiContext.getApi().getDataApiForContainer(containerName);
      Logger.getAnonymousLogger().info("create: " + containerName);
      Container container = containerApi.create(containerName, pCreateContainerOptions);
      try {
View Full Code Here

      Map<String, String> pContainerMetaDataIn = Maps.newHashMap();
      pContainerMetaDataIn.put("containerkey1", "value1");
      pContainerMetaDataIn.put("containerkey2", "value2");
      pContainerMetaDataIn.put("containerkey3", "value3");

      CreateContainerOptions pCreateContainerOptions = CreateContainerOptions.Builder.metadata(pContainerMetaDataIn);
      ContainerApi api = cdmiContext.getApi().getApi();

      Logger.getAnonymousLogger().info("create: " + pContainerName);

      Container container = api.create(pContainerName, pCreateContainerOptions);
View Full Code Here

      String pContainerName = "MyContainer" + System.currentTimeMillis() + "/";
      Map<String, String> pContainerMetaDataIn = Maps.newHashMap();
      pContainerMetaDataIn.put("containerkey1", "value1");
      pContainerMetaDataIn.put("containerkey2", "value2");
      pContainerMetaDataIn.put("containerkey3", "value3");
      CreateContainerOptions pCreateContainerOptions = CreateContainerOptions.Builder.metadata(pContainerMetaDataIn);
      ContainerApi api = cdmiContext.getApi().getApi();

      Logger.getAnonymousLogger().info("create: " + pContainerName);

      Container container = api.create(pContainerName, pCreateContainerOptions);
View Full Code Here

TOP

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

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.