Class: Kitchen::Driver::Aws::StandardPlatform::MacOS
- Inherits:
-
Kitchen::Driver::Aws::StandardPlatform
- Object
- Kitchen::Driver::Aws::StandardPlatform
- Kitchen::Driver::Aws::StandardPlatform::MacOS
- Defined in:
- lib/kitchen/driver/aws/standard_platform/macos.rb
Constant Summary
Constants inherited from Kitchen::Driver::Aws::StandardPlatform
EBS_VOLUME_TYPES, SUPPORTED_ARCHITECTURES
Instance Attribute Summary
Attributes inherited from Kitchen::Driver::Aws::StandardPlatform
#architecture, #driver, #name, #version
Class Method Summary collapse
Instance Method Summary collapse
- #image_search ⇒ Object
-
#username ⇒ String
default username for this platform’s ami.
Methods inherited from Kitchen::Driver::Aws::StandardPlatform
#find_image, from_platform_string, #initialize, parse_platform_string, platforms, #to_s
Constructor Details
This class inherits a constructor from Kitchen::Driver::Aws::StandardPlatform
Class Method Details
.from_image(driver, image) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/kitchen/driver/aws/standard_platform/macos.rb', line 41 def self.from_image(driver, image) return unless /amzn-ec2-macos/i.match?(image.name) image.name =~ /\b(\d+(\.\d+[\.\d])?)/i new(driver, "macos", (Regexp.last_match || [])[1], image.architecture) end |
Instance Method Details
#image_search ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/kitchen/driver/aws/standard_platform/macos.rb', line 31 def image_search search = { "owner-id" => "100343932686", "name" => version ? "amzn-ec2-macos-#{version}*" : "amzn2-ec2-macos-*", } search["architecture"] = architecture if architecture search["architecture"] = "arm64_mac" if architecture == "arm64" search end |
#username ⇒ String
default username for this platform’s ami
27 28 29 |
# File 'lib/kitchen/driver/aws/standard_platform/macos.rb', line 27 def username "ec2-user" end |