@Override public BootMenu adapt(V3BootMenu from) { BootMenu to = new BootMenu(); if (from.isSetEnabled()) { to.setEnabled(from.isEnabled()); } return to; } }
@Test public void testStartWithBootMenu() { setUpWindowsGetEntityExpectations(1, false); setUriInfo(setUpActionExpectations(ActionType.RunVmOnce, RunVmOnceParams.class, new String[] { "VmId", "BootMenuEnabled" }, new Object[] { GUIDS[0], true })); Action action = new Action(); action.setVm(new Vm()); action.getVm().setBios(new Bios()); action.getVm().getBios().setBootMenu(new BootMenu()); action.getVm().getBios().getBootMenu().setEnabled(true); verifyActionResponse(resource.start(action)); }
model.getBios().getBootMenu().setEnabled(entity.isBootMenuEnabled());