# File lib/deltacloud/drivers/ec2/ec2_driver.rb, line 268 def storage_snapshots(credentials, opts=nil) ec2 = new_client( credentials ) snapshots = [] safely do if (opts) ec2.describe_snapshots(:owner => 'self', :snapshot_id => opts[:id]).snapshotSet.item.each do |ec2_snapshot| snapshots << convert_snapshot( ec2_snapshot ) end else ec2_snapshots = ec2.describe_snapshots(:owner => 'self').snapshotSet return [] unless ec2_snapshots ec2_snapshots.item.each do |ec2_snapshot| snapshots << convert_snapshot( ec2_snapshot ) end end end snapshots end