2011-01-19 15:47:35 -05:00
|
|
|
module Fog
|
|
|
|
module Voxel
|
|
|
|
class Compute
|
|
|
|
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 = {
|
|
|
|
:parser => Fog::Parsers::Voxel::Compute::ImagesList.new,
|
|
|
|
:verbosity => 'compact'
|
|
|
|
}
|
2011-01-19 15:47:35 -05:00
|
|
|
|
|
|
|
unless image_id.nil?
|
|
|
|
options[:verbosity] = 'extended'
|
|
|
|
options[:image_id] = image_id
|
|
|
|
end
|
|
|
|
|
2011-02-23 18:00:56 -05:00
|
|
|
data = request("voxel.images.list", options).body
|
2011-02-09 11:04:31 -05:00
|
|
|
|
2011-02-23 18:00:56 -05:00
|
|
|
if data['stat'] == "ok"
|
|
|
|
data['images']
|
2011-02-09 11:04:31 -05:00
|
|
|
else
|
2011-02-20 14:39:37 -05:00
|
|
|
raise Fog::Voxel::Compute::NotFound
|
2011-02-09 11:04:31 -05:00
|
|
|
end
|
2011-01-19 15:47:35 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|