Class: Bosh::AwsCloud::AKIPicker
- Inherits:
-
Object
- Object
- Bosh::AwsCloud::AKIPicker
- Defined in:
- lib/cloud/aws/aki_picker.rb
Instance Method Summary collapse
-
#initialize(region) ⇒ AKIPicker
constructor
A new instance of AKIPicker.
-
#pick(architecture, root_device_name) ⇒ String
finds the correct aki for the current region.
Constructor Details
#initialize(region) ⇒ AKIPicker
Returns a new instance of AKIPicker.
5 6 7 |
# File 'lib/cloud/aws/aki_picker.rb', line 5 def initialize(region) @region = region end |
Instance Method Details
#pick(architecture, root_device_name) ⇒ String
finds the correct aki for the current region
13 14 15 16 17 18 19 |
# File 'lib/cloud/aws/aki_picker.rb', line 13 def pick(architecture, root_device_name) candidate = pick_candidate(fetch_akis(architecture), root_device_name) raise Bosh::Clouds::CloudError, "unable to find AKI" unless candidate logger.info("auto-selected AKI: #{candidate.image_id}") candidate.image_id end |