Class Fog::Brightbox::Compute::ImageSelector
In: lib/fog/brightbox/compute/image_selector.rb
Parent: Object

This selects the preferred image to use based on a number of conditions

Methods

Public Class methods

Prepares a selector with the API output

@param [Array<Hash>] images hash matching API output for {Fog::Compute::Brightbox#list_images}

Public Instance methods

Returns current identifier of the latest version of Ubuntu

The order of preference is:

  • Only Official Brightbox images
  • Only Ubuntu images
  • Latest by name (alphanumeric sort)
  • Latest by creation date

@return [String] if image matches containing the identifier @return [NilClass] if no image matches

Returns current identifier of the smallest official image

@return [String] if image matches containing the identifier @return [NilClass] if no image matches

[Validate]