if (vm.isSetOs() && vm.getOs().isSetBoot() && vm.getOs().getBoot().isSetDevices() && vm.getOs().getBoot().getDevices().isSetDevices()) { params.setBootSequence(map(vm.getOs().getBoot(), null)); if (vm.getOs().isSetBoot() && vm.getOs().getBoot().isSetDevices() && vm.getOs().getBoot().getDevices().isSetDevices()) { params.setBootSequence(map(vm.getOs().getBoot(), null)); if (vm.getOs().isSetKernel()) { params.setKernelUrl(vm.getOs().getKernel()); if (vm.getOs().isSetInitrd()) { params.setInitrdUrl(vm.getOs().getInitrd()); if (vm.getOs().isSetCmdline()) { params.setKernelParams(vm.getOs().getCmdline());
@Test public void testStartWithBootDev() { setUpWindowsGetEntityExpectations(1, false); setUriInfo(setUpActionExpectations(ActionType.RunVmOnce, RunVmOnceParams.class, new String[] { "VmId", "BootSequence" }, new Object[] { GUIDS[0], BootSequence.N })); Action action = new Action(); action.setVm(new Vm()); action.getVm().setOs(new OperatingSystem()); action.getVm().getOs().setBoot(new Boot()); action.getVm().getOs().getBoot().setDevices(new Boot.DevicesList()); action.getVm().getOs().getBoot().getDevices().getDevices().add(BootDevice.NETWORK); verifyActionResponse(resource.start(action)); }
transform.getCpu().getTopology().getSockets()); assertEquals(model.getBios().getBootMenu().isEnabled(), transform.getBios().getBootMenu().isEnabled()); assertNotNull(transform.getOs()); assertTrue(transform.getOs().isSetBoot()); assertEquals(model.getOs().getBoot().getDevices().getDevices(), transform.getOs().getBoot().getDevices().getDevices()); assertEquals(model.getOs().getKernel(), transform.getOs().getKernel()); assertEquals(model.getOs().getInitrd(), transform.getOs().getInitrd()); assertEquals(model.getOs().getCmdline(), transform.getOs().getCmdline()); assertTrue(transform.isSetDisplay()); assertEquals(model.isSetDisplay(), transform.isSetDisplay());
from.getDisplay().setType(DisplayType.SPICE); from.getPayloads().getPayloads().get(0).setType(VmDeviceType.CDROM); List<BootDevice> devices = from.getOs().getBoot().getDevices().getDevices(); for (int i = 0; i < devices.size(); i++) { devices.set(i, BootDevice.HD);
to.setOs(adaptOut(from.getOs()));