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
request_path 'fog/serverlove/requests/compute'
request :get_image
request :get_images
request :destroy_image
request :create_image

View File

@ -15,7 +15,8 @@ module Fog
end
def get(image_id)
connection.get_image(image_id)
data = connection.get_image(image_id).body
new(data)
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