Sha256: 669a2e4ce3fd5363e66bcdcadd93041984cb15c3c4fb588d99653d33e8ab3eaa
Contents?: true
Size: 929 Bytes
Versions: 13
Compression:
Stored size: 929 Bytes
Contents
module Ironfan class Dsl class SecurityGroup < Ironfan::Dsl field :name, String field :group_authorized, Array, :default => [] field :group_authorized_by, Array, :default => [] field :range_authorizations, Array, :default => [] def authorize_port_range(range, cidr_ip = '0.0.0.0/0', ip_protocol = 'tcp') range = (range .. range) if range.is_a?(Integer) range_authorizations << [range, cidr_ip, ip_protocol] range_authorizations.compact! range_authorizations.uniq! end def authorized_by_group(other_name) group_authorized_by << other_name.to_s group_authorized_by.compact! group_authorized_by.uniq! end def authorize_group(other_name) group_authorized << other_name.to_s group_authorized.compact! group_authorized.uniq! end end end end
Version data entries
13 entries across 13 versions & 1 rubygems