Change in ovirt-engine[ovirt-engine-4.0]: restapi: Add V3 support for disks detail

oourfali at redhat.com oourfali at redhat.com
Tue Jul 26 08:05:20 UTC 2016


Oved Ourfali has submitted this change and it was merged.

Change subject: restapi: Add V3 support for disks detail
......................................................................


restapi: Add V3 support for disks detail

Version 3 of the API supports a `detail` parameter that can be used to
include inline details into certain objects. In particular it can be
used to request details about the disks of a virtual machine:

  GET /ovirt-engine/api/vms
  Version: 3
  Accept: application/xml; detail=disks

This capability has been removed in version 4 of the API, but needs to
be preserved in version 3, and it works for all the objects that it used
to work, except for disks, because the "disks" collection has been
replaced with "diskattachments".

To fix this issue this patch moves the logic that handles the "detail"
parameter to the V3 compatibility layer, where the "disks" collection
still exists.

Change-Id: Icac0bea3503b542e60edf61fad5da0a1af9bac19
Bug-Url: https://bugzilla.redhat.com/1358860
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
(cherry picked from commit aad61b8c3c1911983c8851d7b04aa8ed67819d96)
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/helpers/V3VmHelper.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmServer.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmsServer.java
5 files changed, 51 insertions(+), 17 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icac0bea3503b542e60edf61fad5da0a1af9bac19
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list