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();
}
Aggregations