# File lib/deltacloud/drivers/ec2/ec2_driver.rb, line 631 def firewalls(credentials, opts={}) ec2 = new_client(credentials) the_firewalls = [] groups = [] safely do if opts[:id] groups = ec2.describe_security_groups([opts[:id]]) else groups = ec2.describe_security_groups() end end groups.each do |security_group| the_firewalls << convert_security_group(security_group) end the_firewalls end