use of org.ovirt.engine.api.model.Display in project ovirt-engine by oVirt.
the class BackendVmResourceTest method testStartWithModifiedGraphics.
private void testStartWithModifiedGraphics(GraphicsType graphicsType) throws Exception {
setUpWindowsGetEntityExpectations(1, false);
setUriInfo(setUpActionExpectations(ActionType.RunVmOnce, RunVmOnceParams.class, new String[] { "VmId", "RunOnceGraphics" }, new Object[] { GUIDS[0], Collections.singleton(graphicsType) }));
Action action = new Action();
action.setVm(new Vm());
action.getVm().setDisplay(new Display());
DisplayType display = (graphicsType == GraphicsType.VNC) ? DisplayType.VNC : DisplayType.SPICE;
action.getVm().getDisplay().setType(display);
verifyActionResponse(resource.start(action));
}
use of org.ovirt.engine.api.model.Display in project ovirt-engine by oVirt.
the class DisplayMapper method map.
@Mapping(from = InstanceType.class, to = Display.class)
public static Display map(InstanceType instanceType, Display display) {
Display result = (display == null) ? new Display() : display;
result.setMonitors(instanceType.getNumOfMonitors());
result.setSingleQxlPci(instanceType.getSingleQxlPci());
result.setSmartcardEnabled(instanceType.isSmartcardEnabled());
return result;
}
use of org.ovirt.engine.api.model.Display in project ovirt-engine by oVirt.
the class DisplayMapper method map.
@Mapping(from = VmTemplate.class, to = Display.class)
public static Display map(VmTemplate vmTemplate, Display display) {
Display result = (display == null) ? new Display() : display;
result.setMonitors(vmTemplate.getNumOfMonitors());
result.setSingleQxlPci(vmTemplate.getSingleQxlPci());
result.setAllowOverride(vmTemplate.isAllowConsoleReconnect());
result.setSmartcardEnabled(vmTemplate.isSmartcardEnabled());
result.setKeyboardLayout(vmTemplate.getVncKeyboardLayout());
result.setFileTransferEnabled(vmTemplate.isSpiceFileTransferEnabled());
result.setCopyPasteEnabled(vmTemplate.isSpiceCopyPasteEnabled());
return result;
}
Aggregations