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


  
   private static final String VBOX_VERISION = "4.2.0";

   @Test
   public void testInstallGAWhenIsoIsPresent() {
      StorageController ideController = StorageController.builder()
            .name("IDE Controller")
            .bus(StorageBus.IDE)
            .attachISO(1, 0, "VBoxGuestAdditions_")
            .build();
      VmSpec vmSpec = VmSpec.builder()
View Full Code Here

             "/mnt/VBoxLinuxAdditions.run --nox11\n");
   }
  
   @Test
   public void testInstallGAWhenIsoIsNotPresent() {
      StorageController ideController = StorageController.builder()
            .name("IDE Controller")
            .bus(StorageBus.IDE)
            .build();
      VmSpec vmSpec = VmSpec.builder()
            .id("").name("")
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

   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

      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

      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

   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

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.