Sha256: 0fc4f0047307c6efab18a8f79a3d917c4929f399b1c900ec04f22736fbf9d8d6

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

module Awspec::Helper
  module Finder
    module Autoscaling
      def find_autoscaling_group(id)
        res = autoscaling_client.describe_auto_scaling_groups({
                                                                auto_scaling_group_names: [id]
                                                              })
        res.auto_scaling_groups.single_resource(id)
      end

      def find_launch_configuration(id)
        res = autoscaling_client.describe_launch_configurations({
                                                                  launch_configuration_names: [id]
                                                                })
        res.launch_configurations.single_resource(id)
      end

      def find_block_device_mapping(id, device_id)
        ret = find_launch_configuration(id).block_device_mappings.select do |device|
          next true if device.device_name == device_id
          next true if device.virtual_name == device_id
        end
        ret.single_resource(device_id)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awspec-0.84.0 lib/awspec/helper/finder/autoscaling.rb
awspec-0.83.0 lib/awspec/helper/finder/autoscaling.rb
awspec-0.82.3 lib/awspec/helper/finder/autoscaling.rb
awspec-0.82.2 lib/awspec/helper/finder/autoscaling.rb
awspec-0.82.1 lib/awspec/helper/finder/autoscaling.rb
awspec-0.82.0 lib/awspec/helper/finder/autoscaling.rb
awspec-0.81.1 lib/awspec/helper/finder/autoscaling.rb
awspec-0.81.0 lib/awspec/helper/finder/autoscaling.rb