2010-09-08 15:00:47 -07:00
|
|
|
module Fog
|
2011-06-16 16:28:54 -07:00
|
|
|
module Compute
|
|
|
|
class Slicehost
|
2010-09-08 15:00:47 -07:00
|
|
|
class Real
|
|
|
|
|
2011-08-24 20:35:05 -05:00
|
|
|
require 'fog/slicehost/parsers/compute/get_image'
|
2010-09-08 15:00:47 -07:00
|
|
|
|
|
|
|
# Get details of an image
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * image_id<~Integer> - Id of image to lookup
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Array>:
|
|
|
|
# * 'id'<~Integer> - Id of the image
|
|
|
|
# * 'name'<~String> - Name of the image
|
|
|
|
def get_image(image_id)
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
2011-06-16 16:28:54 -07:00
|
|
|
:parser => Fog::Parsers::Compute::Slicehost::GetImage.new,
|
2010-09-08 15:00:47 -07:00
|
|
|
:path => "images/#{image_id}.xml"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|