Package org.jclouds.elasticstack.domain

Examples of org.jclouds.elasticstack.domain.CreateDriveRequest$Builder


      assertEquals(request.getPayload().getContentMetadata().getContentType(), MediaType.TEXT_PLAIN);
      assertEquals(request.getPayload().getRawContent(), "name foo\nsize 100");
   }

   public void testComplete() throws IOException {
      CreateDriveRequest input = new CreateDriveRequest.Builder()
            .name("Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System")
            //
            .size(8589934592l)//
            .claimType(ClaimType.SHARED)//
            .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))//
View Full Code Here


   @Override
   public Map<String, String> apply(Drive from) {
      ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
      builder.putAll(baseDriveToMap.apply(from));
      if (from instanceof CreateDriveRequest) {
         CreateDriveRequest create = CreateDriveRequest.class.cast(from);
         if (create.getAvoid().size() != 0)
            builder.put("avoid", Joiner.on(' ').join(create.getAvoid()));
         if (create.getEncryptionCipher() != null)
            builder.put("encryption:cipher", create.getEncryptionCipher());
      }
      return builder.build();
   }
View Full Code Here

      assertEquals(BASEDRIVE_TO_MAP.apply(new CreateDriveRequest.Builder().name("foo").size(100l).build()),
            ImmutableMap.of("name", "foo", "size", "100"));
   }

   public void testComplete() throws IOException {
      CreateDriveRequest one = new CreateDriveRequest.Builder()
            .name("Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System")
            //
            .size(8589934592l)//
            .claimType(ClaimType.SHARED)//
            .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))//
View Full Code Here

   @Override
   public Map<String, String> apply(Drive from) {
      ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
      builder.putAll(baseDriveToMap.apply(from));
      if (from instanceof CreateDriveRequest) {
         CreateDriveRequest create = CreateDriveRequest.class.cast(from);
         if (create.getAvoid().size() != 0)
            builder.put("avoid", Joiner.on(' ').join(create.getAvoid()));
         if (create.getEncryptionCipher() != null)
            builder.put("encryption:cipher", create.getEncryptionCipher());
      }
      return builder.build();
   }
View Full Code Here

      assertEquals(BASEDRIVE_TO_MAP.apply(new CreateDriveRequest.Builder().name("foo").size(100l).build()),
            ImmutableMap.of("name", "foo", "size", "100"));
   }

   public void testComplete() throws IOException {
      CreateDriveRequest one = new CreateDriveRequest.Builder()
            .name("Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System")
            //
            .size(8589934592l)//
            .claimType(ClaimType.SHARED)//
            .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))//
View Full Code Here

      assertEquals(request.getPayload().getContentMetadata().getContentType(), MediaType.TEXT_PLAIN);
      assertEquals(request.getPayload().getRawContent(), "name foo\nsize 100");
   }

   public void testComplete() throws IOException {
      CreateDriveRequest input = new CreateDriveRequest.Builder()
            .name("Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System")
            //
            .size(8589934592l)//
            .claimType(ClaimType.SHARED)//
            .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))//
View Full Code Here

   @Override
   public Map<String, String> apply(Drive from) {
      ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
      builder.putAll(baseDriveToMap.apply(from));
      if (from instanceof CreateDriveRequest) {
         CreateDriveRequest create = CreateDriveRequest.class.cast(from);
         if (create.getAvoid().size() != 0)
            builder.put("avoid", Joiner.on(' ').join(create.getAvoid()));
         if (create.getEncryptionCipher() != null)
            builder.put("encryption:cipher", create.getEncryptionCipher());
      }
      return builder.build();
   }
View Full Code Here

      assertEquals(BASEDRIVE_TO_MAP.apply(new CreateDriveRequest.Builder().name("foo").size(100l).build()),
            ImmutableMap.of("name", "foo", "size", "100"));
   }

   public void testComplete() throws IOException {
      CreateDriveRequest one = new CreateDriveRequest.Builder()
            .name("Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System")
            //
            .size(8589934592l)//
            .claimType(ClaimType.SHARED)//
            .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))//
View Full Code Here

      assertEquals(request.getPayload().getContentMetadata().getContentType(), MediaType.TEXT_PLAIN);
      assertEquals(request.getPayload().getRawContent(), "name foo\nsize 100");
   }

   public void testComplete() throws IOException {
      CreateDriveRequest input = new CreateDriveRequest.Builder()
            .name("Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System")
            //
            .size(8589934592l)//
            .claimType(ClaimType.SHARED)//
            .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))//
View Full Code Here

   @Override
   public Map<String, String> apply(Drive from) {
      ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
      builder.putAll(baseDriveToMap.apply(from));
      if (from instanceof CreateDriveRequest) {
         CreateDriveRequest create = CreateDriveRequest.class.cast(from);
         if (!create.getAvoid().isEmpty())
            builder.put("avoid", Joiner.on(' ').join(create.getAvoid()));
         if (create.getEncryptionCipher() != null)
            builder.put("encryption:cipher", create.getEncryptionCipher());
      }
      return builder.build();
   }
View Full Code Here

TOP

Related Classes of org.jclouds.elasticstack.domain.CreateDriveRequest$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.