Usage of fog for vcloud?

119 views
Skip to first unread message

Kal

unread,
Apr 27, 2012, 12:23:31 PM4/27/12
to ruby-fog
Hi,

I'm attempting to use the vcloud api provider. I can successfully get
a connection, and 'get' queries seem to work but 'all' either return
nil arrays or break in interesting ways.

connection=Fog::Vcloud::Computer.new({:provider => 'vcloud',
#<user,pass,host,vcloud_default_vdc,snipped>
}) #authentication is successful, returns 200.

connection.organizations.all <- this results in the following error:

/usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/compute/
organizations.rb:19: warning: multiple values for a block parameter (2
for 1)
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19
/usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/compute/
organizations.rb:19:in `[]': Symbol as array index (TypeError)
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19:in `all'
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19:in `select'
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19:in `all'
connection.catalogs.get('<some known catalog URL'>) <-this returns the
correct data and links

Other collection types return errors like this on the 'all' method:

/usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/compute/
organizations.rb:19: warning: multiple values for a block parameter (2
for 1)
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19
/usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/compute/
organizations.rb:19:in `[]': Symbol as array index (TypeError)
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19:in `all'
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19:in `select'
from /usr/lib/ruby/gems/1.8/gems/fog-1.3.1/lib/fog/vcloud/models/
compute/organizations.rb:19:in `all'

If I'm just doing something wrong, I'll add this to the usage doc I'm
creating and contribute a simple walkthrough for a vcloud provider,
but I honestly don't know whats happening inside fog well enough yet
to troubleshoot this.

Thanks,
--
Kal

geemus (Wesley Beary)

unread,
Apr 27, 2012, 1:03:23 PM4/27/12
to ruby...@googlegroups.com
What provider are you working against? I suspect/fear some of the
stuff in there may be somewhat terremark specific as that is what a
lot of it was at least initially implemented against. Unfortunately,
I don't think its been particularly well maintained (hasn't seemed to
had that much usage even). If you are interested in using it I'd be
happy to fill in the blanks on the fog side to help you fix up
anything like this that might be broken though. Just let me know what
you have in mind.
Thanks!
wes
Reply all
Reply to author
Forward
0 new messages