mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
implement get_images api call
This commit is contained in:
parent
3b2a7ca5ee
commit
21ba080d8e
1 changed files with 25 additions and 0 deletions
25
lib/fog/joyent/requests/compute/list_images.rb
Normal file
25
lib/fog/joyent/requests/compute/list_images.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
module Fog
|
||||
module Compute
|
||||
class Joyent
|
||||
|
||||
class Mock
|
||||
def list_images
|
||||
res = Excon::Response.new
|
||||
res.status = 200
|
||||
res.body = self.data[:datasets].values
|
||||
res
|
||||
end
|
||||
end
|
||||
|
||||
class Real
|
||||
def list_images
|
||||
request(
|
||||
:method => "GET",
|
||||
:path => "/#{@joyent_username}/images",
|
||||
:expects => 200
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue