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:
parent
be637e6836
commit
7589c3b80a
1 changed files with 25 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue