Change in ovirt-engine[master]: restapi: Don't allow removing a disk via the VM's disks API

Juan Hernandez has submitted this change and it was merged. Change subject: restapi: Don't allow removing a disk via the VM's disks API ...................................................................... restapi: Don't allow removing a disk via the VM's disks API Sending a DELETE to /vms/{vm:id}/disks/{disk:id} should just detach the disk from the VM, not potentially remove the disk from the system entirely (which should be done by sending a DELETE to /vms/disks/{disk:id}. Backwards compatibility is preserved, modifying the V3 layer so that when the operation is invoked without the "action.detach" parameter the disk is explicitly deleted using the top level disks service. Change-Id: I0805a919b60bbb3636a2173446b0104fb69cac01 Bug-Url: https://bugzilla.redhat.com/1332960 Signed-off-by: Allon Mureinik <amureini@redhat.com> Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M backend/manager/modules/restapi/README.adoc M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmDiskResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmDiskServer.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmDisksServer.java M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmDiskResourceTest.java 5 files changed, 41 insertions(+), 53 deletions(-) Approvals: Tal Nisan: Looks good to me, approved Juan Hernandez: Verified Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/57091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0805a919b60bbb3636a2173446b0104fb69cac01 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
juan.hernandez@redhat.com