Bug 1132501

Summary: [GUI over REST API gaps] missing GetVmTemplatesFromStorageDomain
Product: Red Hat Enterprise Virtualization Manager Reporter: Einav Cohen <ecohen>
Component: ovirt-engine-restapiAssignee: Allon Mureinik <amureini>
Status: CLOSED DUPLICATE QA Contact: Aharon Canan <acanan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: amureini, bazulay, derez, ecohen, gklein, iheim, juan.hernandez, lsurette, oramraz, rbalakri, Rhev-m-bugs, scohen, tnisan, yeylon, ykaul
Target Milestone: ovirt-3.6.3Keywords: Reopened
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-20 14:42:12 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: 1132506    

Description Einav Cohen 2014-08-21 13:03:17 UTC
we are missing a way to invoke the GetVmTemplatesFromStorageDomain query in the REST API. 
this query is being used in the GUI in the 'Storage -> Templates' sub-tab. 

[AFAIK, this query returns all templates that have at list one disk that resides on the specified storage domain; it returns the templates information along with their disks' information]

Comment 1 Juan Hernández 2014-10-31 09:25:18 UTC
This information is already available, using a search query:

#!/bin/sh -x
url="https://ovirt.example.com/ovirt-engine/api"
user="admin@internal"
password="******"

curl \
--verbose \
--insecure \
--request GET \
--user "${user}:${password}" \
--header "Accept: application/xml" \
"${url}/templates?search=storage%3Dmydata"

Comment 2 Daniel Erez 2014-11-01 23:08:34 UTC
@Juan - this query is used by the UserPortal which requires a filtered list according to user permissions. The search mechanism doesn't support that filtering, do we plan to introduce such functionality when moving the UI on top of the rest-api? Or maybe we can invoke this query on the specific search request?

Comment 3 Juan Hernández 2014-11-03 08:48:49 UTC
Bug 1155967 is requesting implementation of the "search" mechanism combined with the "Filter" header, but it won't probably be implemented for 3.6, thus I'm reopening this bug.

Comment 4 Juan Hernández 2014-11-20 14:42:12 UTC
Bug 1155967 has been re-targed for 3.6, so this can be now be closed as a duplicate, as it will be possible to use the mechanism described in comment 1 combined with the "Filter" header.

*** This bug has been marked as a duplicate of bug 1155967 ***