Re: [ovirt-users] webhook

2014-11-08 Thread Yair Zaslavsky


- Original Message -
> From: "Vojtech Szocs" 
> To: "Yair Zaslavsky" 
> Cc: "Barak Azulay" , "Oved Ourfali" , 
> users@ovirt.org
> Sent: Friday, November 7, 2014 5:16:48 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Yair Zaslavsky" 
> > To: "Vojtech Szocs" 
> > Cc: "Barak Azulay" , "Oved Ourfali" ,
> > users@ovirt.org
> > Sent: Thursday, November 6, 2014 2:59:53 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > 
> > 
> > - Original Message -
> > > From: "Vojtech Szocs" 
> > > To: "Barak Azulay" 
> > > Cc: "Oved Ourfali" , users@ovirt.org
> > > Sent: Thursday, November 6, 2014 3:38:56 PM
> > > Subject: Re: [ovirt-users] webhook
> > > 
> > > 
> > > 
> > > - Original Message -
> > > > From: "Barak Azulay" 
> > > > To: "Vojtech Szocs" 
> > > > Cc: "Einav Cohen" , "Oved Ourfali"
> > > > ,
> > > > users@ovirt.org
> > > > Sent: Tuesday, November 4, 2014 5:15:35 PM
> > > > Subject: Re: [ovirt-users] webhook
> > > > 
> > > > 
> > > > 
> > > > - Original Message -
> > > > > From: "Vojtech Szocs" 
> > > > > To: "Einav Cohen" 
> > > > > Cc: "Oved Ourfali" , users@ovirt.org
> > > > > Sent: Tuesday, November 4, 2014 2:12:05 PM
> > > > > Subject: Re: [ovirt-users] webhook
> > > > > 
> > > > > 
> > > > > 
> > > > > - Original Message -
> > > > > > From: "Einav Cohen" 
> > > > > > To: "Vojtech Szocs" 
> > > > > > Cc: "Oved Ourfali" , users@ovirt.org
> > > > > > Sent: Friday, October 31, 2014 8:01:34 PM
> > > > > > Subject: Re: [ovirt-users] webhook
> > > > > > 
> > > > > > > - Original Message -
> > > > > > > From: "Vojtech Szocs" 
> > > > > > > Sent: Friday, October 31, 2014 11:51:53 AM
> > > > > > > 
> > > > > > > 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
> > > > > > 
> &g

Re: [ovirt-users] webhook

2014-11-07 Thread Vojtech Szocs


- Original Message -
> From: "Yair Zaslavsky" 
> To: "Vojtech Szocs" 
> Cc: "Barak Azulay" , "Oved Ourfali" , 
> users@ovirt.org
> Sent: Thursday, November 6, 2014 2:59:53 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Vojtech Szocs" 
> > To: "Barak Azulay" 
> > Cc: "Oved Ourfali" , users@ovirt.org
> > Sent: Thursday, November 6, 2014 3:38:56 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > 
> > 
> > - Original Message -
> > > From: "Barak Azulay" 
> > > To: "Vojtech Szocs" 
> > > Cc: "Einav Cohen" , "Oved Ourfali" ,
> > > users@ovirt.org
> > > Sent: Tuesday, November 4, 2014 5:15:35 PM
> > > Subject: Re: [ovirt-users] webhook
> > > 
> > > 
> > > 
> > > - Original Message -
> > > > From: "Vojtech Szocs" 
> > > > To: "Einav Cohen" 
> > > > Cc: "Oved Ourfali" , users@ovirt.org
> > > > Sent: Tuesday, November 4, 2014 2:12:05 PM
> > > > Subject: Re: [ovirt-users] webhook
> > > > 
> > > > 
> > > > 
> > > > - Original Message -
> > > > > From: "Einav Cohen" 
> > > > > To: "Vojtech Szocs" 
> > > > > Cc: "Oved Ourfali" , users@ovirt.org
> > > > > Sent: Friday, October 31, 2014 8:01:34 PM
> > > > > Subject: Re: [ovirt-users] webhook
> > > > > 
> > > > > > - Original Message -
> > > > > > From: "Vojtech Szocs" 
> > > > > > Sent: Friday, October 31, 2014 11:51:53 AM
> > > > > > 
> > > > > > 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
> > > > > 
> > > > > relying on changes in the UI table is a bad idea:
> > > > > 
> > > > > (1) potentially missing events:
> > > > > the UI displays paginated data; if my VMs are sorted by name, and
> > > > > I have 1000 VMs in my setup, and I just added a VM named "z", it will
> > > > > be added to the last "page" which is not displayed right now, so I
> > > > > wouldn't even be aware that something was added.
> > > > > 
> > > > > (2) potentially "creating" "fake" events:
> > > > > changes in the displayed data in the UI can occur due to change in
> > > > > the
> > > > > Search query

Re: [ovirt-users] webhook

2014-11-06 Thread Yair Zaslavsky


- Original Message -
> From: "Vojtech Szocs" 
> To: "Barak Azulay" 
> Cc: "Oved Ourfali" , users@ovirt.org
> Sent: Thursday, November 6, 2014 3:38:56 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Barak Azulay" 
> > To: "Vojtech Szocs" 
> > Cc: "Einav Cohen" , "Oved Ourfali" ,
> > users@ovirt.org
> > Sent: Tuesday, November 4, 2014 5:15:35 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > 
> > 
> > - Original Message -
> > > From: "Vojtech Szocs" 
> > > To: "Einav Cohen" 
> > > Cc: "Oved Ourfali" , users@ovirt.org
> > > Sent: Tuesday, November 4, 2014 2:12:05 PM
> > > Subject: Re: [ovirt-users] webhook
> > > 
> > > 
> > > 
> > > - Original Message -
> > > > From: "Einav Cohen" 
> > > > To: "Vojtech Szocs" 
> > > > Cc: "Oved Ourfali" , users@ovirt.org
> > > > Sent: Friday, October 31, 2014 8:01:34 PM
> > > > Subject: Re: [ovirt-users] webhook
> > > > 
> > > > > - Original Message -
> > > > > From: "Vojtech Szocs" 
> > > > > Sent: Friday, October 31, 2014 11:51:53 AM
> > > > > 
> > > > > 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
> > > > 
> > > > relying on changes in the UI table is a bad idea:
> > > > 
> > > > (1) potentially missing events:
> > > > the UI displays paginated data; if my VMs are sorted by name, and
> > > > I have 1000 VMs in my setup, and I just added a VM named "z", it will
> > > > be added to the last "page" which is not displayed right now, so I
> > > > wouldn't even be aware that something was added.
> > > > 
> > > > (2) potentially "creating" "fake" events:
> > > > changes in the displayed data in the UI can occur due to change in the
> > > > Search query; if I have 50 VMs in my setup, and I initially had the
> > > > "Vms:" search query, and now I change it to "VMs: name = a*", which
> > > > results in displaying only 10 VMs, this may falsely hint on removal
> > > > of 40 VMs from the system.
> > > 
> > > Agreed, that was a bad idea :) UI data is constrained by things like
> > > search query, pagination, sorting etc. Scratch my previous idea.
> > > 
> > > As mentioned before, notification of relevant events occuring in system
> > > should be the way to go. Either Engine will provide mechanism to notify
> > > other systems (i.e. email notifier) or other system will poll/listen-to
> > > changes in Engine (i.e. via REST API).
> > > 
> > > Idea for consideration, if every change to

Re: [ovirt-users] webhook

2014-11-06 Thread Vojtech Szocs


- Original Message -
> From: "Barak Azulay" 
> To: "Vojtech Szocs" 
> Cc: "Einav Cohen" , "Oved Ourfali" , 
> users@ovirt.org
> Sent: Tuesday, November 4, 2014 5:15:35 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Vojtech Szocs" 
> > To: "Einav Cohen" 
> > Cc: "Oved Ourfali" , users@ovirt.org
> > Sent: Tuesday, November 4, 2014 2:12:05 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > 
> > 
> > - Original Message -
> > > From: "Einav Cohen" 
> > > To: "Vojtech Szocs" 
> > > Cc: "Oved Ourfali" , users@ovirt.org
> > > Sent: Friday, October 31, 2014 8:01:34 PM
> > > Subject: Re: [ovirt-users] webhook
> > > 
> > > > - Original Message -
> > > > From: "Vojtech Szocs" 
> > > > Sent: Friday, October 31, 2014 11:51:53 AM
> > > > 
> > > > 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
> > > 
> > > relying on changes in the UI table is a bad idea:
> > > 
> > > (1) potentially missing events:
> > > the UI displays paginated data; if my VMs are sorted by name, and
> > > I have 1000 VMs in my setup, and I just added a VM named "z", it will
> > > be added to the last "page" which is not displayed right now, so I
> > > wouldn't even be aware that something was added.
> > > 
> > > (2) potentially "creating" "fake" events:
> > > changes in the displayed data in the UI can occur due to change in the
> > > Search query; if I have 50 VMs in my setup, and I initially had the
> > > "Vms:" search query, and now I change it to "VMs: name = a*", which
> > > results in displaying only 10 VMs, this may falsely hint on removal
> > > of 40 VMs from the system.
> > 
> > Agreed, that was a bad idea :) UI data is constrained by things like
> > search query, pagination, sorting etc. Scratch my previous idea.
> > 
> > As mentioned before, notification of relevant events occuring in system
> > should be the way to go. Either Engine will provide mechanism to notify
> > other systems (i.e. email notifier) or other system will poll/listen-to
> > changes in Engine (i.e. via REST API).
> > 
> > Idea for consideration, if every change to oVirt system would be sent
> > to some event bus, we could easily implement different notification
> > mechanisms (like websocket in addition to email), and web apps living
> > in Engine EAR context could also register to that event bus (imagine
> > WebAdmin servlet that listens for changes and pushes them to clients).
> 
> This can/should be done through the notification service,
> currently it supports email & snmp traps ... but it could be extended (very
> easily)

Cool, maybe something we could do in future as part of UX improvement,
i.e. change notification (push changes to client) to drive UI data update,
instead of periodic polling.

> 
> 
> > 
> > > 
> > > &

Re: [ovirt-users] webhook

2014-11-04 Thread Barak Azulay


- Original Message -
> From: "Vojtech Szocs" 
> To: "Einav Cohen" 
> Cc: "Oved Ourfali" , users@ovirt.org
> Sent: Tuesday, November 4, 2014 2:12:05 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Einav Cohen" 
> > To: "Vojtech Szocs" 
> > Cc: "Oved Ourfali" , users@ovirt.org
> > Sent: Friday, October 31, 2014 8:01:34 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > > - Original Message -
> > > From: "Vojtech Szocs" 
> > > Sent: Friday, October 31, 2014 11:51:53 AM
> > > 
> > > 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
> > 
> > relying on changes in the UI table is a bad idea:
> > 
> > (1) potentially missing events:
> > the UI displays paginated data; if my VMs are sorted by name, and
> > I have 1000 VMs in my setup, and I just added a VM named "z", it will
> > be added to the last "page" which is not displayed right now, so I
> > wouldn't even be aware that something was added.
> > 
> > (2) potentially "creating" "fake" events:
> > changes in the displayed data in the UI can occur due to change in the
> > Search query; if I have 50 VMs in my setup, and I initially had the
> > "Vms:" search query, and now I change it to "VMs: name = a*", which
> > results in displaying only 10 VMs, this may falsely hint on removal
> > of 40 VMs from the system.
> 
> Agreed, that was a bad idea :) UI data is constrained by things like
> search query, pagination, sorting etc. Scratch my previous idea.
> 
> As mentioned before, notification of relevant events occuring in system
> should be the way to go. Either Engine will provide mechanism to notify
> other systems (i.e. email notifier) or other system will poll/listen-to
> changes in Engine (i.e. via REST API).
> 
> Idea for consideration, if every change to oVirt system would be sent
> to some event bus, we could easily implement different notification
> mechanisms (like websocket in addition to email), and web apps living
> in Engine EAR context could also register to that event bus (imagine
> WebAdmin servlet that listens for changes and pushes them to clients).

This can/should be done through the notification service,
currently it supports email & snmp traps ... but it could be extended (very 
easily)


> 
> > 
> > > 
> > > 2, write UI plugin that uses oVirtJS to periodically check VM events
> > 
> > not sure if this is referring to VM-related events in the code (e.g.
> > hooking to the click on "OK" within the New VM / Remove VM dialog,
> > or hooking to the "Success" callback of the action response, or
> > something similar), or to the VM-related "Events" (i.e. the ones that
> > are displayed in the GUI within the Events main-tab / bottom section).
> > If the former: can be done, I assume, though not sure how complex it
> > would be to implement the infrastructure for that.
> > If the latter: this will "catch" actions that were performed either
> > via the GUI or outside the GUI; in this case, it would probably be
> > better to use an Engine extension API (solution "0" a

Re: [ovirt-users] webhook

2014-11-04 Thread Vojtech Szocs


- Original Message -
> From: "Yair Zaslavsky" 
> To: "Einav Cohen" 
> Cc: "Vojtech Szocs" , "Oved Ourfali" , 
> users@ovirt.org
> Sent: Friday, October 31, 2014 10:51:03 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Einav Cohen" 
> > To: "Vojtech Szocs" 
> > Cc: "Oved Ourfali" , users@ovirt.org
> > Sent: Friday, October 31, 2014 9:01:34 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > > - Original Message -
> > > From: "Vojtech Szocs" 
> > > Sent: Friday, October 31, 2014 11:51:53 AM
> > > 
> > > 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
> 
> Please allow me to step in as someone who worked on the extensions API as
> well,
> There are more "missing bits" here.
> You are referring to the "webapp side", but this is not enough.
> We have also the engine side which has to become more pluggable.

Agreed. For me, the "webapp side" is really an interesting option, since it
would mean that 3rd parties could write custom code that would consume our
existing Java/Engine "services" (assuming these could be exposed across WARs).

In other words, plug custom Java code into Engine ("inside-product 
integration"),
as opposed to typical scenario where 3rd party system uses Engine REST interface
("outside-product integration").

> In addition, we will probably need to handle all kinds of issues that rise
> from our singletons at engine - class loading might be an issue here, no?

Hm, Java class loaders have hierarchy, so if we put shared Java "services"
(ideally exposed and injectable as CDI beans) into class loader above specific
webapp (WAR) class loaders, it wouldn't be a problem. But I can be wrong here.

> You don't want the "X-ton" (doubleton, tripleton, etc..) phenomena in your
> setup - you don't want for example X instances of AsyncTaskManager.
> I think that in general we should strive to turn engine into way more
> pluggable/modular than it is now, imagine an "engine microkernel" (for those
> of you who did not hear the term microkernel, I am referring you to jboss
> architecture) - we should have a "thin microkernel" and the rest of the code
> should be pluggable, using the extension API (and perhaps web fragments as
> well).
> What do you think?

Great ideas :)

> 
> > > 
> > > [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
> > 
> > relying on changes in the UI table is a bad idea:
> > 
> > (1) potentially missing events:
> > the UI displays paginated data; if my VMs are sorted by name, and
> > I have 1000 VMs in my setup, and I just added a VM named "z", it will
> > be added to the last "page" which is not displayed right now, so I
> > wouldn't even be aware that something was added.
> > 
> > (2) potentially "creating" "fake" events:
> > changes in the displayed data in the UI can occur due to change in the
> > Search query; if I have 50 VMs in my setup, and I initially had the
> > "Vms:" search query, and now I change it to "VMs: name = a*", which
> > results in displaying only 10 VMs, this may falsely hint on removal
> > of 40 VMs from the system.
> > 
> > > 
&

Re: [ovirt-users] webhook

2014-11-04 Thread Vojtech Szocs


- Original Message -
> From: "Einav Cohen" 
> To: "Vojtech Szocs" 
> Cc: "Oved Ourfali" , users@ovirt.org
> Sent: Friday, October 31, 2014 8:01:34 PM
> Subject: Re: [ovirt-users] webhook
> 
> > - Original Message -
> > From: "Vojtech Szocs" 
> > Sent: Friday, October 31, 2014 11:51:53 AM
> > 
> > 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
> 
> relying on changes in the UI table is a bad idea:
> 
> (1) potentially missing events:
> the UI displays paginated data; if my VMs are sorted by name, and
> I have 1000 VMs in my setup, and I just added a VM named "z", it will
> be added to the last "page" which is not displayed right now, so I
> wouldn't even be aware that something was added.
> 
> (2) potentially "creating" "fake" events:
> changes in the displayed data in the UI can occur due to change in the
> Search query; if I have 50 VMs in my setup, and I initially had the
> "Vms:" search query, and now I change it to "VMs: name = a*", which
> results in displaying only 10 VMs, this may falsely hint on removal
> of 40 VMs from the system.

Agreed, that was a bad idea :) UI data is constrained by things like
search query, pagination, sorting etc. Scratch my previous idea.

As mentioned before, notification of relevant events occuring in system
should be the way to go. Either Engine will provide mechanism to notify
other systems (i.e. email notifier) or other system will poll/listen-to
changes in Engine (i.e. via REST API).

Idea for consideration, if every change to oVirt system would be sent
to some event bus, we could easily implement different notification
mechanisms (like websocket in addition to email), and web apps living
in Engine EAR context could also register to that event bus (imagine
WebAdmin servlet that listens for changes and pushes them to clients).

> 
> > 
> > 2, write UI plugin that uses oVirtJS to periodically check VM events
> 
> not sure if this is referring to VM-related events in the code (e.g.
> hooking to the click on "OK" within the New VM / Remove VM dialog,
> or hooking to the "Success" callback of the action response, or
> something similar), or to the VM-related "Events" (i.e. the ones that
> are displayed in the GUI within the Events main-tab / bottom section).
> If the former: can be done, I assume, though not sure how complex it
> would be to implement the infrastructure for that.
> If the latter: this will "catch" actions that were performed either
> via the GUI or outside the GUI; in this case, it would probably be
> better to use an Engine extension API (solution "0" above) rather
> than a UI plugin, since it will be more reliable, will be active
> even when the GUI is not in use, etc.

It was meant simply as polling Engine via oVirtJS / REST API.

But then again, any UI plugin-based solution has the drawback that
web GUI must be active (open) in order for plugin to be active.

> 
> > 
> > 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" 
> > > To: "Yair Zaslavsky" 
> > > Cc: "Koen Vanoppen" , users@ovirt.org, "Vojtech
> > > 

Re: [ovirt-users] webhook

2014-11-01 Thread Koen Vanoppen
Whoow, just missed a couple of days I see... thanks everybody for your
already given support!! I will discuss this also with my colleague on
Monday. And I must say I'm impressed about all the fedback! This could be
indeed a very nice extension to oVirt, because I guess we are not the only
ones who are in need of this or will be in the future.
Thanks again!

2014-10-31 22:51 GMT+01:00 Yair Zaslavsky :

>
>
> - Original Message -
> > From: "Einav Cohen" 
> > To: "Vojtech Szocs" 
> > Cc: "Oved Ourfali" , users@ovirt.org
> > Sent: Friday, October 31, 2014 9:01:34 PM
> > Subject: Re: [ovirt-users] webhook
> >
> > > - Original Message -
> > > From: "Vojtech Szocs" 
> > > Sent: Friday, October 31, 2014 11:51:53 AM
> > >
> > > 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
>
> Please allow me to step in as someone who worked on the extensions API as
> well,
> There are more "missing bits" here.
> You are referring to the "webapp side", but this is not enough.
> We have also the engine side which has to become more pluggable.
> In addition, we will probably need to handle all kinds of issues that rise
> from our singletons at engine - class loading might be an issue here, no?
> You don't want the "X-ton" (doubleton, tripleton, etc..) phenomena in your
> setup - you don't want for example X instances of AsyncTaskManager.
> I think that in general we should strive to turn engine into way more
> pluggable/modular than it is now, imagine an "engine microkernel" (for
> those of you who did not hear the term microkernel, I am referring you to
> jboss architecture) - we should have a "thin microkernel" and the rest of
> the code should be pluggable, using the extension API (and perhaps web
> fragments as well).
> What do you think?
>
> > >
> > > [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
> >
> > relying on changes in the UI table is a bad idea:
> >
> > (1) potentially missing events:
> > the UI displays paginated data; if my VMs are sorted by name, and
> > I have 1000 VMs in my setup, and I just added a VM named "z", it will
> > be added to the last "page" which is not displayed right now, so I
> > wouldn't even be aware that something was added.
> >
> > (2) potentially "creating" "fake" events:
> > changes in the displayed data in the UI can occur due to change in the
> > Search query; if I have 50 VMs in my setup, and I initially had the
> > "Vms:" search query, and now I change it to "VMs: name = a*", which
> > results in displaying only 10 VMs, this may falsely hint on removal
> > of 40 VMs from the system.
> >
> > >
> > > 2, write UI plugin that uses oVirtJS to periodically check VM events
> >
> > not sure if this is referring to VM-related events in the code (e.g.
> > hooking to the click on "OK" within the New VM / Remove VM dialog,
> > or hooking to the "Success" callback of the action response, or
> > something similar), or to the VM-related "Events" (i.e. the ones that
> > are displayed in the GUI within the Events main-tab / bottom section).
> > If the former: can be done, I assume, though not sure how complex it
> > would be to implement the inf

Re: [ovirt-users] webhook

2014-10-31 Thread Yair Zaslavsky


- Original Message -
> From: "Einav Cohen" 
> To: "Vojtech Szocs" 
> Cc: "Oved Ourfali" , users@ovirt.org
> Sent: Friday, October 31, 2014 9:01:34 PM
> Subject: Re: [ovirt-users] webhook
> 
> > - Original Message -
> > From: "Vojtech Szocs" 
> > Sent: Friday, October 31, 2014 11:51:53 AM
> > 
> > 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

Please allow me to step in as someone who worked on the extensions API as well,
There are more "missing bits" here.
You are referring to the "webapp side", but this is not enough.
We have also the engine side which has to become more pluggable.
In addition, we will probably need to handle all kinds of issues that rise from 
our singletons at engine - class loading might be an issue here, no?
You don't want the "X-ton" (doubleton, tripleton, etc..) phenomena in your 
setup - you don't want for example X instances of AsyncTaskManager.
I think that in general we should strive to turn engine into way more 
pluggable/modular than it is now, imagine an "engine microkernel" (for those of 
you who did not hear the term microkernel, I am referring you to jboss 
architecture) - we should have a "thin microkernel" and the rest of the code 
should be pluggable, using the extension API (and perhaps web fragments as 
well).
What do you think?

> > 
> > [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
> 
> relying on changes in the UI table is a bad idea:
> 
> (1) potentially missing events:
> the UI displays paginated data; if my VMs are sorted by name, and
> I have 1000 VMs in my setup, and I just added a VM named "z", it will
> be added to the last "page" which is not displayed right now, so I
> wouldn't even be aware that something was added.
> 
> (2) potentially "creating" "fake" events:
> changes in the displayed data in the UI can occur due to change in the
> Search query; if I have 50 VMs in my setup, and I initially had the
> "Vms:" search query, and now I change it to "VMs: name = a*", which
> results in displaying only 10 VMs, this may falsely hint on removal
> of 40 VMs from the system.
> 
> > 
> > 2, write UI plugin that uses oVirtJS to periodically check VM events
> 
> not sure if this is referring to VM-related events in the code (e.g.
> hooking to the click on "OK" within the New VM / Remove VM dialog,
> or hooking to the "Success" callback of the action response, or
> something similar), or to the VM-related "Events" (i.e. the ones that
> are displayed in the GUI within the Events main-tab / bottom section).
> If the former: can be done, I assume, though not sure how complex it
> would be to implement the infrastructure for that.
> If the latter: this will "catch" actions that were performed either
> via the GUI or outside the GUI; in this case, it would probably be
> better to use an Engine extension API (solution "0" above) rather
> than a UI plugin, since it will be more reliable, will be active
> even when the GUI is not in use, etc.
> 
> > 
> > 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" 
> > > To: "Yair Zaslavsky" 
> > > Cc

Re: [ovirt-users] webhook

2014-10-31 Thread Einav Cohen
> - Original Message -
> From: "Vojtech Szocs" 
> Sent: Friday, October 31, 2014 11:51:53 AM
> 
> 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

relying on changes in the UI table is a bad idea: 

(1) potentially missing events: 
the UI displays paginated data; if my VMs are sorted by name, and 
I have 1000 VMs in my setup, and I just added a VM named "z", it will 
be added to the last "page" which is not displayed right now, so I 
wouldn't even be aware that something was added. 

(2) potentially "creating" "fake" events: 
changes in the displayed data in the UI can occur due to change in the 
Search query; if I have 50 VMs in my setup, and I initially had the 
"Vms:" search query, and now I change it to "VMs: name = a*", which 
results in displaying only 10 VMs, this may falsely hint on removal 
of 40 VMs from the system. 

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

not sure if this is referring to VM-related events in the code (e.g. 
hooking to the click on "OK" within the New VM / Remove VM dialog, 
or hooking to the "Success" callback of the action response, or 
something similar), or to the VM-related "Events" (i.e. the ones that 
are displayed in the GUI within the Events main-tab / bottom section). 
If the former: can be done, I assume, though not sure how complex it 
would be to implement the infrastructure for that. 
If the latter: this will "catch" actions that were performed either 
via the GUI or outside the GUI; in this case, it would probably be 
better to use an Engine extension API (solution "0" above) rather 
than a UI plugin, since it will be more reliable, will be active 
even when the GUI is not in use, etc. 

> 
> 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" 
> > To: "Yair Zaslavsky" 
> > Cc: "Koen Vanoppen" , users@ovirt.org, "Vojtech
> > Szocs" 
> > 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" 
> > > To: "Koen Vanoppen" 
> > > Cc: "Oved Ourfali" , users@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?
> > > 
> 

Re: [ovirt-users] webhook

2014-10-31 Thread Vojtech Szocs
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" 
> To: "Yair Zaslavsky" 
> Cc: "Koen Vanoppen" , users@ovirt.org, "Vojtech 
> Szocs" 
> 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" 
> > To: "Koen Vanoppen" 
> > Cc: "Oved Ourfali" , users@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" 
> > > To: users@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@ovirt.org
> > > http://lists.ovirt.org/mailman/listinfo/users
> > > 
> > ___
> > Users mailing list
> > Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] webhook

2014-10-30 Thread Yair Zaslavsky


- Original Message -
> From: "Barak Azulay" 
> To: "Omer Frenkel" , "vanoppen koen" 
> , "Mooli Tayer"
> 
> Cc: "Oved Ourfali" , users@ovirt.org
> Sent: Thursday, October 30, 2014 11:10:55 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Barak Azulay" 
> > To: "Omer Frenkel" , "vanoppen koen"
> > 
> > Cc: "Oved Ourfali" , users@ovirt.org
> > Sent: Thursday, October 30, 2014 10:55:56 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > 
> > 
> > - Original Message -----
> > > From: "Omer Frenkel" 
> > > To: "Oved Ourfali" , "Yair Zaslavsky"
> > > 
> > > Cc: users@ovirt.org
> > > Sent: Thursday, October 30, 2014 3:54:37 PM
> > > Subject: Re: [ovirt-users] webhook
> > > 
> > > can't the event-notifications be used?
> > > notify some email on delete operation (not sure there is a notification
> > > for
> > > this today..)
> > > and hook on the email to run the script?
> > 
> > I agree that notification sounds like the best option,
> > Although I would use the SNMP traps for that.
> > If you already have a SNMP monitoring system you can catch the trap there
> > and
> > do your foreman magic.
> 
> 
> I assume the relevant notification is USER_REMOVE_VM_FINISHED(113)
> Mooli / Omer please approve .

+1
>From what I saw this is the relevant event.
Which has the textual represenation of "VM ${VmName} was successfully removed"

> 
> > 
> > > 
> > > - Original Message -
> > > > From: "Oved Ourfali" 
> > > > To: "Yair Zaslavsky" 
> > > > Cc: users@ovirt.org
> > > > Sent: Thursday, October 30, 2014 3: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" 
> > > > > To: "Koen Vanoppen" 
> > > > > Cc: "Oved Ourfali" , users@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" 
> > > > > > To: users@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@ovirt.org
> > > > > > http://lists.ovirt.org/mailman/listinfo/users
> > > > > > 
> > > > > ___
> > > > > Users mailing list
> > > > > Users@ovirt.org
> > > > > http://lists.ovirt.org/mailman/listinfo/users
> > > > > 
> > > > ___
> > > > Users mailing list
> > > > Users@ovirt.org
> > > > http://lists.ovirt.org/mailman/listinfo/users
> > > > 
> > > ___
> > > Users mailing list
> > > Users@ovirt.org
> > > http://lists.ovirt.org/mailman/listinfo/users
> > > 
> > > 
> > > 
> > ___
> > Users mailing list
> > Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] webhook

2014-10-30 Thread Barak Azulay


- Original Message -
> From: "Barak Azulay" 
> To: "Omer Frenkel" , "vanoppen koen" 
> 
> Cc: "Oved Ourfali" , users@ovirt.org
> Sent: Thursday, October 30, 2014 10:55:56 PM
> Subject: Re: [ovirt-users] webhook
> 
> 
> 
> - Original Message -
> > From: "Omer Frenkel" 
> > To: "Oved Ourfali" , "Yair Zaslavsky"
> > 
> > Cc: users@ovirt.org
> > Sent: Thursday, October 30, 2014 3:54:37 PM
> > Subject: Re: [ovirt-users] webhook
> > 
> > can't the event-notifications be used?
> > notify some email on delete operation (not sure there is a notification for
> > this today..)
> > and hook on the email to run the script?
> 
> I agree that notification sounds like the best option,
> Although I would use the SNMP traps for that.
> If you already have a SNMP monitoring system you can catch the trap there and
> do your foreman magic.


I assume the relevant notification is USER_REMOVE_VM_FINISHED(113)
Mooli / Omer please approve .

> 
> > 
> > - Original Message -
> > > From: "Oved Ourfali" 
> > > To: "Yair Zaslavsky" 
> > > Cc: users@ovirt.org
> > > Sent: Thursday, October 30, 2014 3: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" 
> > > > To: "Koen Vanoppen" 
> > > > Cc: "Oved Ourfali" , users@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" 
> > > > > To: users@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@ovirt.org
> > > > > http://lists.ovirt.org/mailman/listinfo/users
> > > > > 
> > > > ___
> > > > Users mailing list
> > > > Users@ovirt.org
> > > > http://lists.ovirt.org/mailman/listinfo/users
> > > > 
> > > ___
> > > Users mailing list
> > > Users@ovirt.org
> > > http://lists.ovirt.org/mailman/listinfo/users
> > > 
> > ___
> > Users mailing list
> > Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> > 
> > 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] webhook

2014-10-30 Thread Barak Azulay


- Original Message -
> From: "Omer Frenkel" 
> To: "Oved Ourfali" , "Yair Zaslavsky" 
> Cc: users@ovirt.org
> Sent: Thursday, October 30, 2014 3:54:37 PM
> Subject: Re: [ovirt-users] webhook
> 
> can't the event-notifications be used?
> notify some email on delete operation (not sure there is a notification for
> this today..)
> and hook on the email to run the script?

I agree that notification sounds like the best option,
Although I would use the SNMP traps for that.
If you already have a SNMP monitoring system you can catch the trap there and 
do your foreman magic.

> 
> - Original Message -
> > From: "Oved Ourfali" 
> > To: "Yair Zaslavsky" 
> > Cc: users@ovirt.org
> > Sent: Thursday, October 30, 2014 3: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" 
> > > To: "Koen Vanoppen" 
> > > Cc: "Oved Ourfali" , users@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" 
> > > > To: users@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@ovirt.org
> > > > http://lists.ovirt.org/mailman/listinfo/users
> > > > 
> > > ___
> > > Users mailing list
> > > Users@ovirt.org
> > > http://lists.ovirt.org/mailman/listinfo/users
> > > 
> > ___
> > Users mailing list
> > Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
> 
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] webhook

2014-10-30 Thread Omer Frenkel
can't the event-notifications be used?
notify some email on delete operation (not sure there is a notification for 
this today..)
and hook on the email to run the script?

- Original Message -
> From: "Oved Ourfali" 
> To: "Yair Zaslavsky" 
> Cc: users@ovirt.org
> Sent: Thursday, October 30, 2014 3: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" 
> > To: "Koen Vanoppen" 
> > Cc: "Oved Ourfali" , users@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" 
> > > To: users@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@ovirt.org
> > > http://lists.ovirt.org/mailman/listinfo/users
> > > 
> > ___
> > Users mailing list
> > Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] webhook

2014-10-30 Thread Oved Ourfali
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" 
> To: "Koen Vanoppen" 
> Cc: "Oved Ourfali" , users@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" 
> > To: users@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@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] webhook

2014-10-30 Thread Yair Zaslavsky
Oved - can we implement something like this using ui-plugins?


- Original Message -
> From: "Koen Vanoppen" 
> To: users@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@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] webhook

2014-10-30 Thread Koen Vanoppen
Nobody? :-(. Or it is just not possible?

2014-10-27 15:06 GMT+01:00 Koen Vanoppen :

> 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@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] webhook

2014-10-27 Thread Koen Vanoppen
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@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users