Fog::Vcloud::Collection fails to determine default_organization_uri

69 views
Skip to first unread message

Aaron

unread,
May 18, 2012, 11:46:44 AM5/18/12
to ruby...@googlegroups.com
Using Fog against vCloud (VMWare) can connect, but then requesting a collection using all fails.

require 'fog'
 
Excon.defaults[:ssl_verify_peer] = false

options = {
  :vcloud_username => "localuser@Org",
  :vcloud_password => "pwd",
  :vcloud_host     => "mydomain.com"
}

vcloud = Fog::Vcloud::Compute.new options
vapps = vcloud.vapps.all
NoMethodError: undefined method `scheme' for nil:NilClass
        from ~/.rvm/gems/ruby-1.9.3-p194/gems/fog-1.3.1/lib/fog/vcloud/compute.rb:312:in `do_request'
        from ~/.rvm/gems/ruby-1.9.3-p194/gems/fog-1.3.1/lib/fog/vcloud/compute.rb:260:in `request'
        from ~/.rvm/gems/ruby-1.9.3-p194/gems/fog-1.3.1/lib/fog/vcloud/compute.rb:368:in `get_vdc'
        from ~/.rvm/gems/ruby-1.9.3-p194/gems/fog-1.3.1/lib/fog/vcloud/models/compute/vapps.rb:16:in `all'
        from (irb):12
        from ~/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'

After some debugging it seems that the default_organization_uri is not getting set, and it's nil reference fails when passed in. I've tried this on both 1.9.3 (as shown above) but also ree-1.8.7; both exhibit the same behavior. It seems that where the check for the org is uses [:Org] when what is passed back is [:org]. Even changing this doesn't seem to help. There are several URIs that seem to be available in the body hash under a :Link key, and :org is just a String of the org name.

Any help on the Fog internals would be great.

geemus (Wesley Beary)

unread,
May 22, 2012, 12:38:41 PM5/22/12
to ruby...@googlegroups.com
Do you have more than one organization? I think it will only set the
default if there is only a single organization to choose from.
Otherwise I think you need to specify which organization you'll be
using.
wes
Reply all
Reply to author
Forward
0 new messages