Examples of DriveInfo


Examples of org.jclouds.cloudsigma.domain.DriveInfo

      drive = client.cloneDrive(imageId, drive.getName(),
            new CloneDriveOptions().size(driveSize).tags("cat:mouse", "monkey:banana"));
      // Block until the async clone operation has completed.
      assert driveNotClaimed.apply(drive) : client.getDriveInfo(drive.getUuid());

      DriveInfo clonedDrive = client.getDriveInfo(drive.getUuid());
      System.err.println("after prepare" + clonedDrive);
      assertEquals(clonedDrive.getTags(), ImmutableSet.of("cat:mouse", "monkey:banana"));
   }
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

   }

   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      checkArgument(payload instanceof DriveInfo, "this binder is only valid for DriveInfo!");
      DriveInfo create = DriveInfo.class.cast(payload);
      JsonObject driveJson = createDriveRequestToJson.apply(create);

      request.setPayload(driveJson.toString());
      request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
      return request;
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

      }
   }

   @Test
   public void testCreateDrive() throws Exception {
      DriveInfo newDrive = new DriveInfo.Builder()
            .name("test drive")
            .size(new BigInteger("2073741824"))
            .media(MediaType.DISK)
            .build();
      createdDrive = api.createDrive(newDrive);
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

      }
   }

   @Test(dependsOnMethods = {"testCreateDrive"})
   public void testEditDrive() throws Exception {
      DriveInfo editedDrive = new DriveInfo.Builder()
            .name("Edited Drive")
            .size(createdDrive.getSize())
            .media(MediaType.DISK)
            .build();
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/drives-detail.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.getDriveInfo(uuid);
      assertNotNull(result);
   }
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/drives-single.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.createDrive(new DriveInfo.Builder()
            .media(org.jclouds.cloudsigma2.domain.MediaType.DISK)
            .name("test_drive_0")
            .size(new BigInteger("1024000000"))
            .allowMultimount(false)
            .build());
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/drives-detail.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.editDrive(uuid, new DriveInfo.Builder()
            .media(org.jclouds.cloudsigma2.domain.MediaType.DISK)
            .name("test_drive_0")
            .size(new BigInteger("1024000000"))
            .allowMultimount(false)
            .build());
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/drives-detail.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.cloneDrive(uuid, new DriveInfo.Builder()
            .media(org.jclouds.cloudsigma2.domain.MediaType.DISK)
            .name("test_drive_0")
            .size(new BigInteger("1024000000"))
            .allowMultimount(false)
            .build());
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/libdrives-single.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.cloneLibraryDrive(uuid, new LibraryDrive.Builder()
            .media(org.jclouds.cloudsigma2.domain.MediaType.DISK)
            .name("test_drive_0")
            .size(new BigInteger("1024000000"))
            .allowMultimount(false)
            .build());
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.DriveInfo

      }
   }

   @Test
   public void testCreateDrive() throws Exception {
      DriveInfo newDrive = new DriveInfo.Builder()
            .name("test drive")
            .size(new BigInteger("2073741824"))
            .media(MediaType.DISK)
            .build();
      createdDrive = api.createDrive(newDrive);
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.