diff --git a/lib/fog/serverlove/compute.rb b/lib/fog/serverlove/compute.rb index 7e8e8e995..c9fa8df0a 100644 --- a/lib/fog/serverlove/compute.rb +++ b/lib/fog/serverlove/compute.rb @@ -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 diff --git a/lib/fog/serverlove/models/compute/images.rb b/lib/fog/serverlove/models/compute/images.rb index 77524ab19..d6706603d 100644 --- a/lib/fog/serverlove/models/compute/images.rb +++ b/lib/fog/serverlove/models/compute/images.rb @@ -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 diff --git a/lib/fog/serverlove/requests/compute/get_image.rb b/lib/fog/serverlove/requests/compute/get_image.rb new file mode 100644 index 000000000..a13e9d1cc --- /dev/null +++ b/lib/fog/serverlove/requests/compute/get_image.rb @@ -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 \ No newline at end of file