Bug 1376345 - [REST] Remove VM: Disk is deleted although choose detach only
Summary: [REST] Remove VM: Disk is deleted although choose detach only
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.0.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ---
: ---
Assignee: Michal Skrivanek
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-15 08:09 UTC by Israel Pinto
Modified: 2016-09-16 07:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-16 07:02:02 UTC
oVirt Team: Virt
ipinto: planning_ack?
ipinto: devel_ack?
ipinto: testing_ack?


Attachments (Terms of Use)
engine.log (119.74 KB, text/plain)
2016-09-15 08:09 UTC, Israel Pinto
no flags Details

Description Israel Pinto 2016-09-15 08:09:00 UTC
Created attachment 1201156 [details]
engine.log

Description of problem:
Remove VM with disk and choose not to remove disk via REST.

REST request:

DELETE /api/vms/<uuid> HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action>
    <vm>
        <disks>
            <detach_only>true</detach_only>
        </disks>
    </vm>
</action>

also try with diskattachments: 
<action>
    <vm>
        <diskattachments>
            <detach_only>true</detach_only>
        </diskattachments>
    </vm>
</action>

Version-Release number of selected component (if applicable):
rhevm-4.0.4.2-0.1.el7ev.noarch

How reproducible:
100 %

Steps to Reproduce:
1. Create Vm with disk
2. Remove VM and de-attach disk with REST 

Actual results:
VM and Disk deleted

Expected results:
VM will be deleted 
Disk will not be deleted

Comment 1 Tomas Jelinek 2016-09-16 07:02:02 UTC
The <detach_only>true</detach_only> has been replaced by url param. For details please check the commit message of: https://gerrit.ovirt.org/#/c/46734/


Note You need to log in before you can comment on or make changes to this bug.