@Test public void testStartWithCdRomAndFloppy() { setUpWindowsGetEntityExpectations(1, false); setUriInfo(setUpActionExpectations(ActionType.RunVmOnce, RunVmOnceParams.class, new String[] { "VmId", "DiskPath", "FloppyPath" }, new Object[] { GUIDS[0], ISO_ID, FLOPPY_ID })); Action action = new Action(); action.setVm(new Vm()); action.getVm().setCdroms(new Cdroms()); action.getVm().getCdroms().getCdroms().add(new Cdrom()); action.getVm().getCdroms().getCdroms().get(0).setFile(new File()); action.getVm().getCdroms().getCdroms().get(0).getFile().setId(ISO_ID); action.getVm().setFloppies(new Floppies()); action.getVm().getFloppies().getFloppies().add(new Floppy()); action.getVm().getFloppies().getFloppies().get(0).setFile(new File()); action.getVm().getFloppies().getFloppies().get(0).getFile().setId(FLOPPY_ID); verifyActionResponse(resource.start(action)); }
if (vm.isSetFloppies() && vm.getFloppies().isSetFloppies()) { String file = vm.getFloppies().getFloppies().get(0).getFile().getId(); if (file != null) { params.setFloppyPath(file);
to.getFloppies().getFloppies().addAll(adaptOut(from.getFloppies().getFloppies()));