Bug 1132502

Summary: [GUI over REST API gaps] missing GetVmsByDiskGuid
Product: Red Hat Enterprise Virtualization Manager Reporter: Einav Cohen <ecohen>
Component: ovirt-engineAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, bazulay, derez, gklein, juan.hernandez, lsurette, oramraz, rbalakri, Rhev-m-bugs, scohen, tnisan, yeylon, ykaul
Target Milestone: ovirt-3.6.0-rc   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1132506    

Description Einav Cohen 2014-08-21 13:06:31 UTC
we are missing a way to invoke the GetVmsByDiskGuid query in the REST API. 
this query is being used in the GUI in the 'Disks -> VMs' sub-tab. 

[I assume that this query returns all of the VMs to which a specified Disk is attached]

Comment 1 Juan Hernández 2014-10-31 11:12:28 UTC
Currently the representation of the /disks/{disk:id} resource already supports a "vm" element, intended to contain the reference to the virtual machine that the disk belongs to. In fact this "vm" element is part of the more general "device" entity. Unfortunately this reference is only populated for /vms/{vm:id}/disks collection, which is useless in this case. And even when it is populated it is populated automatically with only one reference, taken from the parent resource. For example, when requesting /vms/123/disks/456 the reference is automatically populated with this:

  <disk>
    <vm id="123"/>
  </disk>

To fix this bug we need to do the following:

1. Change the XML schema so that instead of the "vm" element (or in addition to, in order to preserve backwards compatibility) we have a "vms" element containing potentially multiple "vm" elements.

2. Change the top level disk resource so that the "vms" element is populated invoking the GetVmsByDiskGuid query.

3. Remove the "vm" element, in 4.0.

Comment 2 Ori Gofen 2015-05-10 11:05:41 UTC
verified on ovirt-master3.6

Comment 5 Allon Mureinik 2016-03-10 10:45:14 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 6 Allon Mureinik 2016-03-10 10:48:50 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 7 Allon Mureinik 2016-03-10 12:05:19 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE