[ovirt-users] webhook

Vojtech Szocs vszocs at redhat.com
Fri Oct 31 15:51:53 UTC 2014


Hi,

if I get this correctly, you'd like to be notified when certain event
happens (VM created/deleted/etc.) and react upon that. I see multiple
possible approaches here:

0, improve Engine extension API (refer to Alon Bar-Lev for details)
   - if extensions can be packaged as JARs and these JARs could include
     web fragments [1] it would mean the possibility to deploy custom
     servlets onto existing Engine instance (in context of webapp that
     processes extensions)
   - your custom Java servlet could query REST interface (or be notified
     once something happens, but AFAIK we don't have that implemented yet)
     and do whatever logic is needed
   - once I asked Alon about ^^ but never got response from him
   - IMHO this would be a nice way to deploy custom Java code on Engine

[1] https://blogs.oracle.com/swchan/entry/servlet_3_0_web_fragment

1, improve UI plugin API
   - add "VirtualMachineDataLoaded" event fired upon each refresh of
     VM data in UI table (generalization -> "{Entity}DataLoaded")
   - this is similar to existing "{Entity}SelectionChange" events

2, write UI plugin that uses oVirtJS to periodically check VM events

The disadvantage of 1, and 2, is that WebAdmin GUI must be open.
In any case, if you'd like to explore the possibility of doing this
via UI plugin, I'm here to help.

Vojtech


----- Original Message -----
> From: "Oved Ourfali" <ovedo at redhat.com>
> To: "Yair Zaslavsky" <yzaslavs at redhat.com>
> Cc: "Koen Vanoppen" <vanoppen.koen at gmail.com>, users at ovirt.org, "Vojtech Szocs" <vszocs at redhat.com>
> Sent: Thursday, October 30, 2014 2:10:12 PM
> Subject: Re: [ovirt-users] webhook
> 
> Hi
> 
> CC-ing also Vojtech, the "father" of the UI plugins.
> 
> Anyway, the only way to accomplish that via UI plugins at the moment is via
> adding a new "action menu item", that in the background deleted the VM, and
> reports to Foreman.
> I would be nice to have a "hook" for different UI action items, but it isn't
> available at the moment.
> There are plenty code samples for UI plugins, most of them available at:
> http://www.ovirt.org/Features/UIPlugins
> 
> I must say that I'm not sure webhooks are the right approach for that, as I
> guess it is relevant only in environments in which one doesn't use the
> API/CLI/SDK....
> but.. it will be a cool feature!
> 
> Regards,
> Oved
> 
> ----- Original Message -----
> > From: "Yair Zaslavsky" <yzaslavs at redhat.com>
> > To: "Koen Vanoppen" <vanoppen.koen at gmail.com>
> > Cc: "Oved Ourfali" <ovedo at redhat.com>, users at ovirt.org
> > Sent: Thursday, October 30, 2014 1:44:38 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > Oved - can we implement something like this using ui-plugins?
> > 
> > 
> > ----- Original Message -----
> > > From: "Koen Vanoppen" <vanoppen.koen at gmail.com>
> > > To: users at ovirt.org
> > > Sent: Monday, October 27, 2014 4:06:40 PM
> > > Subject: [ovirt-users] webhook
> > > 
> > > Hi all,
> > > 
> > > Just a quick question. Is it possible to set a webhook on the removal and
> > > creation of a new vm? So we can send to foreman a delete action when the
> > > VM
> > > is deleted...
> > > 
> > > Kind regards,
> > > 
> > > Koen
> > > 
> > > _______________________________________________
> > > Users mailing list
> > > Users at ovirt.org
> > > http://lists.ovirt.org/mailman/listinfo/users
> > > 
> > _______________________________________________
> > Users mailing list
> > Users at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> 



More information about the Users mailing list