Bug 926928

Summary: [RFE] RHEVM-API: Add /applications sub-collection under vm
Product: Red Hat Enterprise Virtualization Manager Reporter: Michael Pasternak <mpastern>
Component: ovirt-engine-restapiAssignee: Ravi Nori <rnori>
Status: CLOSED ERRATA QA Contact: Barak Dagan <bdagan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, adahms, anande, bazulay, iheim, jkt, oramraz, pstehlik, Rhev-m-bugs, rnori
Target Milestone: ---Keywords: FutureFeature, Improvement
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is2 Doc Type: Enhancement
Doc Text:
Previously in the REST API, there was no way for administrators to view a list of the applications installed on a virtual machine. With this update, administrators can now retrieve a list of the applications installed on a virtual machine by using the applications sub-collection of a vm object.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 17:16:02 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:

Description Michael Pasternak 2013-03-24 08:59:17 UTC
Description of problem:

Add /applications (installed applications) sub-collection under vm.

Comment 1 Michael Pasternak 2013-07-29 13:45:52 UTC
*** Bug 826691 has been marked as a duplicate of this bug. ***

Comment 2 Barak Dagan 2013-09-16 17:19:50 UTC
Verified on is14:

1) 
psql -U postgres -d engine -c "select vm_name, app_list from vms where app_list != '';" | less -S

 vm_name |                                         app_list                                         
---------+------------------------------------------------------------------------------------------
 vm1     | kernel-2.6.32-358.14.1.el6,kernel-2.6.32-358.el6,rhevm-guest-agent-common-1.0.7-12.el6ev
 rhel6.5 | kernel-2.6.32-415.el6,rhevm-guest-agent-common-1.0.8-2.el6ev



2) 
/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/applications

<applications><application href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/applications/6b65726e-656c-2d32-2e36-2e33322d3431" id="6b65726e-656c-2d32-2e36-2e33322d3431"><name>kernel-2.6.32-415.el6</name><vm href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed" id="836ac1d8-88fa-4237-99e6-4f137788b2ed"/></application><application href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/applications/72686576-6d2d-6775-6573-742d6167656e" id="72686576-6d2d-6775-6573-742d6167656e"><name>rhevm-guest-agent-common-1.0.8-2.el6ev</name><vm href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed" id="836ac1d8-88fa-4237-99e6-4f137788b2ed"/></application></applications>

3) 
wget -O - --debug --auth-no-challenge --no-check-certificate --http-user=admin@internal --http-passwd='123456' head='Accept: application/xml' https://localhost/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/applications

....

?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<applications>
    <application href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/applications/6b65726e-656c-2d32-2e36-2e33322d3431" id="6b65726e-656c-2d32-2e36-2e33322d3431">
        <name>kernel-2.6.32-415.el6</name>
        <vm href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed" id="836ac1d8-88fa-4237-99e6-4f137788b2ed"/>
    </application>
    <application href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/applications/72686576-6d2d-6775-6573-742d6167656e" id="72686576-6d2d-6775-6573-742d6167656e">
        <name>rhevm-guest-agent-common-1.0.8-2.el6ev</name>
        <vm href="/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed" id="836ac1d8-88fa-4237-99e6-4f137788b2ed"/>
    </application>
</applications>

Comment 3 Charlie 2013-11-28 00:18:09 UTC
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 6 errata-xmlrpc 2014-01-21 17:16:02 UTC
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