Bug 829672 - [RFE] RESTAPI: vm/template Import candidates should have /disks sub-collection
[RFE] RESTAPI: vm/template Import candidates should have /disks sub-collection
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Ravi Nori
Meital Bourvine
storage
: FutureFeature, Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-07 05:11 EDT by Michael Pasternak
Modified: 2016-02-10 15:24 EST (History)
13 users (show)

See Also:
Fixed In Version: is1
Doc Type: Enhancement
Doc Text:
Previously in the REST API, there was no disk sub-collection for virtual machines or templates in an export domain. Due to this, users would not be able to use the REST API to view the disks owned by these objects. With this update, a disk sub-collection has been added to virtual machines and templates in export domains, making it possible for administrators to view the disks that belong to those virtual machines or templates.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 12:11:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 11126 None None None Never

  None (edit)
Description Michael Pasternak 2012-06-07 05:11:58 EDT

    
Comment 1 Itamar Heim 2013-01-06 02:44:37 EST
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.
Comment 2 Michael Pasternak 2013-01-06 03:10:29 EST
this RFE is must, otherwise the one importing vm/template cannot:

1. figure out required space
2. see/modify disks config

(afaik GUI has such capability)
Comment 3 Ayal Baron 2013-01-06 06:00:51 EST
Michael please provide additional information about what is needed here.
Comment 4 Michael Pasternak 2013-01-06 06:24:08 EST
(In reply to comment #3)
> Michael please provide additional information about what is needed here.

when importing vm/template via api only import candidate metadata is visible (disk are not), 

requirement: import candidate should have /disks sub-collection
Comment 5 Ravi Nori 2013-01-16 16:42:48 EST
link : http://gerrit.ovirt.org/#/c/11126/

change id : I83fd4b046f72f73bb516615137522ac40028a7f0
Comment 6 Meital Bourvine 2013-08-11 06:38:11 EDT
Verified on is9.1

Working for templates:

mbourvin@mbourvin ~/scripts$ curl -X GET -H "Accept: application/xml" -u admin@internal:123456 --cacert /tmp/cert  https://mbourvin-rhevm33.qa.lab.tlv.redhat.com:443/api/storagedomains/c47eab9b-5f06-4134-87b3-6ce024272f44/templates/8205e91f-31b3-4ca2-8daf-f34c6518a6a8/disks
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<disks>
    <disk href="/api/disks/1458f799-dc62-4afb-9d77-b7c3f255d9a8" id="1458f799-dc62-4afb-9d77-b7c3f255d9a8">
        <name>test1_Disk1</name>
        <alias>test1_Disk1</alias>
        <image_id>49e7834a-cd93-4a4c-9fab-208334d1ce1d</image_id>
        <storage_domains>
            <storage_domain id="0b95a82f-5a9d-4303-8b74-0258a7de1853"/>
        </storage_domains>
        <size>21474836480</size>
        <provisioned_size>21474836480</provisioned_size>
        <actual_size>21474836480</actual_size>
        <status>
            <state>ok</state>
        </status>
        <interface>virtio</interface>
        <format>raw</format>
        <sparse>false</sparse>
        <bootable>true</bootable>
        <shareable>false</shareable>
        <wipe_after_delete>false</wipe_after_delete>
        <propagate_errors>false</propagate_errors>
    </disk>
</disks>





Working for VMs:

mbourvin@mbourvin ~/scripts$ curl -X GET -H "Accept: application/xml" -u admin@internal:123456 --cacert /tmp/cert  https://mbourvin-rhevm33.qa.lab.tlv.redhat.com:443/api/storagedomains/c47eab9b-5f06-4134-87b3-6ce024272f44/vms/a2e78159-2738-4db0-97cb-c224e87c536c/disks
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<disks>
    <disk href="/api/disks/fdfc07c4-49e7-47ea-8d81-a704c8becc83" id="fdfc07c4-49e7-47ea-8d81-a704c8becc83">
        <name>test1_Disk1</name>
        <alias>test1_Disk1</alias>
        <image_id>0a3c4e10-ba84-4edd-97d8-4db4480bf8c3</image_id>
        <storage_domains>
            <storage_domain id="0b95a82f-5a9d-4303-8b74-0258a7de1853"/>
        </storage_domains>
        <size>21474836480</size>
        <provisioned_size>21474836480</provisioned_size>
        <actual_size>21474836480</actual_size>
        <status>
            <state>ok</state>
        </status>
        <interface>virtio</interface>
        <format>raw</format>
        <sparse>false</sparse>
        <bootable>true</bootable>
        <shareable>false</shareable>
        <wipe_after_delete>false</wipe_after_delete>
        <propagate_errors>false</propagate_errors>
        <active>true</active>
    </disk>
</disks>


Steps to verify:
1. Create export domain
2. Create VM and Template
3. Export the VM and the template
4. Run:
/api/storagedomains/{storagedomain:id}/templates/{template:id}/disks

/api/storagedomains/{storagedomain:id}/vms/{vm:id}/disks
Comment 7 Charlie 2013-11-27 19:25:14 EST
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.
Comment 10 errata-xmlrpc 2014-01-21 12:11:17 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0038.html

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