Bug 1132503 - [GUI over REST API gaps] missing GetStorageDomainsByImageId
Summary: [GUI over REST API gaps] missing GetStorageDomainsByImageId
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-3.6.3
: 3.6.0
Assignee: Juan Hernández
QA Contact: Aharon Canan
URL:
Whiteboard: storage
Depends On:
Blocks: 1132506
TreeView+ depends on / blocked
 
Reported: 2014-08-21 13:10 UTC by Einav Cohen
Modified: 2016-03-10 06:24 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-31 09:17:14 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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

[this query returns the list of storage domains on which a specified image resides. this list can contain more than 1 item in case the specified image is a template image (as template images can be cloned across multiple storage domains]

Comment 1 Juan Hernández 2014-10-29 12:01:29 UTC
This is already available for disks, as each disk has a reference to the storage domain where it resides, and there can be only one in this case:

  #!/bin/sh -ex

  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}/disks/9409b1fa-f653-498b-97b8-f4bb4fb0e4a3"

  <disk id="...">
    <name>mydisk</name>
    <alias>mydisk</name>
    <storage_domains>
      <storage_domain id="23bae86f-0da9-4a1b-a0a1-f13c6d503984"/>
    </storage_domains>
    ...
  </disk>

To fix this bug what remains to be done is to add this same "storage_domains" section to templates.

Comment 2 Juan Hernández 2014-10-31 09:17:14 UTC
The /templates/{template:id}/disks collection also contains the references to the storage domains, so no modification is needed there.


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