Bug 1096497 - [restapi] Display image size and type for glance images missing in RESTAPI
Summary: [restapi] Display image size and type for glance images missing in RESTAPI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: shani
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-11 08:48 UTC by Gadi Ickowicz
Modified: 2019-04-28 13:27 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-20 10:51:28 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 80627 0 master POST restapi: Display image size and type for glance images 2017-08-28 11:23:53 UTC
oVirt gerrit 80628 0 master POST Add size and type properties to Image 2017-08-15 13:14:17 UTC
oVirt gerrit 80663 0 master MERGED Add size and type properties to Image 2017-08-28 07:56:00 UTC
oVirt gerrit 80691 0 master MERGED The Image.size needs to be long 2017-08-20 09:07:33 UTC
oVirt gerrit 81134 0 master MERGED restapi: Update to model 4.2.16 and metamodel 1.2.10 2017-08-29 09:22:09 UTC

Description Gadi Ickowicz 2014-05-11 08:48:39 UTC
Description of problem:
Currently Glance images returned by RESTAPI do not list their size or type (iso/disk), however the webadmin does list this information.

Currently the only following information is returned:

<image href="/api/images/25c5e604-c517-457b-9142-2a6cdfdfefe0" id="25c5e604-c517-457b-9142-2a6cdfdfefe0">
 <actions>
  <link href="/api/images/25c5e604-c517-457b-9142-2a6cdfdfefe0/import" rel="import"/>
 </actions>
 <name>RHEL-ACTIVE</name>
</image>

Comment 3 Yaniv Lavi 2016-12-05 11:08:31 UTC
I consider gaps in REST API bugs, not feature. We should try to tackle this.

Comment 4 shani 2017-08-10 14:36:22 UTC
Bug is still valid.

Steps to Reproduce:
Using the REST API, run the following:

Method:
-------
GET

URL:
----
http://xxxxx:8080/ovirt-engine/api/storagedomains/<ovirt-image-repository-id>/images/<glance-image-id>

Response:
Response Body (Raw):
--------------------
<image href="/ovirt-engine/api/storagedomains/072fbaa1-08f3-4a40-9f34-a5ca22dd1d74/images/b393fde0-5a67-4323-a1ab-9031dd2f9b97" id="b393fde0-5a67-4323-a1ab-9031dd2f9b97">
    <actions>
        <link href="/ovirt-engine/api/storagedomains/072fbaa1-08f3-4a40-9f34-a5ca22dd1d74/images/b393fde0-5a67-4323-a1ab-9031dd2f9b97/import" rel="import"/>
    </actions>
    <name>CentOS 6 Generic Cloud Image v1604 for x86_64</name>
    <storage_domain href="/ovirt-engine/api/storagedomains/072fbaa1-08f3-4a40-9f34-a5ca22dd1d74" id="072fbaa1-08f3-4a40-9f34-a5ca22dd1d74"/>
</image>

Comment 5 Allon Mureinik 2017-09-03 09:01:19 UTC
All the patches seem to be merged, moving to MODIFIED.
Shani, if something is missing here, please advise and return the BZ to POST.

Comment 6 Raz Tamir 2017-09-04 15:15:01 UTC
Verified on ovirt-engine-4.2.0-0.0.master.20170903205106.gitb17261a.el7.centos


<size>3623878656</size>
<type>disk</type>

Are now part of image object in api/storagedomains/{sd_id}/images/{img_id}

Comment 7 Sandro Bonazzola 2017-12-20 10:51:28 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

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


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