Search in sources :

Example 1 with V3RSDL

use of org.ovirt.engine.api.v3.types.V3RSDL in project ovirt-engine by oVirt.

the class V3SystemServer method get.

@GET
public Response get(@Context HttpHeaders headers, @Context UriInfo ui) {
    // Check if the RSDL was requested, and return it:
    if (ParametersHelper.getParameter(headers, ui, "rsdl") != null) {
        try {
            V3RSDL rsdl = getRSDL();
            return Response.ok().entity(rsdl).build();
        } catch (Exception exception) {
            throw new WebApplicationException(exception, Response.status(Response.Status.INTERNAL_SERVER_ERROR).build());
        }
    }
    // Adapt the V4 response:
    Response response = adaptResponse(getDelegate()::get);
    // Replace the "Link" header with links calculated from the response body:
    response = replaceLinkHeader(response);
    return response;
}
Also used : Response(javax.ws.rs.core.Response) V3RSDL(org.ovirt.engine.api.v3.types.V3RSDL) WebApplicationException(javax.ws.rs.WebApplicationException) IOException(java.io.IOException) WebApplicationException(javax.ws.rs.WebApplicationException) GET(javax.ws.rs.GET)

Aggregations

IOException (java.io.IOException)1 GET (javax.ws.rs.GET)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 Response (javax.ws.rs.core.Response)1 V3RSDL (org.ovirt.engine.api.v3.types.V3RSDL)1