Bug 864836

Summary: RESTAPI: RSDL does not document '?current' query parameter in: PUT /api/vms/xxx/cdroms/yyy
Product: Red Hat Enterprise Virtualization Manager Reporter: Barak Dagan <bdagan>
Component: ovirt-engine-restapiAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Barak Dagan <bdagan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: dyasny, ecohen, iheim, mpastern, oramraz, pstehlik, Rhev-m-bugs, sgrinber, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: si22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:59:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Logs from jenkins qa run (build 18 si:19.1) none

Description Barak Dagan 2012-10-10 08:44:03 UTC
Created attachment 624658 [details]
Logs from jenkins qa run (build 18 si:19.1)

Description of problem:
update on cdrom triggers vm update (and it fails with appropriate error message)
unless '?current' query parameter raised:

>> UPDATE api content is --  collection :cdroms element:<cdrom href="/api/vms/00548c94-b208-4ddd-b5a4-e28bf4438e2e/cdroms/00000000-0000-0000-0000-000000000000?current" id="00000000-0000-0000-0000-000000000000">
>>     <vm href="/api/vms/00548c94-b208-4ddd-b5a4-e28bf4438e2e" id="00548c94-b208-4ddd-b5a4-e28bf4438e2e"/>
>>     <file id="en_windows_7_enterprise_x64_dvd_x15-70749.iso"/>
>> </cdrom>
>> Failed to update an element, status: 400, reason: Bad Request, details:
>> status: 400
>> reason: Bad Request

Version-Release number of selected component (if applicable):

How reproducible:
The following test fails each time:

Steps to Reproduce (see the above test - Iteration number: 150):
1.Run VM once with boot from cdrom:
  Test action: runVmOnce
  Test parameters: True, vm='restvm_run_once', cdrom_image='en_windows_7_enterprise_x64_dvd_x15-70749.iso', boot_dev='cdrom', pause='true'

2.Chance CD while the VM is on:
  Test action: changeCDWhileRunning
  Test parameters: vm_name='restvm_run_once',
  Running command: changeCDWhileRunning(vm_name='restvm_run_once',
  UPDATE api content is :collection :cdroms element:
    <cdrom href="/api/vms/00548c94-b208-4ddd-b5a4-e28bf4438e2e/cdroms
    <vm href="/api/vms/00548c94-b208-4ddd-b5a4-e28bf4438e2e" 
   <file id="en_windows_7_enterprise_x64_dvd_x15-70749.iso"/>
Actual results:

Expected results:

Additional info:

Comment 2 Ravi Nori 2012-10-18 15:57:49 UTC
Link : http://gerrit.ovirt.org/#/c/8607/

Commit Hash : 7ab9baeea9a0bf3c6a6e0b0668f38bbabd99aae8

Comment 3 Ravi Nori 2012-10-18 16:45:15 UTC
Correct Commit Hash Is : 7006d0e91a3b0595bd49d80b1bae15391745d98c

Comment 4 Barak Dagan 2012-11-14 15:46:03 UTC
Verified on si24.