class Kitchen::Driver::Aws::StandardPlatform::Debian

wiki.debian.org/Cloud/AmazonEC2Image

Constants

DEBIAN_CODENAMES

12/13 are listed last since we default to the first item in the hash and 12/13 are not released yet. When they’re released move them up

Public Class Methods

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

  image.name =~ /\b(\d+|#{DEBIAN_CODENAMES.values.join("|")})\b/i
  version = (Regexp.last_match || [])[1]
  if version&.to_i&.zero?
    version = DEBIAN_CODENAMES.find do |_v, codename|
      codename == version.downcase
    end.first
  end
  new(driver, "debian", version, image.architecture)
end

Public Instance Methods

codename() click to toggle source
# File lib/kitchen/driver/aws/standard_platform/debian.rb, line 45
def codename
  v = version
  if v && v.size > 1
    warn("WARN: Debian version #{version} specified, but searching for #{version.to_i} instead.")
    v = v.to_i
  end
  v ? DEBIAN_CODENAMES[v.to_i] : DEBIAN_CODENAMES.values.first
end
username() click to toggle source

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

# File lib/kitchen/driver/aws/standard_platform/debian.rb, line 41
def username
  "admin"
end