Search in sources :

Example 1 with ProxyTicket

use of org.ovirt.engine.api.model.ProxyTicket in project ovirt-engine by oVirt.

the class BackendVmGraphicsConsoleResource method proxyTicket.

@Override
public Response proxyTicket(Action action) {
    final String plainConsoleId = HexUtils.hex2string(consoleId);
    final GraphicsType graphicsTypeModel = GraphicsType.fromValue(plainConsoleId);
    final org.ovirt.engine.core.common.businessentities.GraphicsType graphicsTypeEntity = VmMapper.map(graphicsTypeModel, null);
    final String ticketValue = getTicket(graphicsTypeEntity);
    if (!action.isSetProxyTicket()) {
        action.setProxyTicket(new ProxyTicket());
    }
    action.getProxyTicket().setValue(ticketValue);
    return Response.ok().entity(action).build();
}
Also used : GraphicsType(org.ovirt.engine.api.model.GraphicsType) BackendGraphicsConsoleHelper.asGraphicsType(org.ovirt.engine.api.restapi.resource.BackendGraphicsConsoleHelper.asGraphicsType) ProxyTicket(org.ovirt.engine.api.model.ProxyTicket)

Aggregations

GraphicsType (org.ovirt.engine.api.model.GraphicsType)1 ProxyTicket (org.ovirt.engine.api.model.ProxyTicket)1 BackendGraphicsConsoleHelper.asGraphicsType (org.ovirt.engine.api.restapi.resource.BackendGraphicsConsoleHelper.asGraphicsType)1