Bug 949546
| Summary: | [restapi] Requesting templates of a storage domain returns an empty list | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Gadi Ickowicz <gickowic> |
| Component: | ovirt-engine-restapi | Assignee: | Ravi Nori <rnori> |
| Status: | CLOSED NOTABUG | QA Contact: | Gadi Ickowicz <gickowic> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.2.0 | CC: | acathrow, dyasny, hateya, iheim, mpastern, nlevinki, oramraz, Rhev-m-bugs, ykaul |
| Target Milestone: | --- | ||
| Target Release: | 3.2.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | infra | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-04-09 08:41:30 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I have few templates under my storage domain , can't list them as well : [RHEVM shell (connected)]# list templates --storagedomain-identifier bd63b51c-de2b-42b3-b5e7-1dbbdf25b5e6 hmmm, templates nor VMs reside in a storage domain, rather they have disks on the SD. On the UI we have templates view per data domain , we have same queries in CLI as well . (In reply to comment #2) > hmmm, templates nor VMs reside in a storage domain, rather they have disks > on the SD. what type is your SD? if it's not a import/export domain, you have no vm/templates there ... (In reply to comment #4) > what type is your SD? if it's not a import/export domain, you have no > vm/templates there ... The domain is a data domain. However it makes sense to list templates that are part of a storage domain due to the following scenario (for example): User wants to remove a storage domain, but the storage domain has a template (with disks) on it. A query to /api/storagedomains/{storagedomain:id}/disks shows the disks. Trying to remove these however will fail due to the disks being linked to the template. In this case a user should be able to query /api/storagedomains/{storagedomain:id}/templates to get all the templates on the storage domain to remove them (In reply to comment #5) > (In reply to comment #4) > > what type is your SD? if it's not a import/export domain, you have no > > vm/templates there ... > > The domain is a data domain. However it makes sense to list templates that > are part of a storage domain due to the following scenario (for example): > > User wants to remove a storage domain, but the storage domain has a template > (with disks) on it. A query to /api/storagedomains/{storagedomain:id}/disks > shows the disks. Trying to remove these however will fail due to the disks > being linked to the template. this is not correct, you can remove the disks from SD regardless of template > In this case a user should be able to query > /api/storagedomains/{storagedomain:id}/templates to get all the templates on > the storage domain to remove them you don't need to remove all templates form the SD, but theirs disks, as template itself does not resides on the SD, only it's disk/s import templates is a special use-case where entire template is located on the SD with all it's metadata as it has to be used on the destination env. (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > what type is your SD? if it's not a import/export domain, you have no > > > vm/templates there ... > > > > The domain is a data domain. However it makes sense to list templates that > > are part of a storage domain due to the following scenario (for example): > > > > User wants to remove a storage domain, but the storage domain has a template > > (with disks) on it. A query to /api/storagedomains/{storagedomain:id}/disks > > shows the disks. Trying to remove these however will fail due to the disks > > being linked to the template. > > this is not correct, you can remove the disks from SD regardless of template > > > In this case a user should be able to query > > /api/storagedomains/{storagedomain:id}/templates to get all the templates on > > the storage domain to remove them > > you don't need to remove all templates form the SD, but theirs disks, as > template > itself does not resides on the SD, only it's disk/s > > import templates is a special use-case where entire template is located on > the > SD with all it's metadata as it has to be used on the destination env. On the UI I can see under data storage domain the top X consuming VM's in the storage domain ( storage wise ) . Can I get the same information in CLI ? We used to have this option in Powershell btw. Please advise if we need to open new RFE or reopen this bug for adding this query . you should be able seeing this at [1] using query/matrix parameter in api, (SDKs/CLIs will inherit this capability automatically), please file RFE against api on this. thanks. [1] /api/storagedomains/xxx/disks |
Description of problem: Requesting all templates on a specific storage domain (/api/storagedomains/{storagedomain:id}/templates) returns an empty list even if there are templates on the storage domain How reproducible: 100% Steps to Reproduce: 1. Create a template from a vm 2. Try to access it at /api/storagedomains/{storagedomain:id}/templates Actual results: Empty list is returned Expected results: List of templates on the storage domain should be returned