2011-01-19 15:47:35 -05:00
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class Voxel
|
2011-01-19 15:47:35 -05:00
|
|
|
class Real
|
2011-02-25 15:31:56 -05:00
|
|
|
|
|
|
|
require 'fog/compute/parsers/voxel/images_list'
|
|
|
|
|
2011-02-23 18:00:56 -05:00
|
|
|
def images_list(image_id = nil)
|
|
|
|
options = {
|
2011-06-16 19:28:54 -04:00
|
|
|
:parser => Fog::Parsers::Compute::Voxel::ImagesList.new,
|
2011-02-23 18:00:56 -05:00
|
|
|
:verbosity => 'compact'
|
|
|
|
}
|
2011-01-19 15:47:35 -05:00
|
|
|
|
|
|
|
unless image_id.nil?
|
|
|
|
options[:verbosity] = 'extended'
|
|
|
|
options[:image_id] = image_id
|
|
|
|
end
|
|
|
|
|
2011-04-14 19:31:58 -04:00
|
|
|
data = request("voxel.images.list", options)
|
2011-02-09 11:04:31 -05:00
|
|
|
|
2011-04-14 19:31:58 -04:00
|
|
|
if data.body['stat'] == "ok"
|
|
|
|
data
|
2011-02-09 11:04:31 -05:00
|
|
|
else
|
2011-06-16 19:28:54 -04:00
|
|
|
raise Fog::Compute::Voxel::NotFound
|
2011-02-09 11:04:31 -05:00
|
|
|
end
|
2011-01-19 15:47:35 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|