There are a couple of errors in the example. The line where it breaks
should read:

vn = OpenNebula::VirtualNetwork.new(xml, client)

Notice the chenge from @client to client. Here is the updated code:

https://gist.github.com/jfontan/4ac67793345bcc6d6203

On Wed, Oct 22, 2014 at 12:01 PM, Manuel Alfonso López Rourich
<[email protected]> wrote:
> Good morning,
>
> I'm trying to implement a Ruby script which creates an OpenNebula user and
> move it to a group, by using the Ruby ONE Cloud API.
>
> I've tested the "Code Sample: Create a new VirtualNetwork" here but I get
> the following error:
>
> /usr/lib/one/ruby/opennebula/pool_element.rb:93:in `allocate': undefined
> method `call' for nil:NilClass (NoMethodError)
>         from /usr/lib/one/ruby/opennebula/virtual_network.rb:89:in
> `allocate'
>         from prueba_ONE.rb:48:in `<main>'
>
> The problem is that is the same error that I get when I create an user with
> the method allocate().
>
> Any ideas?
>
> Thank you very much
>
> Best regards
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Javier Fontán Muiños
Developer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | @OpenNebula | github.com/jfontan
_______________________________________________
Users mailing list
[email protected]
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to