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

Examples of org.jclouds.openstack.swift.v1.domain.Container.objectCount()


         AccountApi accountApi = api.accountApiInRegion(regionId);
         Account account = accountApi.get();

         assertNotNull(account);
         assertTrue(account.containerCount() >= 0);
         assertTrue(account.objectCount() >= 0);
         assertTrue(account.bytesUsed() >= 0);
      }
   }

   public void updateMetadata() throws Exception {
View Full Code Here


      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         Account account = api.accountApiInRegion("DFW").get();
         assertEquals(account.containerCount(), 3l);
         assertEquals(account.objectCount(), 42l);
         assertEquals(account.bytesUsed(), 323479l);
         for (Entry<String, String> entry : metadata.entrySet()) {
            assertEquals(account.metadata().get(entry.getKey().toLowerCase()), entry.getValue());
         }
View Full Code Here

      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         Account account = api.accountApiInRegion("DFW").get();
         assertEquals(account.containerCount(), 3l);
         assertEquals(account.objectCount(), 42l);
         assertEquals(account.bytesUsed(), 323479l);
         for (Entry<String, String> entry : metadata.entrySet()) {
            assertEquals(account.metadata().get(entry.getKey().toLowerCase()), entry.getValue());
         }
View Full Code Here

         AccountApi accountApi = api.accountApiInRegion(regionId);
         Account account = accountApi.get();

         assertNotNull(account);
         assertTrue(account.containerCount() >= 0);
         assertTrue(account.objectCount() >= 0);
         assertTrue(account.bytesUsed() >= 0);
      }
   }

   public void updateMetadata() throws Exception {
View Full Code Here

      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());
         }
View Full Code Here

   public void get() throws Exception {
      for (String regionId : regions) {
         Container container = api.containerApiInRegion(regionId).get(name);
         assertEquals(container.name(), name);
         assertTrue(container.objectCount() == 0);
         assertTrue(container.bytesUsed() == 0);
      }
   }

   public void listAt() throws Exception {
View Full Code Here

   public void listAt() throws Exception {
      String lexicographicallyBeforeName = name.substring(0, name.length() - 1);
      for (String regionId : regions) {
         Container container = api.containerApiInRegion(regionId).listAt(lexicographicallyBeforeName).get(0);
         assertEquals(container.name(), name);
         assertTrue(container.objectCount() == 0);
         assertTrue(container.bytesUsed() == 0);
      }
   }

   public void updateMetadata() throws Exception {
View Full Code Here

   @Override
   public long countBlobs(String containerName) {
      Container container = api.containerApiInRegion(region.getId()).get(containerName);
      // undefined if container doesn't exist, so default to zero
      return container != null ? container.objectCount() : 0;
   }

   @Override
   public void clearContainer(String containerName) {
      clearContainer(containerName, recursive());
View Full Code Here

   public void get() throws Exception {
      for (String regionId : api.configuredRegions()) {
         Container container = api.containerApiInRegion(regionId).get(name);
         assertEquals(container.name(), name);
         assertTrue(container.objectCount() == 0);
         assertTrue(container.bytesUsed() == 0);
      }
   }

   public void listAt() throws Exception {
View Full Code Here

   public void listAt() throws Exception {
      String lexicographicallyBeforeName = name.substring(0, name.length() - 1);
      for (String regionId : api.configuredRegions()) {
         Container container = api.containerApiInRegion(regionId).listAt(lexicographicallyBeforeName).get(0);
         assertEquals(container.name(), name);
         assertTrue(container.objectCount() == 0);
         assertTrue(container.bytesUsed() == 0);
      }
   }

   public void updateMetadata() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.