[one-users] Get VM info with Ruby OCA API

Paulo A L Rego pauloalr.alu at gmail.com
Mon Jun 20 08:28:51 PDT 2011


Hi Florian,

Works perfectly.

vm['TEMPLATE/CPU']
vm['TEMPLATE/MEMORY']
vm['TEMPLATE/CONTEXT/IP_PUBLIC']

It was in XMLElement page [1].

Thanks a lot!

[1]
http://opennebula.org/doc/2.2/oca/ruby/classes/OpenNebula/XMLElement.html

2011/6/20 <florian.feldhaus at tu-dortmund.de>

> Hi Paulo,
>
> try:
> vmpool=VirtualMachinePool.new(@one_client)
> vmpool.info
> vm['TEMPLATE/MEMORY']
> vm['TEMPLATE/CPU']
>
> There's also some documentation on this somewhere in the OpenNebula API
> pagesŠ
>
> Cheers,
> Florian
>
>
>
> Von:  Paulo A L Rego <pauloalr.alu at gmail.com>
> Datum:  Mon, 20 Jun 2011 11:37:14 -0300
> An:  <users at lists.opennebula.org>
> Betreff:  [one-users] Get VM info with Ruby OCA API
>
>
> Hello,
>
> I'm trying to get informations about ip, memory and cpu from Virtual
> Machine.
> I was using the method VirtualMachine.info, but i saw at documentation
> that it returns nil in case of success.
> The info method is just for error check?
>
> Is there any method that get this informations ou should i use
> xmlrpc/client and implement my own?
>
> Thanks
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.orghttp://
> lists.opennebula.org/listinfo.cgi/users-op
> ennebula.org<http://lists.opennebula.org/listinfo.cgi/users-op%0Aennebula.org>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110620/108ef8ab/attachment-0003.htm>


More information about the Users mailing list