class Kitchen::Driver::Aws::StandardPlatform::El

aws.amazon.com/blogs/aws/now-available-red-hat-enterprise-linux-64-amis/

Public Class Methods

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

  image.name =~ /\b(\d+(\.\d+)?)/i
  new(driver, "rhel", (Regexp.last_match || [])[1], image.architecture)
end
new(driver, _name, version, architecture) click to toggle source
# File lib/kitchen/driver/aws/standard_platform/rhel.rb, line 27
def initialize(driver, _name, version, architecture)
  # rhel = el
  super(driver, "rhel", version, architecture)
end

Public Instance Methods

sort_by_version(images) click to toggle source
# File lib/kitchen/driver/aws/standard_platform/rhel.rb, line 54
def sort_by_version(images)
  # First do a normal version sort
  super(images)
  # Now sort again, shunning Beta releases.
  prefer(images) { |image| !image.name.match(/_Beta-/i) }
end
username() click to toggle source

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

# File lib/kitchen/driver/aws/standard_platform/rhel.rb, line 34
def username
  version && version.to_f < 6.4 ? "root" : "ec2-user"
end