Class: Kitchen::Driver::Aws::StandardPlatform::Amazon2
- Inherits:
-
Kitchen::Driver::Aws::StandardPlatform
- Object
- Kitchen::Driver::Aws::StandardPlatform
- Kitchen::Driver::Aws::StandardPlatform::Amazon2
- Defined in:
- lib/kitchen/driver/aws/standard_platform/amazon2.rb
Overview
Constant Summary
Constants inherited from Kitchen::Driver::Aws::StandardPlatform
Instance Attribute Summary
Attributes inherited from Kitchen::Driver::Aws::StandardPlatform
#architecture, #driver, #name, #version
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Kitchen::Driver::Aws::StandardPlatform
#find_image, from_platform_string, #initialize, platforms, #to_s
Constructor Details
This class inherits a constructor from Kitchen::Driver::Aws::StandardPlatform
Class Method Details
.from_image(driver, image) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/kitchen/driver/aws/standard_platform/amazon2.rb', line 39 def self.from_image(driver, image) if image.name =~ /amzn2-ami/i image.name =~ /\b(\d+(\.\d+[\.\d])?)/i new(driver, "amazon2", (Regexp.last_match || [])[1], image.architecture) end end |
Instance Method Details
#image_search ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/kitchen/driver/aws/standard_platform/amazon2.rb', line 30 def image_search search = { "owner-id" => "137112412989", "name" => version ? "amzn2-ami-hvm-2.0.#{version}*" : "amzn2-ami-hvm-2.0.*", } search["architecture"] = architecture if architecture search end |
#username ⇒ Object
26 27 28 |
# File 'lib/kitchen/driver/aws/standard_platform/amazon2.rb', line 26 def username "ec2-user" end |