Package org.jclouds.virtualbox.domain

Examples of org.jclouds.virtualbox.domain.StorageController


      assertEquals(scripts, "installModuleAssistantIfNeeded || return 1\n" + "mount -t iso9660 /dev/cdrom1 /mnt\n"
            + "/mnt/VBoxLinuxAdditions.run --nox11\n");
   }
  
   public void testIsoNotPresent() {
      StorageController ideController = StorageController.builder().name("IDE Controller").bus(StorageBus.IDE).build();

      VmSpec vmSpecification = VmSpec.builder().id("").name("").memoryMB(512).osTypeId("").controller(ideController)
               .forceOverwrite(true).cleanUpMode(CleanupMode.Full).build();

      InstallGuestAdditions installer = new InstallGuestAdditions(vmSpecification, "4.1.8");
View Full Code Here


   public void setupContext() {
      super.setupContext();
      instanceName = VIRTUALBOX_IMAGE_PREFIX
               + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, getClass().getSimpleName());

      StorageController ideController = StorageController
               .builder()
               .name("IDE Controller")
               .bus(StorageBus.IDE)
               .attachISO(0, 0, operatingSystemIso)
               .attachHardDisk(
View Full Code Here

      machine.attachDevice(controllerName, controllerPort, deviceSlot, DeviceType.HardDisk, hardDisk);
      machine.saveSettings();
      replay(manager, machine, vBox, hardDisk);

      StorageController controller = StorageController.builder()
              .name(controllerName)
              .bus(StorageBus.IDE)
              .attachHardDisk(HardDisk.builder().diskpath(diskPath)
                    .controllerPort(controllerPort).deviceSlot(deviceSlot).build())
              .build();


      DeviceDetails deviceDetails = getOnlyElement(controller.getHardDisks()).getDeviceDetails();
      new AttachMediumToMachineIfNotAlreadyAttached(deviceDetails, hardDisk, controllerName).apply(machine);

      verify(machine);

   }
View Full Code Here

      machine.attachDevice(controllerName, controllerPort, deviceSlot, DeviceType.HardDisk, hardDisk);
      expectLastCall().andThrow(isoAttachedException);

      replay(manager, machine, vBox, hardDisk);

      StorageController controller = StorageController.builder()
              .name(controllerName)
              .bus(StorageBus.IDE)
              .attachHardDisk(HardDisk.builder().diskpath("/Users/mattias/jclouds-virtualbox-test/testadmin.vdi")
                                    .controllerPort(controllerPort).deviceSlot(deviceSlot).build())
              .build();

      DeviceDetails deviceDetails = getOnlyElement(controller.getHardDisks()).getDeviceDetails();
      new AttachMediumToMachineIfNotAlreadyAttached(deviceDetails, hardDisk, controllerName).apply(machine);

      verify(machine);

   }
View Full Code Here

      expectLastCall().andThrow(isoAttachedException);

      replay(manager, machine, vBox, hardDisk);


      StorageController controller = StorageController.builder()
              .name(controllerName)
              .bus(StorageBus.IDE)
              .attachHardDisk(HardDisk.builder().diskpath("/Users/mattias/jclouds-virtualbox-test/testadmin.vdi")
                    .controllerPort(controllerPort).deviceSlot(deviceSlot).build())
              .build();

      DeviceDetails deviceDetails = getOnlyElement(controller.getHardDisks()).getDeviceDetails();
      new AttachMediumToMachineIfNotAlreadyAttached(deviceDetails, hardDisk, controllerName).apply(machine);

   }
View Full Code Here

      injector = view.utils().injector();

      String instanceName = VIRTUALBOX_IMAGE_PREFIX
               + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, getClass().getSimpleName());

      StorageController ideController = StorageController
               .builder()
               .name("IDE Controller")
               .bus(StorageBus.IDE)
               .attachISO(0, 0, operatingSystemIso)
               .attachHardDisk(
View Full Code Here

   public void setupContext() {
      super.setupContext();
      instanceName = VIRTUALBOX_IMAGE_PREFIX
               + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, getClass().getSimpleName());

      StorageController ideController = StorageController
               .builder()
               .name("IDE Controller")
               .bus(StorageBus.IDE)
               .attachISO(0, 0, operatingSystemIso)
               .attachHardDisk(
View Full Code Here

      Set<StorageController> controllers = vmSpec.getControllers();
      if (controllers.isEmpty()) {
         throw new IllegalStateException(missingIDEControllersMessage(vmSpec));
      }
      StorageController controller = controllers.iterator().next();
      ensureMachineHasStorageControllerNamed(vmName, controller);
      setupHardDisksForController(vmName, controller);
      setupDvdsForController(vmSpec, vmName, controller);

      // Networking
View Full Code Here

   public String adminDisk(String vmName) {
      return workingDir + File.separator + vmName + ".vdi";
   }

   public MasterSpec getMasterSpecForTest() {
      StorageController ideController = StorageController
               .builder()
               .name("IDE Controller")
               .bus(StorageBus.IDE)
               .attachISO(0, 0, operatingSystemIso)
               .attachHardDisk(
View Full Code Here

@Test(testName = "InstallGuestAdditionsLiveTest", groups = "live", singleThreaded = true)
public class InstallGuestAdditionsLiveTest extends BaseVirtualBoxClientLiveTest {

   public void testIsoPresent() {
      StorageController ideController = StorageController.builder().name("IDE Controller").bus(StorageBus.IDE)
               .attachISO(1, 0, "VBoxGuestAdditions_").build();

      VmSpec vmSpecification = VmSpec.builder().id("").name("").memoryMB(512).osTypeId("").controller(ideController)
               .forceOverwrite(true).cleanUpMode(CleanupMode.Full).build();
View Full Code Here

TOP

Related Classes of org.jclouds.virtualbox.domain.StorageController

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.