Bug 1092070 - ;current should work for cdroms collection, not just for cdrom resources
Summary: ;current should work for cdroms collection, not just for cdrom resources
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.5.0
Assignee: Martin Betak
QA Contact: Lukas Svaty
URL:
Whiteboard: virt
Depends On:
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-04-28 16:31 UTC by Christophe Fergeau
Modified: 2015-02-17 08:25 UTC (History)
12 users (show)

Fixed In Version: ovirt-3.5.0-alpha2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 08:25:44 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 27974 0 master MERGED restapi: Support ;current on cdroms collection Never

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


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