Re: [Engine-devel] [Users] adding scripts

--_D8651FB6-46F9-4DF8-98DD-D992EE03B3E3_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and ma= ke few tweaks for personal use? I just cant find that file after using git. Aditya Mamidwar -----Original Message----- From: "Einav Cohen" <ecohen@redhat.com> Sent: =E2=80=8E14-=E2=80=8E03-=E2=80=8E2014 01:21 To: "aditya mamidwar" <aditya.mamidwar@gmail.com>; "Vojtech Szocs" <vszocs@= redhat.com> Cc: "users@ovirt.org" <users@ovirt.org>; "engine-devel@ovirt.org" <engine-d= evel@ovirt.org> Subject: Re: [Users] adding scripts if you are trying to hook into UI-specific events, it sounds=20 like you will need to write an oVirt UI Plugin [1] in order to=20 do that. However, I believe that the oVirt UI Plugins=20 infrastructure doesn't support hooking to events such as "tab=20 x was selected" and/or "button b was clicked".=20 It does allow you to add new (custom) tabs/sub-tabs/buttons of=20 your own, and there is a chance that it allows you to hook=20 into events such as 'row x was selected in the grid'.=20 @Vojtech will know better. Vojtech? if you are trying to hook into engine events (e.g. you want to=20 run a script every time a VM is started in oVirt, no matter if=20 the user started it by clicking the 'run' button in the oVirt- engine webadmin, or invoked a REST API request, or an SDK=20 command), then it will require some sort of an "engine-plugin"=20 infrastructure that we don't have at the moment AFAIK.=20 there is a chance that for some of the events you will be able=20 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@gmail.com> To: users@ovirt.org, engine-devel@ovirt.org Sent: Thursday, March 13, 2014 11:23:35 AM Subject: [Users] adding scripts =20 =20 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. =20 can someone guide on achieving this. =20 -- -Aditya Mamidwar =20 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users =20
<A href=3D"mailto:aditya.mamidwar@gmail.com">aditya mamidwar</A>; <A href= =3D"mailto:vszocs@redhat.com">Vojtech Szocs</A></SPAN><BR><SPAN style=3D"FO= NT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Cc: </SP= AN><SPAN style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href= =3D"mailto:users@ovirt.org">users@ovirt.org</A>; <A href=3D"mailto:engine-d= evel@ovirt.org">engine-devel@ovirt.org</A></SPAN><BR><SPAN style=3D"FONT-SI= ZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Subject: </SP= AN><SPAN style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Re: [Us= ers] adding scripts</SPAN><BR><BR></DIV>if you are trying to hook into UI-s=
--_D8651FB6-46F9-4DF8-98DD-D992EE03B3E3_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" <HTML><HEAD> <META content=3D"text/html; charset=3Dutf-8" http-equiv=3DContent-Type></HE= AD> <BODY> <DIV> <DIV style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Hey thanks = on the previous issue.<BR>Also is there a way i can access WebAdmin.Html to= add custom buttons and make few tweaks for personal use?<BR>I just cant fi= nd that file after using git.<BR><BR>Aditya Mamidwar</DIV></DIV> <DIV dir=3Dltr> <HR> <SPAN style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGH= T: bold">From: </SPAN><SPAN style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,= sans-serif"><A href=3D"mailto:ecohen@redhat.com">Einav Cohen</A></SPAN><BR>= <SPAN style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGH= T: bold">Sent: </SPAN><SPAN style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,= sans-serif">=E2=80=8E14-=E2=80=8E03-=E2=80=8E2014 01:21</SPAN><BR><SPAN sty= le=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">= To: </SPAN><SPAN style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"= pecific events, it sounds <BR>like you will need to write an oVirt UI Plugi= n [1] in order to <BR>do that. However, I believe that the oVirt UI Plugins= <BR>infrastructure doesn't support hooking to events such as "tab <BR>x wa= s selected" and/or "button b was clicked". <BR>It does allow you to add new= (custom) tabs/sub-tabs/buttons of <BR>your own, and there is a chance that= it allows you to hook <BR>into events such as 'row x was selected in the g= rid'. <BR><BR>@Vojtech will know better. Vojtech?<BR><BR>if you are trying = to hook into engine events (e.g. you want to <BR>run a script every time a = VM is started in oVirt, no matter if <BR>the user started it by clicking th= e 'run' button in the oVirt-<BR>engine webadmin, or invoked a REST API requ= est, or an SDK <BR>command), then it will require some sort of an "engine-p= lugin" <BR>infrastructure that we don't have at the moment AFAIK. <BR>there= is a chance that for some of the events you will be able <BR>to utilize th= e VDSM hooks (at the Host level) [2].<BR><BR>----<BR>Thanks,<BR>Einav<BR><B= R>[1] http://www.ovirt.org/Features/UIPlugins<BR><BR>[2] http://www.ovirt.o= rg/VDSM-Hooks<BR><BR><BR>----- Original Message -----<BR>> From: "aditya= mamidwar" <aditya.mamidwar@gmail.com><BR>> To: users@ovirt.org, e= ngine-devel@ovirt.org<BR>> Sent: Thursday, March 13, 2014 11:23:35 AM<BR=
> Subject: [Users] adding scripts<BR>> <BR>> <BR>> I want to c= ommit changes to the engine by adding some bash scripts.<BR>> the script= s should be invoked once a button or tab is selected in the<BR>> webadmi= n portal by the user.<BR>> <BR>> can someone guide on achieving this.= <BR>> <BR>> --<BR>> -Aditya Mamidwar<BR>> <BR>> ____________= ___________________________________<BR>> Users mailing list<BR>> User= s@ovirt.org<BR>> http://lists.ovirt.org/mailman/listinfo/users<BR>> <= BR></BODY></HTML>=
--_D8651FB6-46F9-4DF8-98DD-D992EE03B3E3_--

------=_Part_29440_1042558721.1394892959317 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable There's not one html file like that, since we use GWT [1]. However, if you = search for *.ui.xml files, you'll find all the GWT UIBinder files. That's t= he place to start for simple UI tweaks. The application is partitioned into= small components, so you'll have to do some digging. For example, each dia= log has its own ui.xml file -- so if you want to tweak a specific dialog, y= ou'll need to find the right file. Feel free to post questions about those = to engine-devel and we can help you out.=20 Greg=20 [1] http://www.gwtproject.org/=20 ----- Original Message -----
From: "Aditya Mamidwar" <aditya.mamidwar@gmail.com> To: "Einav Cohen" <ecohen@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com=
Cc: engine-devel@ovirt.org, users@ovirt.org Sent: Saturday, March 15, 2014 8:30:21 AM Subject: Re: [Users] adding scripts
Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and = make few tweaks for personal use? I just cant find that file after using git.
Aditya Mamidwar
From: Einav Cohen Sent: =E2=80=8E14-=E2=80=8E03-=E2=80=8E2014 01:21 To: aditya mamidwar ; Vojtech Szocs Cc: users@ovirt.org ; engine-devel@ovirt.org 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?
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
----- Original Message -----
From: "aditya mamidwar" <aditya.mamidwar@gmail.com> To: users@ovirt.org, engine-devel@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@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
<div><br></div><div><div style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sa= ns-serif" data-mce-style=3D"font-size: 11pt; font-family: Calibri,sans-seri= f;">Hey thanks on the previous issue.<br>Also is there a way i can access W= ebAdmin.Html to add custom buttons and make few tweaks for personal use?<br= I just cant find that file after using git.<br><div><br></div>Aditya Mamid= war</div></div><div dir=3D"ltr"><hr><span style=3D"FONT-SIZE: 11pt; FONT-FA= MILY: Calibri,sans-serif; FONT-WEIGHT: bold" data-mce-style=3D"font-size: 1= 1pt; font-family: Calibri,sans-serif; font-weight: bold;">From: </span><spa= n style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif" data-mce-style= =3D"font-size: 11pt; font-family: Calibri,sans-serif;"><a href=3D"mailto:ec= ohen@redhat.com" target=3D"_blank" data-mce-href=3D"mailto:ecohen@redhat.co= m">Einav Cohen</a></span><br><span style=3D"FONT-SIZE: 11pt; FONT-FAMILY: C= alibri,sans-serif; FONT-WEIGHT: bold" data-mce-style=3D"font-size: 11pt; fo= nt-family: Calibri,sans-serif; font-weight: bold;">Sent: </span><span style= =3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif" data-mce-style=3D"fon= t-size: 11pt; font-family: Calibri,sans-serif;">=E2=80=8E14-=E2=80=8E03-=E2= =80=8E2014 01:21</span><br><span style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Cal= ibri,sans-serif; FONT-WEIGHT: bold" data-mce-style=3D"font-size: 11pt; font= -family: Calibri,sans-serif; font-weight: bold;">To: </span><span style=3D"= FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif" data-mce-style=3D"font-si= ze: 11pt; font-family: Calibri,sans-serif;"><a href=3D"mailto:aditya.mamidw= ar@gmail.com" target=3D"_blank" data-mce-href=3D"mailto:aditya.mamidwar@gma= il.com">aditya mamidwar</a>; <a href=3D"mailto:vszocs@redhat.com" target=3D= "_blank" data-mce-href=3D"mailto:vszocs@redhat.com">Vojtech Szocs</a></span= <br><span style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-= WEIGHT: bold" data-mce-style=3D"font-size: 11pt; font-family: Calibri,sans-= serif; font-weight: bold;">Cc: </span><span style=3D"FONT-SIZE: 11pt; FONT-= FAMILY: Calibri,sans-serif" data-mce-style=3D"font-size: 11pt; font-family:= Calibri,sans-serif;"><a href=3D"mailto:users@ovirt.org" target=3D"_blank" = data-mce-href=3D"mailto:users@ovirt.org">users@ovirt.org</a>; <a href=3D"ma= ilto:engine-devel@ovirt.org" target=3D"_blank" data-mce-href=3D"mailto:engi= ne-devel@ovirt.org">engine-devel@ovirt.org</a></span><br><span style=3D"FON= T-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold" data-mce-=
engine webadmin, or invoked a REST API request, or an SDK <br>command), th= en it will require some sort of an "engine-plugin" <br>infrastructure that = we don't have at the moment AFAIK. <br>there is a chance that for some of t= he events you will be able <br>to utilize the VDSM hooks (at the Host level= ) [2].<br><div><br></div>----<br>Thanks,<br>Einav<br><div><br></div>[1] htt=
------=_Part_29440_1042558721.1394892959317 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"font-family: times new roman, new york, times, se= rif; font-size: 12pt; color: #000000"><div>There's not one html file like t= hat, since we use GWT [1]. However, if you search for *.ui.xml files, you'l= l find all the GWT UIBinder files. That's the place to start for simple UI = tweaks. The application is partitioned into small components, so you'll hav= e to do some digging. For example, each dialog has its own ui.xml file -- s= o if you want to tweak a specific dialog, you'll need to find the right fil= e. Feel free to post questions about those to engine-devel and we can help = you out.</div><div><br></div><div>Greg</div><div><br></div><div>[1] <a= href=3D"http://www.gwtproject.org/" data-mce-href=3D"http://www.gwtproject= .org/">http://www.gwtproject.org/</a></div><div><br></div><hr id=3D"zwchr">= <blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px;padding-= left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:no= ne;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style= =3D"border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; co= lor: #000; font-weight: normal; font-style: normal; text-decoration: none; = font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Ad= itya Mamidwar" <aditya.mamidwar@gmail.com><br><b>To: </b>"Einav Cohen= " <ecohen@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com><br><= b>Cc: </b>engine-devel@ovirt.org, users@ovirt.org<br><b>Sent: </b>Saturday,= March 15, 2014 8:30:21 AM<br><b>Subject: </b>Re: [Users] adding scripts<br= style=3D"font-size: 11pt; font-family: Calibri,sans-serif; font-weight: bol= d;">Subject: </span><span style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sa= ns-serif" data-mce-style=3D"font-size: 11pt; font-family: Calibri,sans-seri= f;">Re: [Users] adding scripts</span><br><div><br></div></div>if you are tr= ying to hook into UI-specific events, it sounds <br>like you will need to w= rite an oVirt UI Plugin [1] in order to <br>do that. However, I believe tha= t the oVirt UI Plugins <br>infrastructure doesn't support hooking to events= such as "tab <br>x was selected" and/or "button b was clicked". <br>It doe= s allow you to add new (custom) tabs/sub-tabs/buttons of <br>your own, and = there is a chance that it allows you to hook <br>into events such as 'row x= was selected in the grid'. <br><div><br></div>@Vojtech will know better. V= ojtech?<br><div><br></div>if you are trying to hook into engine events (e.g= . you want to <br>run a script every time a VM is started in oVirt, no matt= er if <br>the user started it by clicking the 'run' button in the oVirt-<br= p://www.ovirt.org/Features/UIPlugins<br><div><br></div>[2] http://www.ovirt= .org/VDSM-Hooks<br><div><br></div><br>----- Original Message -----<br>> = From: "aditya mamidwar" <aditya.mamidwar@gmail.com><br>> To: users= @ovirt.org, engine-devel@ovirt.org<br>> Sent: Thursday, March 13, 2014 1= 1:23:35 AM<br>> Subject: [Users] adding scripts<br>> <br>> <br>>= ; I want to commit changes to the engine by adding some bash scripts.<br>&g= t; the scripts should be invoked once a button or tab is selected in the<br=
> webadmin portal by the user.<br>> <br>> can someone guide on ac= hieving this.<br>> <br>> --<br>> -Aditya Mamidwar<br>> <br>>= _______________________________________________<br>> Users mailing list= <br>> Users@ovirt.org<br>> http://lists.ovirt.org/mailman/listinfo/us= ers<br>> <br><br>_______________________________________________<br>User= s mailing list<br>Users@ovirt.org<br>http://lists.ovirt.org/mailman/listinf= o/users<br></blockquote><div><br></div></div></body></html> ------=_Part_29440_1042558721.1394892959317--

may I ask what is the general purpose of these buttons that you would like to add and where (in the GUI) would you like to add them? if you would like to add buttons to existing main-tab(s) / sub- tab(s), the way to go is to write a UI Plugin that does that (especially if you intend these buttons to do something very specific for your needs). If you would like to add these buttons elsewhere, you will need to follow Greg's instructions and dig into the code for the specific needed location.
I want to commit changes to the engine...
note that we can push into the code only things that make sense to include in oVirt (i.e. things that will be useful for typical oVirt users); again, if these buttons will do something very specific for your own needs, you should definitely utilize the UI Plugins infrastructure instead.
... and make few tweaks for personal use...
if these tweaks are in the "branding" area (i.e. if you want to change main color themes, top-left image on the top banner, etc), then writing your own branding [1] is the way to go [you can override only part of the branding (depending on what you would like to tweak), you don't actually need to come up with a complete alternative branding]. ---- Thanks, Einav [1] http://www.ovirt.org/Feature/Branding ----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Aditya Mamidwar" <aditya.mamidwar@gmail.com> Cc: engine-devel@ovirt.org, users@ovirt.org Sent: Saturday, March 15, 2014 10:15:59 AM Subject: Re: [Users] adding scripts
There's not one html file like that, since we use GWT [1]. However, if you search for *.ui.xml files, you'll find all the GWT UIBinder files. That's the place to start for simple UI tweaks. The application is partitioned into small components, so you'll have to do some digging. For example, each dialog has its own ui.xml file -- so if you want to tweak a specific dialog, you'll need to find the right file. Feel free to post questions about those to engine-devel and we can help you out.
Greg
[1] http://www.gwtproject.org/
From: "Aditya Mamidwar" <aditya.mamidwar@gmail.com> To: "Einav Cohen" <ecohen@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com> Cc: engine-devel@ovirt.org, users@ovirt.org Sent: Saturday, March 15, 2014 8:30:21 AM Subject: Re: [Users] adding scripts
Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and make few tweaks for personal use? I just cant find that file after using git.
Aditya Mamidwar
From: Einav Cohen Sent: 14-03-2014 01:21 To: aditya mamidwar ; Vojtech Szocs Cc: users@ovirt.org ; engine-devel@ovirt.org 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?
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@gmail.com> To: users@ovirt.org, engine-devel@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@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

Aditya, That is because that file doesn't exist. We map that name to a servlet in web.xml. If you want to modify the GWT host page take a look at GwtDynamicHostPageServlet.java and its sub classes (for user portal and webadmin). As well as GwtHostPage.jsp. You will find there is almost nothing in that page as all the HTML is being generated at runtime using GWT. Since you are not really explaining what you are trying to do we can't help you better on the best strategy to achieve what you want. Alexander On Saturday, March 15, 2014 06:00:21 PM Aditya Mamidwar wrote:
Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and make few tweaks for personal use? I just cant find that file after using git.
Aditya Mamidwar
-----Original Message----- From: "Einav Cohen" <ecohen@redhat.com> Sent: 14-03-2014 01:21 To: "aditya mamidwar" <aditya.mamidwar@gmail.com>; "Vojtech Szocs" <vszocs@redhat.com> Cc: "users@ovirt.org" <users@ovirt.org>; "engine-devel@ovirt.org" <engine-devel@ovirt.org> 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?
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@gmail.com> To: users@ovirt.org, engine-devel@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@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hey, my team is working on adding AoE protocol support to ovirt. am thus facing following difficulties: 1 : i wrote the required code using in bash scripting, which i wish to invoke after a click of button in the ovirt-portal. (which does not seem to be possible). can you help on that? which programming language should i use, and how that file should be invoked. 2. for ISOs to be available, i need to enable hosts configured in clusters and storage domains of ATA type. (currently NFS, iSCSI and FC are done). which files should i focus on changing for above functionality. 3. How do i change the custom layout of the engine? (like adding a few extra buttons.) please specify the files responsible. 4. the above questions stress that am facing difficulty in identifying files responsible for a particular module. is there a better way to do that instead of digging up the entire source code. ( a documentation if available.) On Mon, Mar 17, 2014 at 5:52 PM, Alexander Wels <awels@redhat.com> wrote:
Aditya,
That is because that file doesn't exist. We map that name to a servlet in web.xml. If you want to modify the GWT host page take a look at GwtDynamicHostPageServlet.java and its sub classes (for user portal and webadmin). As well as GwtHostPage.jsp. You will find there is almost nothing in that page as all the HTML is being generated at runtime using GWT.
Since you are not really explaining what you are trying to do we can't help you better on the best strategy to achieve what you want.
Alexander
On Saturday, March 15, 2014 06:00:21 PM Aditya Mamidwar wrote:
Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and make few tweaks for personal use? I just cant find that file after using git.
Aditya Mamidwar
-----Original Message----- From: "Einav Cohen" <ecohen@redhat.com> Sent: 14-03-2014 01:21 To: "aditya mamidwar" <aditya.mamidwar@gmail.com>; "Vojtech Szocs" <vszocs@redhat.com> Cc: "users@ovirt.org" <users@ovirt.org>; "engine-devel@ovirt.org" <engine-devel@ovirt.org> 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?
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@gmail.com> To: users@ovirt.org, engine-devel@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@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- -Aditya Mamidwar

------=_Part_1855115_740317422.1395405184864 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit ----- Original Message ----- From: "aditya mamidwar" <aditya.mamidwar@gmail.com> To: awels@redhat.com, engine-devel@ovirt.org, users@ovirt.org Sent: Friday, March 21, 2014 6:14:01 AM Subject: Re: [Users] [Engine-devel] adding scripts Hey, my team is working on adding AoE protocol support to ovirt. am thus facing following difficulties: 1 : i wrote the required code using in bash scripting, which i wish to invoke after a click of button in the ovirt-portal. (which does not seem to be possible). can you help on that? which programming language should i use, and how that file should be invoked. This needs to be done in Java. You'll need to read up on oVirt's UI Plugin infrastructure, which Einav and others mentioned below. No, you cannot write a bash script and have a button click in oVirt invoke that. <blockquote> 2. for ISOs to be available, i need to enable hosts configured in clusters and storage domains of ATA type. (currently NFS, iSCSI and FC are done). which files should i focus on changing for above functionality. </blockquote> I've never heard of ATA network storage. Are you referring to ATA hardware technology, i.e. SATA? At any rate, adding a custom storage domain technology will difficult. Hopefully someone else on list can direct you. <blockquote> 3. How do i change the custom layout of the engine? (like adding a few extra buttons.) please specify the files responsible. </blockquote> Again, you'll need to read up on oVirt's UI Plugin infrastructure. http://www.ovirt.org/Features/UIPlugins <blockquote> 4. the above questions stress that am facing difficulty in identifying files responsible for a particular module. is there a better way to do that instead of digging up the entire source code. ( a documentation if available.) </blockquote> Other than what we've already mentioned (JavaDoc, architecture docs on the wiki), no. Greg <blockquote> On Mon, Mar 17, 2014 at 5:52 PM, Alexander Wels < awels@redhat.com > wrote: <blockquote> Aditya, That is because that file doesn't exist. We map that name to a servlet in web.xml. If you want to modify the GWT host page take a look at GwtDynamicHostPageServlet.java and its sub classes (for user portal and webadmin). As well as GwtHostPage.jsp. You will find there is almost nothing in that page as all the HTML is being generated at runtime using GWT. Since you are not really explaining what you are trying to do we can't help you better on the best strategy to achieve what you want. Alexander On Saturday, March 15, 2014 06:00:21 PM Aditya Mamidwar wrote:
Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and make few tweaks for personal use? I just cant find that file after using git.
Aditya Mamidwar
-----Original Message----- From: "Einav Cohen" < ecohen@redhat.com > Sent: 14-03-2014 01:21 To: "aditya mamidwar" < aditya.mamidwar@gmail.com >; "Vojtech Szocs" < vszocs@redhat.com > Cc: " users@ovirt.org " < users@ovirt.org >; " engine-devel@ovirt.org " < engine-devel@ovirt.org > 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?
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@gmail.com > To: users@ovirt.org , engine-devel@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@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
users@ovirt.org</a>>;<br> > "<a href=3D"mailto:engine-devel@ovirt.org" target=3D"_blank">engine-de= vel@ovirt.org</a>" <<a href=3D"mailto:engine-devel@ovirt.org" target=3D"= _blank">engine-devel@ovirt.org</a>> Subject: Re: [Users]<br> > adding scripts<br> ><br> > if you are trying to hook into UI-specific events, it sounds<br> > like you will need to write an oVirt UI Plugin [1] in order to<br> > do that. However, I believe that the oVirt UI Plugins<br> > infrastructure doesn't support hooking to events such as "tab<br> > x was selected" and/or "button b was clicked".<br> > It does allow you to add new (custom) tabs/sub-tabs/buttons of<br> > your own, and there is a chance that it allows you to hook<br> > into events such as 'row x was selected in the grid'.<br> ><br> > @Vojtech will know better. Vojtech?<br> ><br> > if you are trying to hook into engine events (e.g. you want to<br> > run a script every time a VM is started in oVirt, no matter if<br> > the user started it by clicking the 'run' button in the oVirt-<br> > engine webadmin, or invoked a REST API request, or an SDK<br> > command), then it will require some sort of an "engine-plugin"<br> > infrastructure that we don't have at the moment AFAIK.<br> > there is a chance that for some of the events you will be able<br> > to utilize the VDSM hooks (at the Host level) [2].<br> ><br> > ----<br> > Thanks,<br> > Einav<br> ><br> > [1] <a href=3D"http://www.ovirt.org/Features/UIPlugins" target=3D"_bla= nk">http://www.ovirt.org/Features/UIPlugins</a><br> ><br> > [2] <a href=3D"http://www.ovirt.org/VDSM-Hooks" target=3D"_blank">http= ://www.ovirt.org/VDSM-Hooks</a><br> ><br> ><br> > ----- Original Message -----<br> ><br> > > From: "aditya mamidwar" <<a href=3D"mailto:aditya.mamidwar@gma= il.com" target=3D"_blank">aditya.mamidwar@gmail.com</a>><br> > > To: <a href=3D"mailto:users@ovirt.org" target=3D"_blank">users@ov= irt.org</a>, <a href=3D"mailto:engine-devel@ovirt.org" target=3D"_blank">en= gine-devel@ovirt.org</a><br> > > Sent: Thursday, March 13, 2014 11:23:35 AM<br> > > Subject: [Users] adding scripts<br> > ><br> > ><br> > > I want to commit changes to the engine by adding some bash script= s.<br> > > the scripts should be invoked once a button or tab is selected in=
</blockquote> -- -Aditya Mamidwar _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users </blockquote> ------=_Part_1855115_740317422.1395405184864 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"font-family: times new roman, new york, times, se= rif; font-size: 12pt; color: #000000"><div><br></div><hr id=3D"zwchr"><bloc= kquote style=3D"border-left:2px solid #1010FF;margin-left:5px;padding-left:= 5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;fo= nt-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"aditya = mamidwar" <aditya.mamidwar@gmail.com><br><b>To: </b>awels@redhat.com,= engine-devel@ovirt.org, users@ovirt.org<br><b>Sent: </b>Friday, March 21, = 2014 6:14:01 AM<br><b>Subject: </b>Re: [Users] [Engine-devel] adding = scripts<br><div><br></div><div dir=3D"ltr"><div><div><div><div><div><div><d= iv><br></div>Hey,<br></div>my team is working on adding AoE protocol suppor= t to ovirt.<br><div><br></div></div>am thus facing following difficulties:<= br></div>1 : i wrote the required code using in bash scripting, which i wis= h to invoke after a click of button in the ovirt-portal. (which does not se= em to be possible). can you help on that? which programming language should= i use, and how that file should be invoked.</div></div></div></div></block= quote><div>This needs to be done in Java. You'll need to read up on oVirt's= UI Plugin infrastructure, which Einav and others mentioned below. No, you = cannot write a bash script and have a button click in oVirt invoke that.</d= iv><blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px;paddi= ng-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration= :none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir=3D"l= tr"><div><div><div><div><br></div></div>2. for ISOs to be available, i need= to enable hosts configured in clusters and storage domains of ATA type. (c= urrently NFS, iSCSI and FC are done). which files should i focus on changin= g for above functionality.</div></div></div></blockquote><div>I've never he= ard of ATA network storage. Are you referring to ATA hardware technology, i= .e. SATA?</div><div><br></div><div>At any rate, adding a custom storage dom= ain technology will difficult. Hopefully someone else on list can direct yo= u.</div><blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px;= padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decor= ation:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir= =3D"ltr"><div><div><div><br></div></div>3. How do i change the custom layou= t of the engine? (like adding a few extra buttons.) please specify the file= s responsible.</div></div></blockquote><div>Again, you'll need to read up o= n oVirt's UI Plugin infrastructure. http://www.ovirt.org/Features/UIPl= ugins</div><blockquote style=3D"border-left:2px solid #1010FF;margin-left:5= px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-de= coration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div = dir=3D"ltr"><div><div><br></div></div>4. the above questions stress that am= facing difficulty in identifying files responsible for a particular module= . is there a better way to do that instead of digging up the entire source = code. ( a documentation if available.)</div></blockquote><div>Other than wh= at we've already mentioned (JavaDoc, architecture docs on the wiki), no.</d= iv><div><br></div><div>Greg</div><div><br></div><blockquote style=3D"border= -left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-we= ight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Ar= ial,sans-serif;font-size:12pt;"><div dir=3D"ltr"><br><div><br></div></div><= div class=3D"gmail_extra"><br><div><br></div><div class=3D"gmail_quote">On = Mon, Mar 17, 2014 at 5:52 PM, Alexander Wels <span dir=3D"ltr"><<a href= =3D"mailto:awels@redhat.com" target=3D"_blank">awels@redhat.com</a>></sp= an> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;= border-left:1px #ccc solid;padding-left:1ex">Aditya,<br><div><br></div> That is because that file doesn't exist. We map that name to a servlet in<b= r> web.xml. If you want to modify the GWT host page take a look at<br> GwtDynamicHostPageServlet.java and its sub classes (for user portal and<br> webadmin). As well as GwtHostPage.jsp. You will find there is almost nothin= g in<br> that page as all the HTML is being generated at runtime using GWT.<br><div>= <br></div> Since you are not really explaining what you are trying to do we can't help= <br> you better on the best strategy to achieve what you want.<br><span class=3D= "HOEnZb"><span style=3D"color: #888888;"><br> Alexander<br> </span></span><div class=3D"im HOEnZb"><br> On Saturday, March 15, 2014 06:00:21 PM Aditya Mamidwar wrote:<br> > Hey thanks on the previous issue.<br> > Also is there a way i can access WebAdmin.Html to add custom buttons a= nd<br> > make few tweaks for personal use? I just cant find that file after usi= ng<br> > git.<br> ><br> > Aditya Mamidwar<br> ><br></div><div class=3D"im HOEnZb">> -----Original Message-----<br> > From: "Einav Cohen" <<a href=3D"mailto:ecohen@redhat.com" target=3D= "_blank">ecohen@redhat.com</a>><br> > Sent: 14-03-2014 01:21<br></div><div class=3D"HOEnZb"><div class=3D"h5= ">> To: "aditya mamidwar" <<a href=3D"mailto:aditya.mamidwar@gmail.co= m" target=3D"_blank">aditya.mamidwar@gmail.com</a>>; "Vojtech Szocs"<br> > <<a href=3D"mailto:vszocs@redhat.com" target=3D"_blank">vszocs@redh= at.com</a>> Cc: "<a href=3D"mailto:users@ovirt.org" target=3D"_blank">us= ers@ovirt.org</a>" <<a href=3D"mailto:users@ovirt.org" target=3D"_blank"= the<br> > > webadmin portal by the user.<br> > ><br> > > can someone guide on achieving this.<br> > ><br> > > --<br> > > -Aditya Mamidwar<br> > ><br> > > _______________________________________________<br> > > Users mailing list<br> > > <a href=3D"mailto:Users@ovirt.org" target=3D"_blank">Users@ovirt.= org</a><br> > > <a href=3D"http://lists.ovirt.org/mailman/listinfo/users" target= =3D"_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br><div><br><= /div></div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>-Adity= a Mamidwar </div><br>_______________________________________________<br>Users mailing = list<br>Users@ovirt.org<br>http://lists.ovirt.org/mailman/listinfo/users<br=
</blockquote><div><br></div></div></body></html> ------=_Part_1855115_740317422.1395405184864--

On Friday, March 21, 2014 03:44:01 PM aditya mamidwar wrote:
Hey, my team is working on adding AoE protocol support to ovirt.
am thus facing following difficulties: 1 : i wrote the required code using in bash scripting, which i wish to invoke after a click of button in the ovirt-portal. (which does not seem to be possible). can you help on that? which programming language should i use, and how that file should be invoked.
When you say ovirt portal I am assuming you mean the web admin as giving users access to low level stuff like that in the user portal would probably be a bad thing. As said in a couple of other responses the best way to do that in webadmin is probably writing a UI plugin. A full explanation of what you can do with a UI plugin is available here: http://www.ovirt.org/Features/UIPlugins In short a UI plugin is a mini application written in Javascript that hooks into the main web admin UI. The UI infrastructure makes certain element of the UI available to the plugin. One of the things it can do is to allow you to add buttons to the UI. When those buttons are clicked whatever javascript handler you assigned to it will execute. This gives you a couple of options: 1. Write your own web application that can take commands from buttons inside the web admin interface. Since the ovirt engine runs on JBOSS I would suggest you write your own web application in Java that executes the appropriate bash commands based on which button is pressed using the UI plugin. 2. Write a minimal plugin that makes use of the REST API and add code to call your bash scripts from the REST api.
2. for ISOs to be available, i need to enable hosts configured in clusters and storage domains of ATA type. (currently NFS, iSCSI and FC are done). which files should i focus on changing for above functionality.
Honestly I don't know enough about the storage infrastructure to give you a good answer to that. Maybe someone else can fill this in.
3. How do i change the custom layout of the engine? (like adding a few extra buttons.) please specify the files responsible.
Look at the UI plugins, the page linked above explains their usage in great detail as well as give a bunch of examples on how to achieve this.
4. the above questions stress that am facing difficulty in identifying files responsible for a particular module. is there a better way to do that instead of digging up the entire source code. ( a documentation if available.)
This gives a nice overview of the architecture of oVirt: http://www.ovirt.org/Architecture The source code associated with that is basically split out into two GIT repositories. 1. For the frontend and the engine, which is all java code. 2. For VDSM which is all python. The user portal and web admin communicate with the engine using GWT-RPC and soon the REST api. Then the engine communicates with VDSM using XML-RPC. The engine runs on one machine (either dedicated or as its own VM on one of your hosts). Then VDSM runs on the hosts. The hosts are the ones that communicate with the storage. So I am guessing your bash code will run on a host? So in short, I think this is what you want? 1. Write UI plugin to add the buttons/etc to the webadmin. 2. Write your own web app, or hook into the REST API and add the commands to execute whatever it is you are doing. 3. (Maybe?) Modify VDSM to accept the commands from the REST API or your web application, and execute your scripts using VDSM based on the commands. Alexander
On Mon, Mar 17, 2014 at 5:52 PM, Alexander Wels <awels@redhat.com> wrote:
Aditya,
That is because that file doesn't exist. We map that name to a servlet in web.xml. If you want to modify the GWT host page take a look at GwtDynamicHostPageServlet.java and its sub classes (for user portal and webadmin). As well as GwtHostPage.jsp. You will find there is almost nothing in that page as all the HTML is being generated at runtime using GWT.
Since you are not really explaining what you are trying to do we can't help you better on the best strategy to achieve what you want.
Alexander
On Saturday, March 15, 2014 06:00:21 PM Aditya Mamidwar wrote:
Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and make few tweaks for personal use? I just cant find that file after using git.
Aditya Mamidwar
-----Original Message----- From: "Einav Cohen" <ecohen@redhat.com> Sent: 14-03-2014 01:21 To: "aditya mamidwar" <aditya.mamidwar@gmail.com>; "Vojtech Szocs" <vszocs@redhat.com> Cc: "users@ovirt.org" <users@ovirt.org>; "engine-devel@ovirt.org" <engine-devel@ovirt.org> 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?
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@gmail.com> To: users@ovirt.org, engine-devel@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@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

----- Original Message -----
From: "Alexander Wels" <awels@redhat.com> To: "aditya mamidwar" <aditya.mamidwar@gmail.com> Cc: engine-devel@ovirt.org, users@ovirt.org Sent: Friday, March 21, 2014 1:49:22 PM Subject: Re: [Users] [Engine-devel] adding scripts
On Friday, March 21, 2014 03:44:01 PM aditya mamidwar wrote:
Hey, my team is working on adding AoE protocol support to ovirt.
am thus facing following difficulties: 1 : i wrote the required code using in bash scripting, which i wish to invoke after a click of button in the ovirt-portal. (which does not seem to be possible). can you help on that? which programming language should i use, and how that file should be invoked.
When you say ovirt portal I am assuming you mean the web admin as giving users access to low level stuff like that in the user portal would probably be a bad thing.
As said in a couple of other responses the best way to do that in webadmin is probably writing a UI plugin. A full explanation of what you can do with a UI plugin is available here: http://www.ovirt.org/Features/UIPlugins
In short a UI plugin is a mini application written in Javascript that hooks into the main web admin UI. The UI infrastructure makes certain element of the UI available to the plugin. One of the things it can do is to allow you to add buttons to the UI. When those buttons are clicked whatever javascript handler you assigned to it will execute.
This gives you a couple of options: 1. Write your own web application that can take commands from buttons inside the web admin interface. Since the ovirt engine runs on JBOSS I would suggest you write your own web application in Java that executes the appropriate bash commands based on which button is pressed using the UI plugin. 2. Write a minimal plugin that makes use of the REST API and add code to call your bash scripts from the REST api.
Some more options (already mentioned on users list): 3. UI plugin requesting URL mapped to Apache CGI/Bash script (assuming WebAdmin is accessed through Apache which forwards request to Engine JBoss server) 4. run your own HTTP server, enable Cross-Origin Resource Sharing for requests coming from Engine origin, have UI plugin call this custom server via HTTP It is entirely up to UI plugin developers if/how the plugin should communicate with servers.
2. for ISOs to be available, i need to enable hosts configured in clusters and storage domains of ATA type. (currently NFS, iSCSI and FC are done). which files should i focus on changing for above functionality.
Honestly I don't know enough about the storage infrastructure to give you a good answer to that. Maybe someone else can fill this in.
3. How do i change the custom layout of the engine? (like adding a few extra buttons.) please specify the files responsible.
Look at the UI plugins, the page linked above explains their usage in great detail as well as give a bunch of examples on how to achieve this.
4. the above questions stress that am facing difficulty in identifying files responsible for a particular module. is there a better way to do that instead of digging up the entire source code. ( a documentation if available.)
This gives a nice overview of the architecture of oVirt: http://www.ovirt.org/Architecture
The source code associated with that is basically split out into two GIT repositories. 1. For the frontend and the engine, which is all java code. 2. For VDSM which is all python.
The user portal and web admin communicate with the engine using GWT-RPC and soon the REST api. Then the engine communicates with VDSM using XML-RPC.
Right, REST API in UI is coming soon. We're planning to provide JavaScript SDK to work with Engine REST API, so UI plugins (or any other web applications) can integrate easily with oVirt Engine.
The engine runs on one machine (either dedicated or as its own VM on one of your hosts). Then VDSM runs on the hosts. The hosts are the ones that communicate with the storage. So I am guessing your bash code will run on a host?
So in short, I think this is what you want? 1. Write UI plugin to add the buttons/etc to the webadmin. 2. Write your own web app, or hook into the REST API and add the commands to execute whatever it is you are doing. 3. (Maybe?) Modify VDSM to accept the commands from the REST API or your web application, and execute your scripts using VDSM based on the commands.
Alexander
On Mon, Mar 17, 2014 at 5:52 PM, Alexander Wels <awels@redhat.com> wrote:
Aditya,
That is because that file doesn't exist. We map that name to a servlet in web.xml. If you want to modify the GWT host page take a look at GwtDynamicHostPageServlet.java and its sub classes (for user portal and webadmin). As well as GwtHostPage.jsp. You will find there is almost nothing in that page as all the HTML is being generated at runtime using GWT.
Since you are not really explaining what you are trying to do we can't help you better on the best strategy to achieve what you want.
Alexander
On Saturday, March 15, 2014 06:00:21 PM Aditya Mamidwar wrote:
Hey thanks on the previous issue. Also is there a way i can access WebAdmin.Html to add custom buttons and make few tweaks for personal use? I just cant find that file after using git.
Aditya Mamidwar
-----Original Message----- From: "Einav Cohen" <ecohen@redhat.com> Sent: 14-03-2014 01:21 To: "aditya mamidwar" <aditya.mamidwar@gmail.com>; "Vojtech Szocs" <vszocs@redhat.com> Cc: "users@ovirt.org" <users@ovirt.org>; "engine-devel@ovirt.org" <engine-devel@ovirt.org> 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?
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@gmail.com> To: users@ovirt.org, engine-devel@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@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 03/21/2014 12:14 PM, aditya mamidwar wrote:
Hey, my team is working on adding AoE protocol support to ovirt.
Hi Aditya, I suggest you try to reach allon mureinik or federico simoncelli over irc to discuss what you are trying to do (I assume this is ATA over Ethernet). This will first require code at the vdsm side (custom hook or full blown feature), only then can engine/gui code to match.
am thus facing following difficulties: 1 : i wrote the required code using in bash scripting, which i wish to invoke after a click of button in the ovirt-portal. (which does not seem to be possible). can you help on that? which programming language should i use, and how that file should be invoked.
2. for ISOs to be available, i need to enable hosts configured in clusters and storage domains of ATA type. (currently NFS, iSCSI and FC are done). which files should i focus on changing for above functionality.
3. How do i change the custom layout of the engine? (like adding a few extra buttons.) please specify the files responsible.
4. the above questions stress that am facing difficulty in identifying files responsible for a particular module. is there a better way to do that instead of digging up the entire source code. ( a documentation if available.)
On Mon, Mar 17, 2014 at 5:52 PM, Alexander Wels <awels@redhat.com <mailto:awels@redhat.com>> wrote:
Aditya,
That is because that file doesn't exist. We map that name to a servlet in web.xml. If you want to modify the GWT host page take a look at GwtDynamicHostPageServlet.java and its sub classes (for user portal and webadmin). As well as GwtHostPage.jsp. You will find there is almost nothing in that page as all the HTML is being generated at runtime using GWT.
Since you are not really explaining what you are trying to do we can't help you better on the best strategy to achieve what you want.
Alexander
On Saturday, March 15, 2014 06:00:21 PM Aditya Mamidwar wrote: > Hey thanks on the previous issue. > Also is there a way i can access WebAdmin.Html to add custom buttons and > make few tweaks for personal use? I just cant find that file after using > git. > > Aditya Mamidwar > > -----Original Message----- > From: "Einav Cohen" <ecohen@redhat.com <mailto:ecohen@redhat.com>> > Sent: 14-03-2014 01:21 > To: "aditya mamidwar" <aditya.mamidwar@gmail.com <mailto:aditya.mamidwar@gmail.com>>; "Vojtech Szocs" > <vszocs@redhat.com <mailto:vszocs@redhat.com>> Cc: "users@ovirt.org <mailto:users@ovirt.org>" <users@ovirt.org <mailto:users@ovirt.org>>; > "engine-devel@ovirt.org <mailto:engine-devel@ovirt.org>" <engine-devel@ovirt.org <mailto:engine-devel@ovirt.org>> 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? > > 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@gmail.com <mailto:aditya.mamidwar@gmail.com>> > > To: users@ovirt.org <mailto:users@ovirt.org>, engine-devel@ovirt.org <mailto:engine-devel@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@ovirt.org <mailto:Users@ovirt.org> > > http://lists.ovirt.org/mailman/listinfo/users
-- -Aditya Mamidwar
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
participants (7)
-
Aditya Mamidwar
-
aditya mamidwar
-
Alexander Wels
-
Einav Cohen
-
Greg Sheremeta
-
Itamar Heim
-
Vojtech Szocs