Class: Kitchen::Driver::Aws::StandardPlatform::Ubuntu
- Inherits:
-
Kitchen::Driver::Aws::StandardPlatform
- Object
- Kitchen::Driver::Aws::StandardPlatform
- Kitchen::Driver::Aws::StandardPlatform::Ubuntu
- Defined in:
- lib/kitchen/driver/aws/standard_platform/ubuntu.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
24 25 26 27 28 29 |
# File 'lib/kitchen/driver/aws/standard_platform/ubuntu.rb', line 24 def self.from_image(driver, image) if image.name =~ /ubuntu/i image.name =~ /\b(\d+(\.\d+)?)\b/i new(driver, "ubuntu", (Regexp.last_match || [])[1], image.architecture) end end |
Instance Method Details
#image_search ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/kitchen/driver/aws/standard_platform/ubuntu.rb', line 15 def image_search search = { "owner-id" => "099720109477", "name" => "ubuntu/images/*/ubuntu-*-#{version}*" } search["architecture"] = architecture if architecture search end |
#username ⇒ Object
11 12 13 |
# File 'lib/kitchen/driver/aws/standard_platform/ubuntu.rb', line 11 def username "ubuntu" end |