Package org.jclouds.openstack.swift.v1.domain

Examples of org.jclouds.openstack.swift.v1.domain.BulkDeleteResponse


   List<String> paths = Lists.newArrayList();
   byte[] tarGz;

   public void testNotPresentWhenDeleting() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.getBulkApiForRegion(regionId).bulkDelete(
               ImmutableList.of(UUID.randomUUID().toString()));
         assertEquals(deleteResponse.getDeleted(), 0);
         assertEquals(deleteResponse.getNotFound(), 1);
         assertTrue(deleteResponse.getErrors().isEmpty());
      }
   }
View Full Code Here


   }

   @Test(dependsOnMethods = "testExtractArchive")
   public void testBulkDelete() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.getBulkApiForRegion(regionId).bulkDelete(paths);
         assertEquals(deleteResponse.getDeleted(), OBJECT_COUNT);
         assertEquals(deleteResponse.getNotFound(), 0);
         assertTrue(deleteResponse.getErrors().isEmpty());
         assertEquals(api.getContainerApiForRegion(regionId).get(containerName).getObjectCount(), 0);
      }
   }
View Full Code Here

         public String apply(SwiftObject input) {
            return containerName + "/" + input.getName();
         }
      });
      if (!pathsToDelete.isEmpty()) {
         BulkDeleteResponse response = api.getBulkApiForRegion(regionId).bulkDelete(pathsToDelete);
         checkState(response.getErrors().isEmpty(), "Errors deleting paths %s: %s", pathsToDelete, response);
      }
   }
View Full Code Here

         public String apply(SwiftObject input) {
            return containerName + "/" + input.getName();
         }
      });
      if (!pathsToDelete.isEmpty()) {
         BulkDeleteResponse response = api.getBulkApiForRegion(regionId).bulkDelete(pathsToDelete);
         checkState(response.getErrors().isEmpty(), "Errors deleting paths %s: %s", pathsToDelete, response);
      }
   }
View Full Code Here

   List<String> paths = Lists.newArrayList();
   byte[] tarGz;

   public void testNotPresentWhenDeleting() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.getBulkApiForRegion(regionId).bulkDelete(
               ImmutableList.of(UUID.randomUUID().toString()));
         assertEquals(deleteResponse.getDeleted(), 0);
         assertEquals(deleteResponse.getNotFound(), 1);
         assertTrue(deleteResponse.getErrors().isEmpty());
      }
   }
View Full Code Here

   }

   @Test(dependsOnMethods = "testExtractArchive")
   public void testBulkDelete() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.getBulkApiForRegion(regionId).bulkDelete(paths);
         assertEquals(deleteResponse.getDeleted(), OBJECT_COUNT);
         assertEquals(deleteResponse.getNotFound(), 0);
         assertTrue(deleteResponse.getErrors().isEmpty());
         assertEquals(api.getContainerApiForRegion(regionId).get(containerName).getObjectCount(), 0);
      }
   }
View Full Code Here

   List<String> paths = Lists.newArrayList();
   byte[] tarGz;

   public void testNotPresentWhenDeleting() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.getBulkApi(regionId).bulkDelete(
               ImmutableList.of(UUID.randomUUID().toString()));
         assertEquals(deleteResponse.getDeleted(), 0);
         assertEquals(deleteResponse.getNotFound(), 1);
         assertTrue(deleteResponse.getErrors().isEmpty());
      }
   }
View Full Code Here

   }

   @Test(dependsOnMethods = "testExtractArchive")
   public void testBulkDelete() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.getBulkApi(regionId).bulkDelete(paths);
         assertEquals(deleteResponse.getDeleted(), OBJECT_COUNT);
         assertEquals(deleteResponse.getNotFound(), 0);
         assertTrue(deleteResponse.getErrors().isEmpty());
         assertEquals(api.getContainerApi(regionId).get(containerName).getObjectCount(), 0);
      }
   }
View Full Code Here

         public String apply(SwiftObject input) {
            return containerName + "/" + input.getName();
         }
      });
      if (!pathsToDelete.isEmpty()) {
         BulkDeleteResponse response = api.getBulkApi(regionId).bulkDelete(pathsToDelete);
         checkState(response.getErrors().isEmpty(), "Errors deleting paths %s: %s", pathsToDelete, response);
      }
   }
View Full Code Here

            .addHeader("X-Container-Meta-Apiname", "swift") //
            .addHeader("X-Container-Meta-Apiversion", "v1.1")));

      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         Container container = api.containerApiInRegion("DFW").get("myContainer");
         assertEquals(container.name(), "myContainer");
         assertEquals(container.objectCount(), 42l);
         assertEquals(container.bytesUsed(), 323479l);
         for (Entry<String, String> entry : container.metadata().entrySet()) {
            assertEquals(container.metadata().get(entry.getKey().toLowerCase()), entry.getValue());
         }

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         assertEquals(server.takeRequest().getRequestLine(),
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.swift.v1.domain.BulkDeleteResponse

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.