On 04/08/10 17:40 -0400, Michael Brown wrote:
Hi,
Thanks for catching that. I don't have OpenNebula setup, but after brief
look into driver, I think this could fix your problem:
lib/deltacloud/drivers/opennebula/opennebula_driver.rb:188:
[snip]
computehash['NETWORK'].each do |n|
networks << n['NIC'].attributes['ip']
end unless computehash['NETWORK'].nil?
[/snip]
-- Michal
I'm having trouble getting Deltacloud's OpenNebula driver to
work. When I
try to list instances, I get a traceback from deltacloudd which I've pasted
at the bottom of this email. It could be a problem in the xml that
OpenNebula is returning, but I'm not familiar with the OCCI, or Ruby's XML
parsing.
Here is the OCCI XML for the instance that is causing trouble:
<COMPUTE>
<ID>33</ID>
<NAME>fc11-32bit</NAME>
<STATE>ACTIVE</STATE>
<STORAGE>
<DISK type="disk" href="http://localhost:4567/storage/4"
dev="sdb"/>
<DISK type="fs" size="512" format="ext3"
dev="sdc"/>
<DISK type="swap" size="1024" dev="sda"/>
</STORAGE>
<NETWORK>
<NIC href="http://localhost:4567/network/8"
ip="152.14.38.101"/>
</NETWORK>
<INSTANCE_TYPE>small</INSTANCE_TYPE>
</COMPUTE>
Thanks for any help,
--Michael Brown
########## deltacloudd traceback:
NoMethodError - undefined method `attributes' for "\n ":REXML::Text:
lib/deltacloud/drivers/opennebula/opennebula_driver.rb:189:in
`convert_instance'
/usr/lib/ruby/1.8/rexml/parent.rb:40:in `each'
/usr/lib/ruby/1.8/rexml/parent.rb:40:in `each'
lib/deltacloud/drivers/opennebula/opennebula_driver.rb:188:in
`convert_instance'
lib/deltacloud/drivers/opennebula/opennebula_driver.rb:118:in `instances'
/usr/lib/ruby/1.8/rexml/element.rb:892:in `each'
/usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each'
/usr/lib/ruby/1.8/rexml/element.rb:892:in `each'
lib/deltacloud/drivers/opennebula/opennebula_driver.rb:113:in `instances'
lib/deltacloud/base_driver/base_driver.rb:139:in `instance'
lib/deltacloud/helpers/application_helper.rb:74:in `send'
lib/deltacloud/helpers/application_helper.rb:74:in `show'
server.rb:180
/usr/lib/ruby/1.8/sinatra/base.rb:847:in `call'
/usr/lib/ruby/1.8/sinatra/base.rb:847:in `route'
/usr/lib/ruby/1.8/sinatra/base.rb:502:in `instance_eval'
/usr/lib/ruby/1.8/sinatra/base.rb:502:in `route_eval'
/usr/lib/ruby/1.8/sinatra/base.rb:481:in `route!'
/usr/lib/ruby/1.8/sinatra/base.rb:478:in `catch'
/usr/lib/ruby/1.8/sinatra/base.rb:478:in `route!'
/usr/lib/ruby/1.8/sinatra/base.rb:457:in `each'
/usr/lib/ruby/1.8/sinatra/base.rb:457:in `route!'
/usr/lib/ruby/1.8/sinatra/base.rb:582:in `dispatch!'
/usr/lib/ruby/1.8/sinatra/base.rb:392:in `call!'
/usr/lib/ruby/1.8/sinatra/base.rb:547:in `instance_eval'
/usr/lib/ruby/1.8/sinatra/base.rb:547:in `invoke'
/usr/lib/ruby/1.8/sinatra/base.rb:547:in `catch'
/usr/lib/ruby/1.8/sinatra/base.rb:547:in `invoke'
/usr/lib/ruby/1.8/sinatra/base.rb:392:in `call!'
/usr/lib/ruby/1.8/sinatra/base.rb:380:in `call'
/usr/lib/ruby/1.8/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/1.8/rack/commonlogger.rb:18:in `call'
/usr/lib/ruby/1.8/sinatra/base.rb:963:in `call'
/usr/lib/ruby/1.8/sinatra/base.rb:989:in `synchronize'
/usr/lib/ruby/1.8/sinatra/base.rb:963:in `call'
/usr/lib/ruby/1.8/thin/stats.rb:24:in `call'
/usr/lib/ruby/1.8/thin/stats.rb:33:in `log'
/usr/lib/ruby/1.8/thin/stats.rb:24:in `call'
/usr/lib/ruby/1.8/thin/connection.rb:76:in `pre_process'
/usr/lib/ruby/1.8/thin/connection.rb:74:in `catch'
/usr/lib/ruby/1.8/thin/connection.rb:74:in `pre_process'
/usr/lib/ruby/1.8/eventmachine.rb:1064:in `call'
/usr/lib/ruby/1.8/eventmachine.rb:1064:in `spawn_threadpool'
/usr/lib/ruby/1.8/eventmachine.rb:1061:in `initialize'
/usr/lib/ruby/1.8/eventmachine.rb:1061:in `new'
/usr/lib/ruby/1.8/eventmachine.rb:1061:in `spawn_threadpool'
/usr/lib/ruby/1.8/eventmachine.rb:1053:in `defer'
/usr/lib/ruby/1.8/thin/connection.rb:54:in `process'
/usr/lib/ruby/1.8/thin/connection.rb:42:in `receive_data'
/usr/lib/ruby/1.8/eventmachine.rb:240:in `run_machine'
/usr/lib/ruby/1.8/eventmachine.rb:240:in `run'
/usr/lib/ruby/1.8/thin/backends/base.rb:57:in `start'
/usr/lib/ruby/1.8/thin/server.rb:156:in `start'
/usr/lib/ruby/1.8/thin/controllers/controller.rb:80:in `start'
/usr/lib/ruby/1.8/thin/runner.rb:174:in `send'
/usr/lib/ruby/1.8/thin/runner.rb:174:in `run_command'
/usr/lib/ruby/1.8/thin/runner.rb:140:in `run!'
/usr/bin/thin:6
_______________________________________________
deltacloud-users mailing list
deltacloud-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/deltacloud-users
--
--------------------------------------------------------
Michal Fojtik, mfojtik(a)redhat.com, +420 532 294 4307
Ruby / Ruby On Rails Developer
Deltacloud API:
http://deltacloud.org
--------------------------------------------------------