fog/fog — Issue #616: libvirt provider missing libvirt_username and libvirt_password as "recognized" parameters?
Author: rubiojr
Created: 2011-11-18 14:54:02+00:00
State: open

Hiya!

I'm trying to connect to an ESX 4 (using the libvirt fog provider) that needs user/pass but it raises an exception if the little patch below is not applied:

/home/rubiojr/.rvm/gems/ruby-1.9.3-p0/gems/fog-1.1.1/lib/fog/core/service.rb:193:in `validate_options': Unrecognized arguments: libvirt_username, libvirt_password (ArgumentError)
from /home/rubiojr/.rvm/gems/ruby-1.9.3-p0/gems/fog-1.1.1/lib/fog/core/service.rb:58:in `new'
from /home/rubiojr/.rvm/gems/ruby-1.9.3-p0/gems/fog-1.1.1/lib/fog/compute.rb:31:in `new'
from fog_libvirt_esx_info.rb:37:in `

'

Not sure if it's the right thing to do so I'm not submitting a pull request.

--- libvirt/compute.rb.orig	2011-11-18 15:45:44.157356945 +0100
+++ libvirt/compute.rb	2011-11-18 15:45:59.619547859 +0100
@@ -8,6 +8,7 @@
class Libvirt < Fog::Service

requires :libvirt_uri
+ recognizes :libvirt_username, :libvirt_password

model_path 'fog/libvirt/models/compute'
model :server