Search in sources :

Example 6 with Display

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));
}
Also used : Action(org.ovirt.engine.api.model.Action) RunVmOnceParams(org.ovirt.engine.core.common.action.RunVmOnceParams) DisplayType(org.ovirt.engine.api.model.DisplayType) Vm(org.ovirt.engine.api.model.Vm) Display(org.ovirt.engine.api.model.Display)

Example 7 with Display

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;
}
Also used : Display(org.ovirt.engine.api.model.Display)

Example 8 with Display

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;
}
Also used : Display(org.ovirt.engine.api.model.Display)

Aggregations

Display (org.ovirt.engine.api.model.Display)8 Certificate (org.ovirt.engine.api.model.Certificate)3 Cluster (org.ovirt.engine.api.model.Cluster)2 ExternalHostProvider (org.ovirt.engine.api.model.ExternalHostProvider)2 Host (org.ovirt.engine.api.model.Host)2 Vm (org.ovirt.engine.api.model.Vm)2 VmPool (org.ovirt.engine.api.model.VmPool)2 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)2 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)2 BigDecimal (java.math.BigDecimal)1 Action (org.ovirt.engine.api.model.Action)1 Boot (org.ovirt.engine.api.model.Boot)1 Cpu (org.ovirt.engine.api.model.Cpu)1 CpuTopology (org.ovirt.engine.api.model.CpuTopology)1 DisplayType (org.ovirt.engine.api.model.DisplayType)1 ExternalStatus (org.ovirt.engine.api.model.ExternalStatus)1 GuestOperatingSystem (org.ovirt.engine.api.model.GuestOperatingSystem)1 HardwareInformation (org.ovirt.engine.api.model.HardwareInformation)1 HighAvailability (org.ovirt.engine.api.model.HighAvailability)1 HostDevicePassthrough (org.ovirt.engine.api.model.HostDevicePassthrough)1