Bug 864836 - RESTAPI: RSDL does not document '?current' query parameter in: PUT /api/vms/xxx/cdroms/yyy
Summary: RESTAPI: RSDL does not document '?current' query parameter in: PUT /api/vms/x...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Ravi Nori
QA Contact: Barak Dagan
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-10 08:44 UTC by Barak Dagan
Modified: 2016-02-10 19:24 UTC (History)
9 users (show)

Fixed In Version: si22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 19:59:15 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


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

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):
3.1.0

How reproducible:
The following test fails each time:
http://jenkins.qa.lab.tlv.redhat.com:8080/view/Core+Tools/job/3.1-automation_restapi_reg_vms_sdk

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',
    Cdrom_image='en_windows_7_enterprise_x64_dvd_x15-70749.iso'
  Running command: changeCDWhileRunning(vm_name='restvm_run_once',
    cdrom_image='en_windows_7_enterprise_x64_dvd_x15-70749.iso')
  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>
3.
  
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.


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