1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[digitalocean|compute] Added list_images mock code

This commit is contained in:
Sergio Rubio 2013-03-18 11:24:46 +01:00
parent be637e6836
commit 7589c3b80a

View file

@ -16,7 +16,31 @@ module Fog
class Mock
def list_images
Fog::Mock.not_implemented
response = Excon::Response.new
response.status = 200
response.body = {
"status" => "OK",
"images" => [
# Sample image
{
"id" => 1601,
"name" => "CentOS 5.8 x64",
"distribution" => "CentOS"
},
{
"id" => 1602,
"name" => "CentOS 5.8 x32",
"distribution" => "CentOS"
},
{
"id" => 2676,
"name" => "Ubuntu 12.04 x64 Server",
"distribution" => "Ubuntu"
},
]
}
response
end
end