Allon Mureinik has submitted this change and it was merged. Change subject: api: Add created Disk object on import response ......................................................................
api: Add created Disk object on import response When doing the following 2 actions: * ovirt-engine/api/openstackimageproviders/UUID/images/UUID/import * ovirt-engine/api/storagedomains/UUID/images/UUID/import with async set to false, the response returns a <disk> element containing id of the new newly created disk. Example POST data: <action> <async>false</async> <storage_domain> <name>mp2</name> </storage_domain> </action> Example POST response: <action> <async>false</async> <storage_domain> <name>mp2</name> </storage_domain> <disk href="/ovirt-engine/api/disks/UUID" id="UUID"> <actions> <link href="/ovirt-engine/api/disks/UUID/export" rel="export"/> <link href="/ovirt-engine/api/disks/UUID/move" rel="move"/> <link href="/ovirt-engine/api/disks/UUID/copy" rel="copy"/> </actions> </disk> <status> <state>complete</state> </status> </action> This patch also introduces SimpleIdResolver, an EntityResolver that receives a business logic entity class and an API model calls and resolves IDs of the business logic entities into model resource objects. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1169228 Change-Id: Ic7a6203a318763f13fca8f0627bb0188b7eb2984 Signed-off-by: Dima Kuznetsov <dkuzn...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCreateTaskHandler.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendActionableResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainImageResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageResource.java 4 files changed, 70 insertions(+), 2 deletions(-) Approvals: Juan Hernandez: Looks good to me, but someone else must approve Dima Kuznetsov: Verified Allon Mureinik: Looks good to me, approved Oved Ourfali: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/38255 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7a6203a318763f13fca8f0627bb0188b7eb2984 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Dima Kuznetsov <dkuzn...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Dima Kuznetsov <dkuzn...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Mooli Tayer <mta...@redhat.com> Gerrit-Reviewer: Ori Liel <ol...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches