1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge remote-tracking branch 'brightbox/pick_smallest_image_for_tests'

This commit is contained in:
Paul Thornthwaite 2012-10-09 10:00:45 +01:00
commit be3bda365b

View file

@ -73,7 +73,7 @@ class Brightbox
def self.select_testing_image_from_api
images = Fog::Compute[:brightbox].list_images
raise "No available images!" if images.empty?
images.select {|img| img.size == 0 }.first || images.first
images.select { |img| img["official"] && img["virtual_size"] != 0 }.sort_by { |img| img["disk_size"] }.first || images.first
end
end