Package org.jclouds.glacier.domain

Examples of org.jclouds.glacier.domain.ArchiveMetadataCollection


   @Override
   public void execute(String container, ListContainerOptions listContainerOptions) {
      String jobId = client.initiateJob(container, InventoryRetrievalJobRequest.builder().build());
      try {
         if (pollingStrategy.waitForSuccess(container, jobId)) {
            ArchiveMetadataCollection archives = client.getInventoryRetrievalOutput(container, jobId);
            for (ArchiveMetadata archive : archives) {
               try {
                  client.deleteArchive(container, archive.getArchiveId());
               } catch (ResourceNotFoundException ignored) {
               }
View Full Code Here


      mr.addHeader(HttpHeaders.CONTENT_TYPE, MediaType.JSON_UTF_8);
      mr.setBody(getResponseBody("/json/getJobOutputResponseBody.json"));
      mr.addHeader(HttpHeaders.CONTENT_LENGTH, mr.getBody().length);
      server.enqueue(mr);

      ArchiveMetadataCollection archives = client.getInventoryRetrievalOutput(VAULT_NAME, JOB_ID);
      assertThat(archives.getVaultARN()).isEqualTo("arn:aws:glacier:us-east-1:012345678901:vaults/examplevault");
      assertThat(archives).extracting("archiveId").containsExactly(
              "DMTmICA2n5Tdqq5BV2z7og-A20xnpAPKt3UXwWxdWsn_D6auTUrW6kwy5Qyj9xd1MCE1mBYvMQ63LWaT8yTMzMaCxB_9VBWrW4Jw4zsvg5kehAPDVKcppUD1X7b24JukOr4mMAq-oA",
              "2lHzwhKhgF2JHyvCS-ZRuF08IQLuyB4265Hs3AXj9MoAIhz7tbXAvcFeHusgU_hViO1WeCBe0N5lsYYHRyZ7rrmRkNRuYrXUs_sjl2K8ume_7mKO_0i7C-uHE1oHqaW9d37pabXrSA");
      assertThat(archives).extracting("description").containsExactly("my archive1", "my archive2");
      assertThat(archives).extracting("size").containsExactly(2140123L, 2140123L);
View Full Code Here

TOP

Related Classes of org.jclouds.glacier.domain.ArchiveMetadataCollection

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.