Hello,<br><br>I wrote a perl script to extract the information that I need from XML-RPC: <a href="http://opennebula.org/documentation:rel3.8:api#onevmpoolinfo" target="_blank">http://opennebula.org/documentation:rel3.8:api#onevmpoolinfo</a><br>


<br>The sniped code:<br><br>my @vmpoolany = &getVMPoolInfo(-1,-1,-1,-1); # Información de maquinas en estado Any state, except DONE<br>my @ips = &getVMPoolFilterInfo(@vmpoolany ,"IP"); # Devuelve la información extraída del XML de getVMPoolInfo, en nuestro caso las IPs<br>


<br><br>sub getVMPoolInfo {<br>    my $flag;<br>    my $start;<br>    my $end;<br>    my $filter;<br>    ($flag,$start,$end,$filter) = @_;<br><br>    my @response = $server->call('<a href="http://one.vmpool.info" target="_blank">one.vmpool.info</a>', $one_auth, $flag,$start,$end,$filter);<br>


    <br>    return @response;<br>}<br><br><br>sub getVMPoolFilterInfo {<br>    my @vmpoolinfo;<br>    my $filter;<br>    my $vmpoolinfoparam;<br>    <br>    ($vmpoolinfoparam,$filter) = @_;<br>    <br>    @vmpoolinfo =  @{$vmpoolinfoparam};<br>


    <br>    <br>    if($vmpoolinfo[2] != 0){<br>            $errorcode = $vmpoolinfo[2];<br>    }<br>    $XML = $vmpoolinfo[1];<br><br>    # Limpiamos XML recibido<br>    $XML =~ s/\"/\'/g;<br>    $XML =~ s/<!\[CDATA\[//g;<br>


    $XML =~ s/\]\]>//g;<br><br>    # <a href="http://oreilly.com/perl/excerpts/system-admin-with-perl/ten-minute-xpath-utorial.html" target="_blank">http://oreilly.com/perl/excerpts/system-admin-with-perl/ten-minute-xpath-utorial.html</a><br>


    my $xp = XML::XPath->new($XML);<br><br>    my $nodeset = $xp->find("//$filter/text()");<br>    my @infofilter;<br><br>    foreach my $node ($nodeset->get_nodelist) {<br>        push(@infofilter, XML::XPath::XMLParser::as_string($node));<br>


    }<br><br>    return @infofilter;<br><br>}<br><br><br>Regards<br>Miguel<br><div class="gmail_extra"><br><br><div class="gmail_quote">2012/12/17 Jaime Melis <span dir="ltr"><<a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>probably by doing 'onevm list -x' and grepping. Or writing a small ruby script using OpenNebula's OCA (about 10 lines) [1].</div>


<div><br></div><div>[1] <a href="http://opennebula.org/documentation:rel3.8:ruby" target="_blank">http://opennebula.org/documentation:rel3.8:ruby</a></div>

<div><br></div><div>cheers,<br>Jaime</div><div><br></div>-- <br>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a><br>






<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Mon, Dec 17, 2012 at 12:40 PM, Juan Ángel Ferreiro <span dir="ltr"><<a href="mailto:juanferrla@gmail.com" target="_blank">juanferrla@gmail.com</a>></span> wrote:<br>




</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><p style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hi everyone! <br>
</p><p style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">


I would like to know which is the easiest way to extract all ip of the virtual machines deployed in the opennebula frontend.</p><p style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Best regards,</p><span><font color="#888888"><p style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="background-color:transparent">-- </span></p>Juan Ángel Ferreiro Lage<br>


</font></span><br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a><br>





</font></span></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br></div>