Skip to content

Instantly share code, notes, and snippets.

@surminus
Created September 17, 2015 12:56
Show Gist options
  • Save surminus/90d7212bfdfcbb3440bf to your computer and use it in GitHub Desktop.
Save surminus/90d7212bfdfcbb3440bf to your computer and use it in GitHub Desktop.
Foglem
From: /Users/paulmartin/.bundle/ruby/2.0.0/gems/fog-1.33.0/lib/fog/vcloud_director/requests/compute/get_execute_query.rb @ line 84 Fog::Compute::VcloudDirector::Real#get_execute_query:
79: else
80: query = {
81: :type => type,
82: }
83: if query[:type] == 'task'
=> 84: require 'pry'; binding.pry
85: end
86:
87: query[:sortAsc] = options[:sortAsc] if options[:sortAsc]
88: query[:sortDesc] = options[:sortDesc] if options[:sortDesc]
89: query[:page] = options[:page] if options[:page]
[1] pry(#<Fog::Compute::VcloudDirector::Real>)> options
=> {:filter=>"name==networkConfigureEdgeGatewayServices;objectName==vCloud CI (nft00052i2);startDate=ge=2015-09-17T13:52:39.827+01:00", :sortDesc=>"startDate"}
[2] pry(#<Fog::Compute::VcloudDirector::Real>)> query[:filter] = options[:filter].gsub('+', '%2B').gsub(':', '%3A') if options[:filter]
=> "name==networkConfigureEdgeGatewayServices;objectName==vCloud CI (nft00052i2);startDate=ge=2015-09-17T13%3A52%3A39.827%2B01%3A00"
[3] pry(#<Fog::Compute::VcloudDirector::Real>)> query[:sortDesc] = options[:sortDesc] if options[:sortDesc]
=> "startDate"
[4] pry(#<Fog::Compute::VcloudDirector::Real>)> response = request(
[4] pry(#<Fog::Compute::VcloudDirector::Real>)* :expects => 200,
[4] pry(#<Fog::Compute::VcloudDirector::Real>)* :idempotent => true,
[4] pry(#<Fog::Compute::VcloudDirector::Real>)* :method => 'GET',
[4] pry(#<Fog::Compute::VcloudDirector::Real>)* :parser => Fog::ToHashDocument.new,
[4] pry(#<Fog::Compute::VcloudDirector::Real>)* :path => 'query',
[4] pry(#<Fog::Compute::VcloudDirector::Real>)* :query => query.map {|q,v| URI.escape("#{q}=#{v}")}.join('&')
[4] pry(#<Fog::Compute::VcloudDirector::Real>)* )
Fog::Compute::VcloudDirector::BadRequest: Bad request: Cannot parse '2015-09-17T13%3A52%3A39.827%2B01%3A00' as date.
from /Users/paulmartin/.bundle/ruby/2.0.0/gems/excon-0.45.4/lib/excon/middlewares/expects.rb:6:in `response_call'
[5] pry(#<Fog::Compute::VcloudDirector::Real>)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment