[Users] New UI plugin: UI-VDSM-Hooks

Hi, I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient). You can read all about it in my blog: http://derezvir.blogspot.co.il/ Thanks, Daniel

On Sun, Jun 09, 2013 at 12:40:39PM -0400, Daniel Erez wrote:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Oh, cool! Two comments though: it would be safer to do from vdsm import vdscli and use the vdscli module directly. vdsClient has many flaws and limitations (e.g. it's impossible to start a new vm with the "devices" API, only with the old nicModel/bridge/macAddr way). It should not be difficult to make your UI plugin work with ssl=True, too. All that should be done is to fix vdscli.connect() to look for its key/certs in the proper place. Currently, and ancient codepiece there, assumes that the Engine run on Windows (/me shudders). Regards, Dan.

I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage. Am 09.06.2013 18:40, schrieb Daniel Erez:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Thanks, Daniel _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Mit freundlichen Grüßen Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150

----- Original Message -----
From: "Michael Wagenknecht" <Wagenknecht@FuH-E.de> To: users@ovirt.org Sent: Monday, June 10, 2013 1:15:34 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage.
Have you copied the cgi-bin folder into a web server in your host?
Am 09.06.2013 18:40, schrieb Daniel Erez:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Thanks, Daniel _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Yes I have and the ui-vdsm-hooks.cgi is accessable from the web server. Am 10.06.2013 14:59, schrieb Daniel Erez:
----- Original Message -----
From: "Michael Wagenknecht"<Wagenknecht@FuH-E.de> To: users@ovirt.org Sent: Monday, June 10, 2013 1:15:34 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage. Have you copied the cgi-bin folder into a web server in your host?
Am 09.06.2013 18:40, schrieb Daniel Erez:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Thanks, Daniel _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users -- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Mit freundlichen Grüßen Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150

Hi Daniel, First of all thanks for the very useful plugin! Is this plugin compatible with oVirt 3.2.1 or is a newer version required (didn't update to 3.2.2 yet)? I'm having the same issue as Michale and I think api.showDialog causes this issue, but didn't had enough time to verify yet... Regards, René On Mon, 2013-06-10 at 15:06 +0200, Michael Wagenknecht wrote:
Yes I have and the ui-vdsm-hooks.cgi is accessable from the web server.
Am 10.06.2013 14:59, schrieb Daniel Erez:
----- Original Message -----
From: "Michael Wagenknecht"<Wagenknecht@FuH-E.de> To: users@ovirt.org Sent: Monday, June 10, 2013 1:15:34 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage. Have you copied the cgi-bin folder into a web server in your host?
Am 09.06.2013 18:40, schrieb Daniel Erez:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Thanks, Daniel _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users -- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

----- Original Message -----
From: "René Koch (ovido)" <r.koch@ovido.at> To: "Michael Wagenknecht" <Wagenknecht@FuH-E.de> Cc: "Daniel Erez" <derez@redhat.com>, users@ovirt.org Sent: Monday, June 10, 2013 4:32:46 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
Hi Daniel,
First of all thanks for the very useful plugin!
Is this plugin compatible with oVirt 3.2.1 or is a newer version required (didn't update to 3.2.2 yet)? I'm having the same issue as Michale and I think api.showDialog causes this issue, but didn't had enough time to verify yet...
It would probably require newer builds... As the plugin uses a rather recent API (e.g. adding a button 'OnlyFromContext').
Regards, René
On Mon, 2013-06-10 at 15:06 +0200, Michael Wagenknecht wrote:
Yes I have and the ui-vdsm-hooks.cgi is accessable from the web server.
Am 10.06.2013 14:59, schrieb Daniel Erez:
----- Original Message -----
From: "Michael Wagenknecht"<Wagenknecht@FuH-E.de> To: users@ovirt.org Sent: Monday, June 10, 2013 1:15:34 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage. Have you copied the cgi-bin folder into a web server in your host?
Am 09.06.2013 18:40, schrieb Daniel Erez:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Thanks, Daniel _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users -- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hi Daniel, this plugin looks very cool! I'm starting to realize that CGI scripts are quite handy for implementing any sort of server-side logic for UI plugins, especially since we have Apache web server in front of JBoss application server (Engine) in standard oVirt installation. Looking at the code, this plugin should work fine with oVirt 3.2.1+ since showDialog API changes landed into 3.2.1 release. Regarding the issue with bad dialog content - you can edit start.html and put following code right before api.showDialog call: window.alert(url); This will show actual dialog content URL - you can try opening this URL normally in browser and see what happens. My guess is that it will show same thing as the dialog. Important thing is, this URL points to *selected host* machine (not Engine), i.e. http://<hostAddress>/cgi-bin/ui-vdsm-hooks/ui-vdsm-hooks.cgi?command=<cmd>&args=<args> This means selected host machine should have some web server like Apache installed with necessary CGI scripts in place, i.e. cgi-bin/ui-vdsm-hooks/ui-vdsm-hooks.cgi + cgi-bin/ui-vdsm-hooks/scripts/vdsClientApi.py -> CGI scripts are invoked right on given host machine. Michael, René - can you try ^^ and let us know if you still encounter issues with bad dialog content? What happens when you manually open dialog content URL in browser? Regards, Vojtech ----- Original Message -----
From: "Daniel Erez" <derez@redhat.com> To: "René Koch (ovido)" <r.koch@ovido.at> Cc: users@ovirt.org Sent: Monday, June 10, 2013 8:45:37 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
----- Original Message -----
From: "René Koch (ovido)" <r.koch@ovido.at> To: "Michael Wagenknecht" <Wagenknecht@FuH-E.de> Cc: "Daniel Erez" <derez@redhat.com>, users@ovirt.org Sent: Monday, June 10, 2013 4:32:46 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
Hi Daniel,
First of all thanks for the very useful plugin!
Is this plugin compatible with oVirt 3.2.1 or is a newer version required (didn't update to 3.2.2 yet)? I'm having the same issue as Michale and I think api.showDialog causes this issue, but didn't had enough time to verify yet...
It would probably require newer builds... As the plugin uses a rather recent API (e.g. adding a button 'OnlyFromContext').
Regards, René
On Mon, 2013-06-10 at 15:06 +0200, Michael Wagenknecht wrote:
Yes I have and the ui-vdsm-hooks.cgi is accessable from the web server.
Am 10.06.2013 14:59, schrieb Daniel Erez:
----- Original Message -----
From: "Michael Wagenknecht"<Wagenknecht@FuH-E.de> To: users@ovirt.org Sent: Monday, June 10, 2013 1:15:34 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage. Have you copied the cgi-bin folder into a web server in your host?
Am 09.06.2013 18:40, schrieb Daniel Erez:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Thanks, Daniel _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users -- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ 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

Sorry for not coming back to your earlier. I was on vacation and afterwards totally busy with projects. I'll check it this week and will let you know. Regards, René On Wed, 2013-06-19 at 12:21 -0400, Vojtech Szocs wrote:
Hi Daniel,
this plugin looks very cool!
I'm starting to realize that CGI scripts are quite handy for implementing any sort of server-side logic for UI plugins, especially since we have Apache web server in front of JBoss application server (Engine) in standard oVirt installation.
Looking at the code, this plugin should work fine with oVirt 3.2.1+ since showDialog API changes landed into 3.2.1 release.
Regarding the issue with bad dialog content - you can edit start.html and put following code right before api.showDialog call:
window.alert(url);
This will show actual dialog content URL - you can try opening this URL normally in browser and see what happens. My guess is that it will show same thing as the dialog.
Important thing is, this URL points to *selected host* machine (not Engine), i.e. http://<hostAddress>/cgi-bin/ui-vdsm-hooks/ui-vdsm-hooks.cgi?command=<cmd>&args=<args>
This means selected host machine should have some web server like Apache installed with necessary CGI scripts in place, i.e. cgi-bin/ui-vdsm-hooks/ui-vdsm-hooks.cgi + cgi-bin/ui-vdsm-hooks/scripts/vdsClientApi.py -> CGI scripts are invoked right on given host machine.
Michael, René - can you try ^^ and let us know if you still encounter issues with bad dialog content? What happens when you manually open dialog content URL in browser?
Regards, Vojtech
----- Original Message -----
From: "Daniel Erez" <derez@redhat.com> To: "René Koch (ovido)" <r.koch@ovido.at> Cc: users@ovirt.org Sent: Monday, June 10, 2013 8:45:37 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
----- Original Message -----
From: "René Koch (ovido)" <r.koch@ovido.at> To: "Michael Wagenknecht" <Wagenknecht@FuH-E.de> Cc: "Daniel Erez" <derez@redhat.com>, users@ovirt.org Sent: Monday, June 10, 2013 4:32:46 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
Hi Daniel,
First of all thanks for the very useful plugin!
Is this plugin compatible with oVirt 3.2.1 or is a newer version required (didn't update to 3.2.2 yet)? I'm having the same issue as Michale and I think api.showDialog causes this issue, but didn't had enough time to verify yet...
It would probably require newer builds... As the plugin uses a rather recent API (e.g. adding a button 'OnlyFromContext').
Regards, René
On Mon, 2013-06-10 at 15:06 +0200, Michael Wagenknecht wrote:
Yes I have and the ui-vdsm-hooks.cgi is accessable from the web server.
Am 10.06.2013 14:59, schrieb Daniel Erez:
----- Original Message -----
From: "Michael Wagenknecht"<Wagenknecht@FuH-E.de> To: users@ovirt.org Sent: Monday, June 10, 2013 1:15:34 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage. Have you copied the cgi-bin folder into a web server in your host?
Am 09.06.2013 18:40, schrieb Daniel Erez: > Hi, > > I've created a new UI plugin that allows invocation of VDSM commands > directly from the WebAdmin (using CGI scripts and vdsClient). > > You can read all about it in my blog: http://derezvir.blogspot.co.il/ > > Thanks, > Daniel > _______________________________________________ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users -- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ 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

In this case I'd suggest selinux. If you'll add some code to the vdsClient to log what's going on we'll have more insights on the issue. ----- Original Message -----
From: "Michael Wagenknecht" <Wagenknecht@FuH-E.de> To: "Daniel Erez" <derez@redhat.com> Cc: users@ovirt.org Sent: Monday, June 10, 2013 4:06:48 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
Yes I have and the ui-vdsm-hooks.cgi is accessable from the web server.
Am 10.06.2013 14:59, schrieb Daniel Erez:
----- Original Message -----
From: "Michael Wagenknecht"<Wagenknecht@FuH-E.de> To: users@ovirt.org Sent: Monday, June 10, 2013 1:15:34 PM Subject: Re: [Users] New UI plugin: UI-VDSM-Hooks
I have a problem with the plugin. I installed it like the other ui-plugins I use, but if I choose a function like "GetAllTasks", I only get a new window with the ovirt startpage. Have you copied the cgi-bin folder into a web server in your host?
Am 09.06.2013 18:40, schrieb Daniel Erez:
Hi,
I've created a new UI plugin that allows invocation of VDSM commands directly from the WebAdmin (using CGI scripts and vdsClient).
You can read all about it in my blog: http://derezvir.blogspot.co.il/
Thanks, Daniel _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users -- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Mit freundlichen Grüßen
Michael Wagenknecht FuH Entwicklungsgesellschaft mbH Geschäftsführer Carola Fornoff HRB Freiburg 701203, UID DE255007372 Hauptstr. 4, D-79224 Umkirch Tel +49 7665 93288-0, Fax -150
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (6)
-
Dan Kenigsberg
-
Daniel Erez
-
Doron Fediuck
-
Michael Wagenknecht
-
René Koch (ovido)
-
Vojtech Szocs