Class: Kitchen::Driver::Aws::StandardPlatform::Freebsd
Overview
Constant Summary
ARCHITECTURE
Instance Attribute Summary
#architecture, #driver, #name, #version
Class Method Summary
collapse
Instance Method Summary
collapse
#find_image, from_platform_string, #initialize, platforms, #to_s
Class Method Details
.from_image(driver, image) ⇒ Object
27
28
29
30
31
32
|
# File 'lib/kitchen/driver/aws/standard_platform/freebsd.rb', line 27
def self.from_image(driver, image)
if image.name =~ /freebsd/i
image.name =~ /\b(\d+(\.\d+)?)\b/i
new(driver, "freebsd", (Regexp.last_match || [])[1], image.architecture)
end
end
|
Instance Method Details
#image_search ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/kitchen/driver/aws/standard_platform/freebsd.rb', line 18
def image_search
search = {
"owner-id" => "118940168514",
"name" => ["FreeBSD #{version}*-RELEASE*", "FreeBSD/EC2 #{version}*-RELEASE*"]
}
search["architecture"] = architecture if architecture
search
end
|
#sudo_command ⇒ Object
15
16
|
# File 'lib/kitchen/driver/aws/standard_platform/freebsd.rb', line 15
def sudo_command
end
|
#username ⇒ Object
11
12
13
|
# File 'lib/kitchen/driver/aws/standard_platform/freebsd.rb', line 11
def username
(version && version.to_f < 9.1) ? "root" : "ec2-user"
end
|