Package org.jclouds.mezeo.pcs.domain

Examples of org.jclouds.mezeo.pcs.domain.ContainerList


      context = new RestContextFactory().createContext(provider, ImmutableSet.<Module> of(new Log4JLoggingModule()),
            overrides);

      connection = context.getApi();
      ContainerList response = connection.list();
      for (ResourceInfo resource : response) {
         if (resource.getType() == StorageType.FOLDER && resource.getName().startsWith(containerPrefix)) {
            System.err.printf("*** deleting container %s...%n", resource.getName());
            connection.deleteContainer(resource.getUrl());
         }
View Full Code Here


   private String containerPrefix = BaseBlobStoreIntegrationTest.CONTAINER_PREFIX;

   @Test
   public void testListContainers() throws Exception {
      ContainerList response = connection.list();
      URI rootUrl = response.getUrl();
      String name = "/";
      validateContainerList(response, rootUrl, name);

      long initialContainerCount = response.size();
      assertTrue(initialContainerCount >= 0);

      // Create test containers
      for (String container : new String[] { containerPrefix + ".testListOwnedContainers1",
            containerPrefix + ".testListOwnedContainers2" }) {
         URI containerURI = connection.createContainer(container);
         connection.putMetadataItem(containerURI, "name", container);
         response = connection.list(containerURI);
         validateContainerList(response, rootUrl, container);

         assertEquals(response.getMetadataItems().get("name"),
               URI.create(containerURI.toASCIIString() + "/metadata/name"));

         validateMetadataItemNameEquals(containerURI, container);

         connection.deleteContainer(containerURI);
View Full Code Here

                                 URI
                                          .create("https://pcsbeta.mezeo.net/v2/files/9E4C5AFA-A98B-11DE-8B4C-C3884B4A2DA3/thumbnail"))

               );

      ContainerList expects = new ContainerListImpl(
               URI
                        .create("https://pcsbeta.mezeo.net/v2/containers/C4DA95C2-B298-11DE-8D7C-2B1FE4F2B99C"),
               "/",
               dateService.fromSeconds(1254848007),
               false,
               dateService.fromSeconds(1255026455),
               "adrian@jclouds.org",
               0,
               false,
               dateService.fromSeconds(1255026455),
               0,
               list,
               URI
                        .create("https://pcsbeta.mezeo.net/v2/containers/C4DA95C2-B298-11DE-8D7C-2B1FE4F2B99C/tags"),
               URI
                        .create("https://pcsbeta.mezeo.net/v2/containers/C4DA95C2-B298-11DE-8D7C-2B1FE4F2B99C/metadata"),
               Maps.<String, URI> newHashMap(),
               URI
                        .create("https://pcsbeta.mezeo.net/v2/containers/C4DA95C2-B298-11DE-8D7C-2B1FE4F2B99C"));

      ContainerList result = (ContainerList) factory.create(
               injector.getInstance(ContainerHandler.class)).parse(is);

      assertEquals(result, expects);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.mezeo.pcs.domain.ContainerList

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.