Bug 1092070

Summary: ;current should work for cdroms collection, not just for cdrom resources
Product: Red Hat Enterprise Virtualization Manager Reporter: Christophe Fergeau <cfergeau>
Component: ovirt-engine-restapiAssignee: Martin Betak <mbetak>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: amureini, bazulay, gklein, iheim, juan.hernandez, mavital, michal.skrivanek, oramraz, rbalakri, Rhev-m-bugs, sherold, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.5.0-alpha2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 08:25:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1142923, 1156165    

Description Christophe Fergeau 2014-04-28 16:31:32 UTC
Now that rhbz#1014039 is fixed, GET https://rhevm34.example.com//api/vms/$GUID/cdroms/00000000-0000-0000-0000-000000000000;current returns the current ISO image inserted in the CDROM, which can be different from the one which will be present at boot time (getting the same URL without ';current' would give us that image.
However, fetching the cdroms collection also gives the ISOs inserted in the cdrom, but ;current does not change anything there, the boot time ISO is always listed:

GET https://rhevm34.example.com//api/vms/$GUID/cdroms/00000000-0000-0000-0000-000000000000;current

<cdrom href="/api/vms/$GUID/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"><vm href="/api/vms/$GUID" id="$GUID"/><file id="current.iso"/></cdrom>


GET https://rhevm34.example.com//api/vms/$GUID/cdroms/00000000-0000-0000-0000-000000000000

<cdrom href="/api/vms/$GUID/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"><vm href="/api/vms/$GUID" id="$GUID"/><file id="boot.iso"/></cdrom>



GET https://rhevm34.example.com//api/vms/$GUID/cdroms;current

<cdroms>
  <cdrom href="/api/vms/$GUID/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"><vm href="/api/vms/$GUID" id="$GUID"/><file id="boot.iso"/></cdrom>
</cdroms>


GET https://rhevm34.example.com//api/vms/$GUID/cdroms

<cdroms>
  <cdrom href="/api/vms/$GUID/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"><vm href="/api/vms/$GUID" id="$GUID"/><file id="boot.iso"/></cdrom>
</cdroms>


I'd expect to get current.iso in the 3rd GET.

Comment 1 Lukas Svaty 2014-08-12 15:17:10 UTC
verified in ovirt-rc1

Comment 2 Omer Frenkel 2015-02-17 08:25:44 UTC
RHEV-M 3.5.0 has been released