2010-03-17 23:51:55 -04:00
|
|
|
module Fog
|
|
|
|
module Slicehost
|
|
|
|
class Real
|
2010-02-06 18:39:14 -05:00
|
|
|
|
2010-03-17 23:51:55 -04:00
|
|
|
require 'fog/slicehost/parsers/get_image'
|
2010-02-06 18:39:14 -05: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',
|
|
|
|
:parser => Fog::Parsers::Slicehost::GetImage.new,
|
|
|
|
:path => "images/#{image_id}.xml"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2010-03-17 23:51:55 -04:00
|
|
|
class Mock
|
2010-02-06 18:39:14 -05:00
|
|
|
|
|
|
|
def get_image(image_id)
|
2010-05-26 20:38:23 -04:00
|
|
|
Fog::Mock.not_implemented
|
2010-02-06 18:39:14 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|