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

[Brightbox] Brightbox tests should select the smallest official image.

This commit is contained in:
Steve Smith 2012-10-08 16:59:24 +01:00
parent cae2af0806
commit ef7e8c6e9b

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