Change in ovirt-engine[master]: restapi: Add @Provides to watchdogs resource

juan.hernandez at redhat.com juan.hernandez at redhat.com
Wed Aug 19 08:11:41 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: 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 <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/WatchdogResource.java
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Ori Liel: Looks good to me, approved
  Juan Hernandez: Verified
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/44910
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1bcb6263450be603b21e398196c6713ad599ce25
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list