[Users] adding scripts

Vojtech Szocs vszocs at redhat.com
Fri Mar 14 16:50:51 UTC 2014



----- Original Message -----
> From: "Einav Cohen" <ecohen at redhat.com>
> To: "aditya mamidwar" <aditya.mamidwar at gmail.com>, "Vojtech Szocs" <vszocs at redhat.com>
> Cc: users at ovirt.org, engine-devel at ovirt.org
> Sent: Thursday, March 13, 2014 8:51:52 PM
> Subject: Re: [Users] adding scripts
> 
> if you are trying to hook into UI-specific events, it sounds
> like you will need to write an oVirt UI Plugin [1] in order to
> do that. However, I believe that the oVirt UI Plugins
> infrastructure doesn't support hooking to events such as "tab
> x was selected" and/or "button b was clicked".
> It does allow you to add new (custom) tabs/sub-tabs/buttons of
> your own, and there is a chance that it allows you to hook
> into events such as 'row x was selected in the grid'.
> 
> @Vojtech will know better. Vojtech?

Einav is right; in general, UI plugins can extend existing UI,
i.e. add custom tab, show custom dialog, add custom button to
existing tab, etc. See [1] for details.

UI plugins can also hook into some application-wide events,
such as user login/logout, main tab item selection change, etc.
See [2] for details.

[1] http://www.ovirt.org/Features/UIPlugins#API_function_reference
[2] http://www.ovirt.org/Features/UIPlugins#Application_event_reference

What you can do is add your custom button on some existing
main tab with click handler that makes some HTTP call to
trigger the action you need.

If you need to add click handler for *existing* button on
existing main tab, or you want to be notified when current
(active) main tab changes, this is not supported yet. Please
create RFE for this if it's something you'd like in UI plugins.

> 
> if you are trying to hook into engine events (e.g. you want to
> run a script every time a VM is started in oVirt, no matter if
> the user started it by clicking the 'run' button in the oVirt-
> engine webadmin, or invoked a REST API request, or an SDK
> command), then it will require some sort of an "engine-plugin"
> infrastructure that we don't have at the moment AFAIK.
> there is a chance that for some of the events you will be able
> to utilize the VDSM hooks (at the Host level) [2].
> 
> ----
> Thanks,
> Einav
> 
> [1] http://www.ovirt.org/Features/UIPlugins
> 
> [2] http://www.ovirt.org/VDSM-Hooks
> 
> 
> ----- Original Message -----
> > From: "aditya mamidwar" <aditya.mamidwar at gmail.com>
> > To: users at ovirt.org, engine-devel at ovirt.org
> > Sent: Thursday, March 13, 2014 11:23:35 AM
> > Subject: [Users] adding scripts
> > 
> > 
> > I want to commit changes to the engine by adding some bash scripts.
> > the scripts should be invoked once a button or tab is selected in the
> > webadmin portal by the user.
> > 
> > can someone guide on achieving this.
> > 
> > --
> > -Aditya Mamidwar
> > 
> > _______________________________________________
> > Users mailing list
> > Users at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> 



More information about the Users mailing list