1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/fogdocker/requests/compute/image_search.rb
2015-02-16 19:33:13 -05:00

29 lines
772 B
Ruby

module Fog
module Compute
class Fogdocker
class Real
def image_search(query = {})
Docker::Util.parse_json(@connection.get('/images/search', query)).map do |image|
downcase_hash_keys(image)
end
end
end
class Mock
def image_search(query = {})
[
{"description" => "",
"is_official" => false,
"is_automated" => false,
"name" => "wma55/u1210sshd",
"star_count" => 0},
{"description" => "",
"is_official" => false,
"is_automated" => false,
"name" => "jdswinbank/sshd",
"star_count" => 0}
]
end
end
end
end
end