Bug 1117747

Summary: Missing 'disks' link for vm element under storage domains (export domain)
Product: Red Hat Enterprise Virtualization Manager Reporter: Carlos Mestre González <cmestreg>
Component: ovirt-engine-restapiAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Carlos Mestre González <cmestreg>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: acanan, amureini, bazulay, cmestreg, gklein, iheim, oramraz, rbalakri, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---Keywords: AutomationBlocker
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_beta2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-16 19:09:39 UTC 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: 1142923, 1156165    

Description Carlos Mestre González 2014-07-09 10:10:04 UTC
Description of problem:
The response for  /api/storagedomains/{storagedomain:id}/vms/{vm:id}/ is missing the link to "disks" collection url.

Version-Release number of selected component (if applicable):
rhevm-3.4.0-0.21.el6ev.noarch (av9.5)

How reproducible:
100%

Steps to Reproduce:
1. Export a vm to a export storage domain
2. Do a get for that object from rest /api/storagedomains/{storagedomain:id}/vms/{vm:id}/

Actual results:
Missing: <link href= "/api/vms/{vm:id}/disks" rel="disks"/>

Expected results:
There's a link to the disks collection

Additional info:
THe actual collection is accesible from the url "/api/storagedomains/{storagedomain:id}/vms/{vm:id}/disks", is the link is missing.

Comment 1 Allon Mureinik 2014-07-21 12:50:19 UTC
Carlos, did this work in previous versions?

Comment 2 Carlos Mestre González 2014-07-29 07:59:21 UTC
I'm not sure since this was never used (at least in automation). I'll check in 3.3.

Comment 3 Carlos Mestre González 2014-07-29 08:40:14 UTC
Yes, I just checked in rhevm-3.3.4-0.53.el6ev.noarch and the link for disks is present there.

Comment 4 Allon Mureinik 2014-08-03 05:45:35 UTC
I don't know what failed there or when it was fixed, but I confirmed this link is present in beta2.
Moving to QA to confirm.

Comment 5 Carlos Mestre González 2014-08-07 09:09:39 UTC
Confirm that link is present in RC1 (ovirt-engine-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch)

Comment 6 Carlos Mestre González 2014-08-11 13:10:11 UTC
I have an additional comment that maybe invalidates this solution.

I can confirm that the <link ...> is present under:

/api/storagedomains/{storagedomain:id}/vms/{vm:id}/

but not under 

/api/storagedomains/{storagedomain:id}/vms/  for each entity.

This doesn't follow the same logic as we have for other collections (/api/vms/ or /api/templates/), so I think it should be included.

But I can confirm that this is not the case for 3.3, disks link can only by seen with a GET of the entity (.../vms/{vm:id})

Comment 7 Carlos Mestre González 2014-08-12 13:36:08 UTC
Since the issue described in the bug works I'm marking it as verified. I'll re-open it or open a new BZ in case there's need depdening on the response to my previous comment

Comment 8 Allon Mureinik 2014-08-12 20:11:33 UTC
(In reply to Carlos Mestre González from comment #6)
> I have an additional comment that maybe invalidates this solution.
> 
> I can confirm that the <link ...> is present under:
> 
> /api/storagedomains/{storagedomain:id}/vms/{vm:id}/
> 
> but not under 
> 
> /api/storagedomains/{storagedomain:id}/vms/  for each entity.
> 
> This doesn't follow the same logic as we have for other collections
> (/api/vms/ or /api/templates/), so I think it should be included.
> 
> But I can confirm that this is not the case for 3.3, disks link can only by
> seen with a GET of the entity (.../vms/{vm:id})

I agree this is a bug, and should probably be handled.
As it's not a regression I don't think we should block 3.5 on it, but we should definitely put in the effort to fix it.

(In reply to Carlos Mestre González from comment #7)
> Since the issue described in the bug works I'm marking it as verified. I'll
> re-open it or open a new BZ in case there's need depdening on the response
> to my previous comment
Yes, please do.

Thanks!

Comment 9 Allon Mureinik 2015-02-16 19:09:39 UTC
RHEV-M 3.5.0 has been released, closing this bug.