package org.ovirt.engine.api.resource;

import javax.ws.rs.DELETE;
import javax.ws.rs.core.Response;

import org.ovirt.engine.api.model.WatchDog;

public interface WatchdogResource extends DeviceResource<WatchDog> {
    @DELETE
    Response remove();
}

package org.ovirt.engine.api.resource;

import javax.ws.rs.DELETE;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

import org.ovirt.engine.api.model.WatchDog;

@Produces({ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML})
public interface WatchdogResource extends DeviceResource<WatchDog> {
    @DELETE
    Response remove();
}

Add @Provides to watchdogs resource
restapi: Add @Provides to watchdogs resource

Currently the watchdogs resource doesn't have a @Provides annotation. In
theory this shouldn't be required as the annotation is in the base
class. But in practice the application server reacts differently, in
particular if the annotation isn't present the server won't use use the
JAXB or JSON providers when the "Accept" header doesn't have a value.
This means that requests like this:

  DELETE /vms/{vm:id}/watchdogs/{watchdog:id}

Will fail with the following error message:

  Could not find MessageBodyWriter for response object of type:
  org.ovirt.engine.api.model.Action of media type:
  application/octet-stream

This specific problem can be resolved adding the "Accept" header to the
request, and that is good practice. For backwards compatibility sake
this patch adds the annotation.

Change-Id: I1bcb6263450be603b21e398196c6713ad599ce25
Bug-Url: https://bugzilla.redhat.com/1250046
Signed-off-by: Juan Hernandez <59e5b8140de97cc91c3fb6c5342dce948469af8c@redhat.com>
