Method: Awspec::Helper::Finder::Ebs#select_all_attached_ebs
- Defined in:
- lib/awspec/helper/finder/ebs.rb
#select_all_attached_ebs ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/awspec/helper/finder/ebs.rb', line 27 def select_all_attached_ebs selected = [] res = ec2_client.describe_volumes loop do selected += res.volumes.select { |v| v..count > 0 } (res.next_page? && res = res.next_page) || break end selected end |