Package org.jclouds.cloudsigma.domain

Examples of org.jclouds.cloudsigma.domain.Drive


      this.listOfMapsToListOfKeyValuesDelimitedByBlankLines = listOfMapsToListOfKeyValuesDelimitedByBlankLines;
   }
   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      checkArgument(payload instanceof Drive, "this binder is only valid for Drive!");
      Drive create = Drive.class.cast(payload);
      Map<String, String> map = createDriveRequestToMap.apply(create);
      request.setPayload(listOfMapsToListOfKeyValuesDelimitedByBlankLines.apply(ImmutableSet.of(map)));
      request.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
      return request;
   }
View Full Code Here


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

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

      this.listOfMapsToListOfKeyValuesDelimitedByBlankLines = listOfMapsToListOfKeyValuesDelimitedByBlankLines;
   }
   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      checkArgument(payload instanceof Drive, "this binder is only valid for Drive!");
      Drive create = Drive.class.cast(payload);
      Map<String, String> map = createDriveRequestToMap.apply(create);
      request.setPayload(listOfMapsToListOfKeyValuesDelimitedByBlankLines.apply(ImmutableSet.of(map)));
      request.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
      return request;
   }
View Full Code Here

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

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

      this.listOfMapsToListOfKeyValuesDelimitedByBlankLines = listOfMapsToListOfKeyValuesDelimitedByBlankLines;
   }
   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      checkArgument(payload instanceof Drive, "this binder is only valid for Drive!");
      Drive create = Drive.class.cast(payload);
      Map<String, String> map = createDriveRequestToMap.apply(create);
      request.setPayload(listOfMapsToListOfKeyValuesDelimitedByBlankLines.apply(ImmutableSet.of(map)));
      request.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
      return request;
   }
View Full Code Here

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

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

TOP

Related Classes of org.jclouds.cloudsigma.domain.Drive

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.