Re: [Users] Fwd: ovirt cli commands / script wont exit the shell

Hi Alex, This is a bug [1], fix available in 3.2.0.1, latest available cli version is 3.2.0.5. [1] https://bugzilla.redhat.com/show_bug.cgi?id=850597
-------- Original Message -------- Subject: [Users] ovirt cli commands / script wont exit the shell Date: Sat, 06 Oct 2012 20:44:44 +0100 From: Alex Leonhardt <alex.tuxx@gmail.com> To: users@ovirt.org
hi there,
i'm playing with the Ovirt CLI and started to script a few things, but it seems as if the console stays connected when I execute the commands - I even included a "exit" and tried "disconnect", but nothing would do it - any hints / clues ?
the script is very simple :
--- action vm vm2 start exit ---
or
--- action vm vm1 stop disconnect exit ---
I always end up back here :
###
==========================================
connected to oVirt manager 3.1.0.0 <<< ==========================================
[oVirt shell (connected)]# action vm vm2 start
status-state: complete
[oVirt shell (connected)]# exit
[oVirt shell (connected)]#
###
Thanks Alex
-- Michael Pasternak RedHat, ENG-Virtualization R&D

This is a multi-part message in MIME format. --------------040306030604050408010703 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Aha - cool - thanks! :) Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? I'm not a great programmer so rather look for something already existing rather than me fiddling for a comparable looong time ;) Alex On 10/07/2012 11:31 AM, Michael Pasternak wrote:
Hi Alex,
This is a bug [1], fix available in 3.2.0.1, latest available cli version is 3.2.0.5.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=850597
-------- Original Message -------- Subject: [Users] ovirt cli commands / script wont exit the shell Date: Sat, 06 Oct 2012 20:44:44 +0100 From: Alex Leonhardt<alex.tuxx@gmail.com> To: users@ovirt.org
hi there,
i'm playing with the Ovirt CLI and started to script a few things, but it seems as if the console stays connected when I execute the commands - I even included a "exit" and tried "disconnect", but nothing would do it - any hints / clues ?
the script is very simple :
--- action vm vm2 start exit ---
or
--- action vm vm1 stop disconnect exit ---
I always end up back here :
###
==========================================
connected to oVirt manager 3.1.0.0<<< ==========================================
[oVirt shell (connected)]# action vm vm2 start
status-state: complete
[oVirt shell (connected)]# exit
[oVirt shell (connected)]#
###
Thanks Alex
--------------040306030604050408010703 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <font size="-1"><font face="Tahoma">Aha - cool - thanks! :) <br> <br> Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? <br> <br> I'm not a great programmer so rather look for something already existing rather than me fiddling for a comparable looong time ;) <br> <br> Alex<br> <br> </font></font><br> On 10/07/2012 11:31 AM, Michael Pasternak wrote: <blockquote cite="mid:507159EF.7070300@redhat.com" type="cite"> <pre wrap=""> Hi Alex, This is a bug [1], fix available in 3.2.0.1, latest available cli version is 3.2.0.5. [1] <a class="moz-txt-link-freetext" href="https://bugzilla.redhat.com/show_bug.cgi?id=850597">https://bugzilla.redhat.com/show_bug.cgi?id=850597</a> </pre> <blockquote type="cite"> <pre wrap="">-------- Original Message -------- Subject: [Users] ovirt cli commands / script wont exit the shell Date: Sat, 06 Oct 2012 20:44:44 +0100 From: Alex Leonhardt <a class="moz-txt-link-rfc2396E" href="mailto:alex.tuxx@gmail.com"><alex.tuxx@gmail.com></a> To: <a class="moz-txt-link-abbreviated" href="mailto:users@ovirt.org">users@ovirt.org</a> hi there, i'm playing with the Ovirt CLI and started to script a few things, but it seems as if the console stays connected when I execute the commands - I even included a "exit" and tried "disconnect", but nothing would do it - any hints / clues ? the script is very simple : --- action vm vm2 start exit --- or --- action vm vm1 stop disconnect exit --- I always end up back here : ### ========================================== >>> connected to oVirt manager 3.1.0.0 <<< ========================================== [oVirt shell (connected)]# action vm vm2 start status-state: complete [oVirt shell (connected)]# exit [oVirt shell (connected)]# ### Thanks Alex </pre> </blockquote> <pre wrap=""> </pre> </blockquote> </body> </html> --------------040306030604050408010703--

This is a multi-part message in MIME format. --------------080807000308050902020401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/08/2012 11:17 PM, Alex Leonhardt wrote:
Aha - cool - thanks! :)
Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ?
If you are already planning on Python, why not use the SDK instead of doing REST? some examples @ http://wiki.ovirt.org/wiki/Testing/PythonApi Y.
I'm not a great programmer so rather look for something already existing rather than me fiddling for a comparable looong time ;)
Alex
On 10/07/2012 11:31 AM, Michael Pasternak wrote:
Hi Alex,
This is a bug [1], fix available in 3.2.0.1, latest available cli version is 3.2.0.5.
[1]https://bugzilla.redhat.com/show_bug.cgi?id=850597
-------- Original Message -------- Subject: [Users] ovirt cli commands / script wont exit the shell Date: Sat, 06 Oct 2012 20:44:44 +0100 From: Alex Leonhardt<alex.tuxx@gmail.com> To:users@ovirt.org
hi there,
i'm playing with the Ovirt CLI and started to script a few things, but it seems as if the console stays connected when I execute the commands - I even included a "exit" and tried "disconnect", but nothing would do it - any hints / clues ?
the script is very simple :
--- action vm vm2 start exit ---
or
--- action vm vm1 stop disconnect exit ---
I always end up back here :
###
==========================================
connected to oVirt manager 3.1.0.0 <<< ==========================================
[oVirt shell (connected)]# action vm vm2 start
status-state: complete
[oVirt shell (connected)]# exit
[oVirt shell (connected)]#
###
Thanks Alex
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--------------080807000308050902020401 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div class="moz-cite-prefix">On 10/08/2012 11:17 PM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:507342D6.7040708@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <font size="-1"><font face="Tahoma">Aha - cool - thanks! :) <br> <br> Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? <br> </font></font></blockquote> <br> If you are already planning on Python, why not use the SDK instead of doing REST?<br> some examples @ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <a href="http://wiki.ovirt.org/wiki/Testing/PythonApi">http://wiki.ovirt.org/wiki/Testing/PythonApi</a><br> Y.<br> <br> <blockquote cite="mid:507342D6.7040708@gmail.com" type="cite"><font size="-1"><font face="Tahoma"> <br> I'm not a great programmer so rather look for something already existing rather than me fiddling for a comparable looong time ;) <br> <br> Alex<br> <br> </font></font><br> On 10/07/2012 11:31 AM, Michael Pasternak wrote: <blockquote cite="mid:507159EF.7070300@redhat.com" type="cite"> <pre wrap="">Hi Alex, This is a bug [1], fix available in 3.2.0.1, latest available cli version is 3.2.0.5. [1] <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://bugzilla.redhat.com/show_bug.cgi?id=850597">https://bugzilla.redhat.com/show_bug.cgi?id=850597</a> </pre> <blockquote type="cite"> <pre wrap="">-------- Original Message -------- Subject: [Users] ovirt cli commands / script wont exit the shell Date: Sat, 06 Oct 2012 20:44:44 +0100 From: Alex Leonhardt <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:alex.tuxx@gmail.com"><alex.tuxx@gmail.com></a> To: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users@ovirt.org">users@ovirt.org</a> hi there, i'm playing with the Ovirt CLI and started to script a few things, but it seems as if the console stays connected when I execute the commands - I even included a "exit" and tried "disconnect", but nothing would do it - any hints / clues ? the script is very simple : --- action vm vm2 start exit --- or --- action vm vm1 stop disconnect exit --- I always end up back here : ### ========================================== >>> connected to oVirt manager 3.1.0.0 <<< ========================================== [oVirt shell (connected)]# action vm vm2 start status-state: complete [oVirt shell (connected)]# exit [oVirt shell (connected)]# ### Thanks Alex </pre> </blockquote> <pre wrap=""> </pre> </blockquote> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Users@ovirt.org">Users@ovirt.org</a> <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a> </pre> </blockquote> <br> </body> </html> --------------080807000308050902020401--

This is a multi-part message in MIME format. --------------090107060504000804020201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/08/2012 10:26 PM, Yaniv Kaul wrote:
On 10/08/2012 11:17 PM, Alex Leonhardt wrote:
Aha - cool - thanks! :)
Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ?
If you are already planning on Python, why not use the SDK instead of doing REST? some examples @ http://wiki.ovirt.org/wiki/Testing/PythonApi Y.
Hi Yaniv, thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this .. Thanks! Alex --------------090107060504000804020201 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <br> <br> On 10/08/2012 10:26 PM, Yaniv Kaul wrote: <blockquote cite="mid:507344FD.4030106@redhat.com" type="cite"> <div class="moz-cite-prefix">On 10/08/2012 11:17 PM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:507342D6.7040708@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <font size="-1"><font face="Tahoma">Aha - cool - thanks! :) <br> <br> Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? <br> </font></font></blockquote> <br> If you are already planning on Python, why not use the SDK instead of doing REST?<br> some examples @ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <a moz-do-not-send="true" href="http://wiki.ovirt.org/wiki/Testing/PythonApi">http://wiki.ovirt.org/wiki/Testing/PythonApi</a><br> Y.<br> <br> </blockquote> Hi Yaniv,<br> <br> thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this .. <br> <br> Thanks!<br> Alex<br> <br> </body> </html> --------------090107060504000804020201--

This is a multi-part message in MIME format. --------------010104010404010605080800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/09/2012 12:15 AM, Alex Leonhardt wrote:
On 10/08/2012 10:26 PM, Yaniv Kaul wrote:
On 10/08/2012 11:17 PM, Alex Leonhardt wrote:
Aha - cool - thanks! :)
Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ?
If you are already planning on Python, why not use the SDK instead of doing REST? some examples @ http://wiki.ovirt.org/wiki/Testing/PythonApi Y.
Hi Yaniv,
thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this ..
Thanks! Alex
It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it. Y. --------------010104010404010605080800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div class="moz-cite-prefix">On 10/09/2012 12:15 AM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:50735095.7080107@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <br> <br> On 10/08/2012 10:26 PM, Yaniv Kaul wrote: <blockquote cite="mid:507344FD.4030106@redhat.com" type="cite"> <div class="moz-cite-prefix">On 10/08/2012 11:17 PM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:507342D6.7040708@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <font size="-1"><font face="Tahoma">Aha - cool - thanks! :) <br> <br> Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? <br> </font></font></blockquote> <br> If you are already planning on Python, why not use the SDK instead of doing REST?<br> some examples @ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <a moz-do-not-send="true" href="http://wiki.ovirt.org/wiki/Testing/PythonApi">http://wiki.ovirt.org/wiki/Testing/PythonApi</a><br> Y.<br> <br> </blockquote> Hi Yaniv,<br> <br> thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this .. <br> <br> Thanks!<br> Alex<br> <br> </blockquote> <br> It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it.<br> Y.<br> </body> </html> --------------010104010404010605080800--

This is a multi-part message in MIME format. --------------040403020809050104010502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/09/2012 07:21 AM, Yaniv Kaul wrote:
On 10/09/2012 12:15 AM, Alex Leonhardt wrote:
On 10/08/2012 10:26 PM, Yaniv Kaul wrote:
On 10/08/2012 11:17 PM, Alex Leonhardt wrote:
Aha - cool - thanks! :)
Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ?
If you are already planning on Python, why not use the SDK instead of doing REST? some examples @ http://wiki.ovirt.org/wiki/Testing/PythonApi Y.
Hi Yaniv,
thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this ..
Thanks! Alex
It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it. Y.
Awesome - thanks! :) Alex --------------040403020809050104010502 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <br> <br> On 10/09/2012 07:21 AM, Yaniv Kaul wrote: <blockquote cite="mid:5073C253.7090509@redhat.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <div class="moz-cite-prefix">On 10/09/2012 12:15 AM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:50735095.7080107@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <br> <br> On 10/08/2012 10:26 PM, Yaniv Kaul wrote: <blockquote cite="mid:507344FD.4030106@redhat.com" type="cite"> <div class="moz-cite-prefix">On 10/08/2012 11:17 PM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:507342D6.7040708@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <font size="-1"><font face="Tahoma">Aha - cool - thanks! :) <br> <br> Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? <br> </font></font></blockquote> <br> If you are already planning on Python, why not use the SDK instead of doing REST?<br> some examples @ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <a moz-do-not-send="true" href="http://wiki.ovirt.org/wiki/Testing/PythonApi">http://wiki.ovirt.org/wiki/Testing/PythonApi</a><br> Y.<br> <br> </blockquote> Hi Yaniv,<br> <br> thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this .. <br> <br> Thanks!<br> Alex<br> <br> </blockquote> <br> It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it.<br> Y.<br> </blockquote> <br> Awesome - thanks! :) <br> <br> Alex<br> <br> </body> </html> --------------040403020809050104010502--

This is a multi-part message in MIME format. --------------020705000604090800070506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/09/2012 08:19 PM, Alex Leonhardt wrote:
On 10/09/2012 07:21 AM, Yaniv Kaul wrote:
On 10/09/2012 12:15 AM, Alex Leonhardt wrote:
On 10/08/2012 10:26 PM, Yaniv Kaul wrote:
On 10/08/2012 11:17 PM, Alex Leonhardt wrote:
Aha - cool - thanks! :)
Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ?
If you are already planning on Python, why not use the SDK instead of doing REST? some examples @ http://wiki.ovirt.org/wiki/Testing/PythonApi Y.
Hi Yaniv,
thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this ..
Thanks! Alex
It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it. Y.
Awesome - thanks! :)
Alex
Hi Yaniv, Is there a document / wiki article that has examples to get those metrics for e.g. ram usage, cpu usage, etc. ? Thanks! Alex --------------020705000604090800070506 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <br> On 10/09/2012 08:19 PM, Alex Leonhardt wrote: <blockquote cite="mid:507478D7.5010804@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <br> <br> On 10/09/2012 07:21 AM, Yaniv Kaul wrote: <blockquote cite="mid:5073C253.7090509@redhat.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <div class="moz-cite-prefix">On 10/09/2012 12:15 AM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:50735095.7080107@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <br> <br> On 10/08/2012 10:26 PM, Yaniv Kaul wrote: <blockquote cite="mid:507344FD.4030106@redhat.com" type="cite"> <div class="moz-cite-prefix">On 10/08/2012 11:17 PM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:507342D6.7040708@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <font size="-1"><font face="Tahoma">Aha - cool - thanks! :) <br> <br> Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? <br> </font></font></blockquote> <br> If you are already planning on Python, why not use the SDK instead of doing REST?<br> some examples @ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <a moz-do-not-send="true" href="http://wiki.ovirt.org/wiki/Testing/PythonApi">http://wiki.ovirt.org/wiki/Testing/PythonApi</a><br> Y.<br> <br> </blockquote> Hi Yaniv,<br> <br> thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this .. <br> <br> Thanks!<br> Alex<br> <br> </blockquote> <br> It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it.<br> Y.<br> </blockquote> <br> Awesome - thanks! :) <br> <br> Alex<br> <br> </blockquote> <br> <font size="-1"><font face="Tahoma">Hi Yaniv,<br> <br> Is there a document / wiki article that has examples to get those metrics for e.g. ram usage, cpu usage, etc. ? <br> <br> Thanks!<br> Alex<br> <br> <br> </font></font> </body> </html> --------------020705000604090800070506--

This is a multi-part message in MIME format. --------------020407030400010905000200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/09/2012 11:48 PM, Alex Leonhardt wrote:
On 10/09/2012 08:19 PM, Alex Leonhardt wrote:
On 10/09/2012 07:21 AM, Yaniv Kaul wrote:
On 10/09/2012 12:15 AM, Alex Leonhardt wrote:
On 10/08/2012 10:26 PM, Yaniv Kaul wrote:
On 10/08/2012 11:17 PM, Alex Leonhardt wrote:
Aha - cool - thanks! :)
Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ?
If you are already planning on Python, why not use the SDK instead of doing REST? some examples @ http://wiki.ovirt.org/wiki/Testing/PythonApi Y.
Hi Yaniv,
thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this ..
Thanks! Alex
It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it. Y.
Awesome - thanks! :)
Alex
Hi Yaniv,
Is there a document / wiki article that has examples to get those metrics for e.g. ram usage, cpu usage, etc. ?
Take a look at the restapi structure of api/vms/{vm-id}/statistics for pointers, but basically here is a simple example: for stat in api.vms.get('my_vm').statistics.list(): print 'Name:', stat.name print 'Description:',stat.description for value in stat.values.value: print ' Value:', value.datum
Thanks! Alex
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Thanks, Rami Vaknin, QE @ Red Hat, TLV, IL. --------------020407030400010905000200 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> On 10/09/2012 11:48 PM, Alex Leonhardt wrote: <blockquote cite="mid:50749BC2.7010307@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <br> On 10/09/2012 08:19 PM, Alex Leonhardt wrote: <blockquote cite="mid:507478D7.5010804@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <br> <br> On 10/09/2012 07:21 AM, Yaniv Kaul wrote: <blockquote cite="mid:5073C253.7090509@redhat.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <div class="moz-cite-prefix">On 10/09/2012 12:15 AM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:50735095.7080107@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <br> <br> On 10/08/2012 10:26 PM, Yaniv Kaul wrote: <blockquote cite="mid:507344FD.4030106@redhat.com" type="cite"> <div class="moz-cite-prefix">On 10/08/2012 11:17 PM, Alex Leonhardt wrote:<br> </div> <blockquote cite="mid:507342D6.7040708@gmail.com" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <font size="-1"><font face="Tahoma">Aha - cool - thanks! :) <br> <br> Now, I was also looking at the REST API - is there a simple shell based way to read / query the resulting XML ? Or would you suggest to write python scripts to e.g. start/stop instance, get a list of VMs / their IDs, etc. ? <br> </font></font></blockquote> <br> If you are already planning on Python, why not use the SDK instead of doing REST?<br> some examples @ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <a moz-do-not-send="true" href="http://wiki.ovirt.org/wiki/Testing/PythonApi">http://wiki.ovirt.org/wiki/Testing/PythonApi</a><br> Y.<br> <br> </blockquote> Hi Yaniv,<br> <br> thanks - had a quick look - is the PyAPI able to get the current usage of the VMs (e.g. Memory/CPU/etc. usage) - it's the main reason (for monitoring & trending) that I need this .. <br> <br> Thanks!<br> Alex<br> <br> </blockquote> <br> It does. The SDK is auto-generated from the REST interface so you can get the statistics sub-collection and use it.<br> Y.<br> </blockquote> <br> Awesome - thanks! :) <br> <br> Alex<br> <br> </blockquote> <br> <font size="-1"><font face="Tahoma">Hi Yaniv,<br> <br> Is there a document / wiki article that has examples to get those metrics for e.g. ram usage, cpu usage, etc. ? <br> </font></font></blockquote> <br> Take a look at the restapi structure of api/vms/{vm-id}/statistics for pointers, but basically here is a simple example:<br> <br> for stat in api.vms.get('my_vm').statistics.list():<br> print 'Name:', stat.name<br> print 'Description:',stat.description<br> for value in stat.values.value:<br> print ' Value:', value.datum<br> <blockquote cite="mid:50749BC2.7010307@gmail.com" type="cite"><font size="-1"><font face="Tahoma"> <br> Thanks!<br> Alex<br> <br> <br> </font></font> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Users@ovirt.org">Users@ovirt.org</a> <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a> </pre> </blockquote> <br> <br> <pre class="moz-signature" cols="72">-- Thanks, Rami Vaknin, QE @ Red Hat, TLV, IL. </pre> </body> </html> --------------020407030400010905000200--
participants (4)
-
Alex Leonhardt
-
Michael Pasternak
-
Rami Vaknin
-
Yaniv Kaul