Bug 864836 - RESTAPI: RSDL does not document '?current' query parameter in: PUT /api/vms/xxx/cdroms/yyy
RESTAPI: RSDL does not document '?current' query parameter in: PUT /api/vms/x...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Ravi Nori
Barak Dagan
Depends On:
  Show dependency treegraph
Reported: 2012-10-10 04:44 EDT by Barak Dagan
Modified: 2016-02-10 14:24 EST (History)
9 users (show)

See Also:
Fixed In Version: si22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-04 14:59:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Logs from jenkins qa run (build 18 si:19.1) (457.92 KB, application/zip)
2012-10-10 04:44 EDT, Barak Dagan
no flags Details

  None (edit)
Description Barak Dagan 2012-10-10 04:44:03 EDT
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 11:57:49 EDT
Link : http://gerrit.ovirt.org/#/c/8607/

Commit Hash : 7ab9baeea9a0bf3c6a6e0b0668f38bbabd99aae8
Comment 3 Ravi Nori 2012-10-18 12:45:15 EDT
Correct Commit Hash Is : 7006d0e91a3b0595bd49d80b1bae15391745d98c
Comment 4 Barak Dagan 2012-11-14 10:46:03 EST
Verified on si24.

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