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

Added get_image function.

This commit is contained in:
Sean Handley 2012-04-29 21:38:29 +01:00
parent c66d55284c
commit 24b7ba1eab
3 changed files with 16 additions and 1 deletions

View file

@ -9,6 +9,7 @@ module Fog
recognizes :serverlove_api_url recognizes :serverlove_api_url
request_path 'fog/serverlove/requests/compute' request_path 'fog/serverlove/requests/compute'
request :get_image
request :get_images request :get_images
request :destroy_image request :destroy_image
request :create_image request :create_image

View file

@ -15,7 +15,8 @@ module Fog
end end
def get(image_id) def get(image_id)
connection.get_image(image_id) data = connection.get_image(image_id).body
new(data)
end end
end end

View file

@ -0,0 +1,13 @@
module Fog
module Compute
class Serverlove
class Real
def get_image(image_id)
request(:method => "get", :path => "/drives/#{image_id}/info", :expects => 200)
end
end
end
end
end