class Kitchen::Driver::Aws::StandardPlatform::Centos

wiki.centos.org/Cloud/AWS

Constants

CENTOS_OWNER_ID

Public Class Methods

from_image(driver, image) click to toggle source
# File lib/kitchen/driver/aws/standard_platform/centos.rb, line 54
def self.from_image(driver, image)
  return unless /centos/i.match?(image.name)

  image.name =~ /\b(\d+(\.\d+)?)\b/i
  new(driver, "centos", (Regexp.last_match || [])[1], image.architecture)
end

Public Instance Methods

sort_by_version(images) click to toggle source
# File lib/kitchen/driver/aws/standard_platform/centos.rb, line 45
def sort_by_version(images)
  # 7.1 -> [ img1, img2, img3 ]
  # 6 -> [ img4, img5 ]
  # ...
  images.group_by { |image| self.class.from_image(driver, image).version }
    .sort_by { |k, _v| (k && k.include?(".") ? k.to_f : "#{k}.999".to_f) }
    .reverse.flat_map { |_k, v| v }
end
username() click to toggle source

default username for this platform’s ami @return [String]

# File lib/kitchen/driver/aws/standard_platform/centos.rb, line 30
def username
  "centos"
end