fog/fog — Issue #617: Exception listing nodes using the libvirt provider
Author: rubiojr
Created: 2011-11-18 15:27:21+00:00
State: open

c = Fog::Compute.new( { :provider => 'Libvirt', :libvirt_uri => 'xen+ssh://foobarstuff' } )
compute.nodes.all

/home/rubiojr/.rvm/gems/ruby-1.9.3-p0/gems/fog-1.1.1/lib/fog/libvirt/compute.rb:98:in `method_missing': undefined method `connection' for # (NoMethodError)
from /home/rubiojr/.rvm/gems/ruby-1.9.3-p0/gems/fog-1.1.1/lib/fog/libvirt/models/compute/nodes.rb:29:in `all'
from test.rb:25:in `

'

This little patch fixes the issue for me:

--- libvirt/models/compute/nodes.rb.orig	2011-11-18 16:22:07.206508066 +0100
+++ libvirt/models/compute/nodes.rb	2011-11-18 16:23:33.148579634 +0100
@@ -26,7 +26,7 @@
node_info[param]=nil
end
end
- node_info[:uri]=connection.connection.uri
+ node_info[:uri]=connection.uri
data << { :raw => node_info }
require 'pp'
pp node_info