Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 839205

Summary: ovirt-engine-restapi : [RFE] There is no way to know which hooks are installed on a host
Product: Red Hat Enterprise Virtualization Manager Reporter: Oded Ramraz <oramraz>
Component: ovirt-engine-restapiAssignee: Ori Liel <oliel>
Status: CLOSED ERRATA QA Contact: Tareq Alayan <talayan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: dyasny, ecohen, iheim, mpastern, pstehlik, Rhev-m-bugs, sgrinber, ykaul
Target Milestone: ---Keywords: FutureFeature
Target Release: 3.2.0Flags: dyasny: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: sf4 Doc Type: Enhancement
Doc Text:
It is now possible to use the REST API to query a host for all installed hooks.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-10 21:07:36 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:
Bug Depends On:    
Bug Blocks: 915537    
Attachments:
Description Flags
screenshot
none
api response none

Description Oded Ramraz 2012-07-11 08:24:50 UTC
Description of problem:

On GUI I have the option to see which hooks are install on a specific host. 
I see fields like event name , script name , property name and value . 
I didn't found this information using the api . 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Ori Liel 2012-11-26 14:58:42 UTC
patch posted upstream: 
   http://gerrit.ovirt.org/#/c/9478/

Comment 3 Tareq Alayan 2013-01-09 14:14:47 UTC
Created attachment 675571 [details]
screenshot

Comment 4 Tareq Alayan 2013-01-09 14:17:18 UTC
Created attachment 675572 [details]
api response

Comment 5 Itamar Heim 2013-01-09 19:33:01 UTC
did you pas the header to get all entity details?

Comment 6 Michael Pasternak 2013-01-10 07:16:55 UTC
are you testing against SF3?

Comment 7 Michael Pasternak 2013-01-10 07:18:58 UTC
(In reply to comment #5)
> did you pas the header to get all entity details?

it's implemented as host sub-collection.

Comment 8 Tareq Alayan 2013-01-10 09:08:16 UTC
I am testing against sf3. 
I didn't pass any special header.

Comment 9 Ori Liel 2013-01-14 08:15:45 UTC
See Michael's comment (comment 7) please try: 

.../api/hosts/XXX/hooks

Comment 10 Tareq Alayan 2013-01-14 08:35:27 UTC
works now. 

Please consider add links to the hooks response similar to nics.

Comment 11 Michael Pasternak 2013-01-16 10:16:31 UTC
http://gerrit.ovirt.org/#/c/10973/

Comment 12 Michael Pasternak 2013-01-21 11:10:02 UTC
http://gerrit.ovirt.org/#/c/11250/

Comment 14 Ori Liel 2013-01-21 11:38:35 UTC
addition: for each hook, add back-link to host:

http://gerrit.ovirt.org/#/c/11247/

Comment 16 Tareq Alayan 2013-01-24 15:32:57 UTC
verified:

request:
=======
GET https://jenkins-vm-02.qa.lab.tlv.redhat.com/api/hosts/9b63b15c-fc75-42ac-9586-0905b2e1d48d/hooks

response:
======== 
<hooks>
<hook id="a6b3aaaf-9205-be7f-d588-7ba9c5ced24b">
<name>50_fileinject</name>
<event_name>before_vm_start</event_name>
<md5>1968b99753325f2bb74f3bedb5c7db49</md5>
</hook>
</hooks>

Comment 17 Michael Pasternak 2013-01-27 06:48:14 UTC
does host has link to /hooks sub-collection?

Comment 18 Oded Ramraz 2013-02-24 15:43:15 UTC
This feature works fine now , the link exists .

(In reply to comment #17)
> does host has link to /hooks sub-collection?

Comment 19 Cheryn Tan 2013-04-03 06:50:56 UTC
This bug is currently attached to errata RHEA-2013:14491. 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 20 errata-xmlrpc 2013-06-10 21:07:36 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-2013-0888.html