Examples of saveSettings()


Examples of org.virtualbox_4_2.IMachine.saveSettings()

      expect(manager.getVBox()).andReturn(vBox).anyTimes();
      expect(vBox.createHardDisk(diskFormat, diskPath)).andReturn(hardDisk);
      expect(hardDisk.createBaseStorage(anyLong(), anyLong())).andReturn(progress);

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

      StorageController controller = StorageController.builder()
              .name(controllerName)
              .bus(StorageBus.IDE)
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

    List<String> redirects = Lists.newArrayList();
    expect(natEngine.getRedirects()).andReturn(redirects);
    natEngine.addRedirect("TCP@127.0.0.1:2222->:22", TCP, "127.0.0.1",
        2222, "", 22);
    iNetworkAdapter.setEnabled(true);
    machine.saveSettings();

    replay(machine, iNetworkAdapter, natEngine);
    NetworkAdapter networkAdapter = NetworkAdapter.builder()
        .networkAttachmentType(NetworkAttachmentType.NAT)
        .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

        .andThrow(
            new VBoxException(null,
                "VirtualBox error: A NAT rule of this name already exists (0x80070057)"));

    iNetworkAdapter.setEnabled(true);
    machine.saveSettings();

    replay(machine, iNetworkAdapter, natEngine);
    NetworkAdapter networkAdapter = NetworkAdapter.builder()
        .networkAttachmentType(NetworkAttachmentType.NAT)
        .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      Map<Long, DeviceType> positionAndDeviceType = ImmutableMap.of(1l, DeviceType.HardDisk);
      IMachine machine = createMock(IMachine.class);
      for (long position : positionAndDeviceType.keySet()) {
         machine.setBootOrder(position, positionAndDeviceType.get(position));
      }
      machine.saveSettings();
      replay(machine);
      new ApplyBootOrderToMachine(positionAndDeviceType).apply(machine);
      verify(machine);
   }
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      expect(manager.getVBox()).andReturn(vBox).anyTimes();
      expect(vBox.createHardDisk(diskFormat, diskPath)).andReturn(hardDisk);
      expect(hardDisk.createBaseStorage(anyLong(), anyLong())).andReturn(progress);

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

      StorageController controller = StorageController.builder()
              .name(controllerName)
              .bus(StorageBus.IDE)
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

    List<String> redirects = Lists.newArrayList();
    expect(natEngine.getRedirects()).andReturn(redirects);
    natEngine.addRedirect("TCP@127.0.0.1:2222->:22", TCP, "127.0.0.1",
        2222, "", 22);
    iNetworkAdapter.setEnabled(true);
    machine.saveSettings();

    replay(machine, iNetworkAdapter, natEngine);
    NetworkAdapter networkAdapter = NetworkAdapter.builder()
        .networkAttachmentType(NetworkAttachmentType.NAT)
        .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

        .andThrow(
            new VBoxException(null,
                "VirtualBox error: A NAT rule of this name already exists (0x80070057)"));

    iNetworkAdapter.setEnabled(true);
    machine.saveSettings();

    replay(machine, iNetworkAdapter, natEngine);
    NetworkAdapter networkAdapter = NetworkAdapter.builder()
        .networkAttachmentType(NetworkAttachmentType.NAT)
        .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

    expect(machine.getNetworkAdapter(adapterId)).andReturn(iNetworkAdapter);
    iNetworkAdapter.setAttachmentType(Bridged);
    iNetworkAdapter.setMACAddress(macAddress);
    iNetworkAdapter.setBridgedInterface(hostInterface);
    iNetworkAdapter.setEnabled(true);
    machine.saveSettings();

    replay(machine, iNetworkAdapter);
    NetworkAdapter networkAdapter = NetworkAdapter.builder()
        .networkAttachmentType(NetworkAttachmentType.Bridged).build();
    NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      IMachine machine = createMock(IMachine.class);

      int controllerPort = 0;
      int device = 1;

      machine.saveSettings();
      machine.detachDevice(controller, controllerPort, device);

      replay(machine);

      new DetachDistroMediumFromMachine(controller, controllerPort, device).apply(machine);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      expect(vBox.findMachine(oldMachineName)).andReturn(oldMachine);
      expect(manager.getSessionObject()).andReturn(detachSession);
      oldMachine.lockMachine(detachSession, LockType.Write);
      expect(detachSession.getMachine()).andReturn(oldMachine);
      oldMachine.detachDevice(oldAttachmentController, oldAttachmentPort, oldAttachmentDevice);
      oldMachine.saveSettings();

      expect(medium.deleteStorage()).andReturn(progress);
      expect(vBox.createHardDisk(diskFormat, adminDiskPath)).andReturn(newHardDisk);
      expect(newHardDisk.createBaseStorage(anyLong(), anyLong())).andReturn(progress);
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.