Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path with contained query #3321

Merged
merged 1 commit into from Dec 11, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions lib/fog/openstack/requests/image/list_public_images_detailed.rb
Expand Up @@ -3,16 +3,18 @@ module Image
class OpenStack
class Real
def list_public_images_detailed(attribute=nil, query=nil)
path = 'images/detail'
if attribute
path = "images/detail?#{attribute}=#{URI::encode(query)}"
query = { attribute => URI::encode(query) }
else
path = 'images/detail'
query = {}
end

request(
:expects => [200, 204],
:method => 'GET',
:path => path
:path => path,
:query => query
)
end
end # class Real
Expand All @@ -23,8 +25,8 @@ def list_public_images_detailed(attribute=nil, query=nil)
response.status = [200, 204][rand(1)]
response.body = {'images' => self.data[:images].values}
response
end # def list_tenants
end # def list_public_images_detailed
end # class Mock
end # class OpenStack
end # module Identity
end # module Image
end # module Fog