Method: AwSec::Core#safe_authorize_port
- Defined in:
- lib/aw_sec/core.rb
#safe_authorize_port(group, ip) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/aw_sec/core.rb', line 78 def (group, ip) if group..nil? = false else = (group, ip) end unless begin group.(port..port, :cidr_ip => ip) rescue => exc if exc. =~ /InvalidPermission.Duplicate/ puts "#{ip} already has access" else puts "Failed #{exc.message}" end end end end |