Package org.jclouds.openstack.swift.v1.options

Examples of org.jclouds.openstack.swift.v1.options.CreateContainerOptions$Builder


            .addHeader("X-Container-Read", ".r:*,.rlistings") //
            .setBody(objectList)));

      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         ObjectList objects = api.objectApiInRegionForContainer("DFW", "myContainer").list(new ListContainerOptions());
         assertEquals(objects, parsedObjectsForUrl(server.getUrl("/").toString()));
         assertEquals(objects.container().name(), "myContainer");
         assertTrue(objects.container().anybodyRead().get());

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


   }

   public void list() throws Exception {
      for (String regionId : regions) {
         ObjectApi objectApi = api.objectApiInRegionForContainer(regionId, containerName);
         ObjectList response = objectApi.list(new ListContainerOptions());
         assertEquals(response.container(), api.containerApiInRegion(regionId).get(containerName));
         assertNotNull(response);
         for (SwiftObject object : response) {
            checkObject(object);
         }
View Full Code Here

      setIfTestSystemPropertyPresent(props, LocationConstants.PROPERTY_REGION);
      return props;
   }

   protected void deleteAllObjectsInContainer(String regionId, final String containerName) {
      ObjectList objects = api.objectApiInRegionForContainer(regionId, containerName).list(new ListContainerOptions());
      if (objects == null) {
         return;
      }
      List<String> pathsToDelete = Lists.transform(objects, new Function<SwiftObject, String>() {
         public String apply(SwiftObject input) {
View Full Code Here

            responseWithKeystoneAccess, list, listResponse);

      assertEquals(apiWhenContainersExist.getConfiguredRegions(), ImmutableSet.of("region-a.geo-1"));

      assertEquals(apiWhenContainersExist.getContainerApiForRegion("region-a.geo-1").list().toString(),
            new ParseContainerListTest().expected().toString());
   }
View Full Code Here

      SwiftApi apiWhenContainersExist = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
            responseWithKeystoneAccess, list, listResponse);

      assertEquals(
            apiWhenContainersExist.getContainerApiForRegion("region-a.geo-1").list()
                  .toString(), new ParseContainerListTest().expected().toString());
   }
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.openstack.swift.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.