Class: Kitchen::Driver::Aws::StandardPlatform::Fedora
- Inherits:
-
Kitchen::Driver::Aws::StandardPlatform
- Object
- Kitchen::Driver::Aws::StandardPlatform
- Kitchen::Driver::Aws::StandardPlatform::Fedora
- Defined in:
- lib/kitchen/driver/aws/standard_platform/fedora.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
- #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, 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/fedora.rb', line 41 def self.from_image(driver, image) if image.name =~ /fedora/i image.name =~ /\b(\d+(\.\d+)?)\b/i new(driver, "fedora", (Regexp.last_match || [])[1], image.architecture) end end |
Instance Method Details
#image_search ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/kitchen/driver/aws/standard_platform/fedora.rb', line 32 def image_search search = { "owner-id" => "125523088429", "name" => version ? "Fedora-Cloud-Base-#{version}-*" : "Fedora-Cloud-Base-*", } search["architecture"] = architecture if architecture search end |
#username ⇒ String
default username for this platform’s ami
28 29 30 |
# File 'lib/kitchen/driver/aws/standard_platform/fedora.rb', line 28 def username "fedora" end |