2010-03-17 20:51:55 -07:00
|
|
|
module Fog
|
|
|
|
module Slicehost
|
|
|
|
class Real
|
2009-11-26 21:04:49 -08:00
|
|
|
|
2010-03-17 20:51:55 -07:00
|
|
|
require 'fog/slicehost/parsers/get_images'
|
2009-11-26 21:04:49 -08:00
|
|
|
|
|
|
|
# Get list of images
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Array>:
|
|
|
|
# * 'id'<~Integer> - Id of the image
|
|
|
|
# * 'name'<~String> - Name of the image
|
|
|
|
def get_images
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
|
|
|
:parser => Fog::Parsers::Slicehost::GetImages.new,
|
|
|
|
:path => 'images.xml'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2010-03-17 20:51:55 -07:00
|
|
|
class Mock
|
2009-11-26 21:04:49 -08:00
|
|
|
|
|
|
|
def get_images
|
2010-05-26 17:37:27 -07:00
|
|
|
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
2009-11-26 21:04:49 -08:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|