Class: Ironfan::Dsl::SecurityGroup

Inherits:
Ironfan::Dsl show all
Defined in:
lib/ironfan/dsl/security_group.rb

Instance Attribute Summary

Attributes included from Gorillib::Resolution

#underlay

Instance Method Summary collapse

Methods inherited from Ironfan::Dsl

#_skip_fields, #skip_fields, #to_manifest

Methods included from Gorillib::Resolution

#deep_resolve, #merge_resolve, #merge_values, #read_resolved_attribute, #read_set_attribute, #read_set_or_underlay_attribute, #read_underlay_attribute, #resolve, #resolve!, #resolve_value

Methods included from CookbookRequirements

#_cookbook_reqs, #children, #cookbook_req, #cookbook_reqs, #join_req

Methods inherited from Builder

ui, #ui

Instance Method Details

#authorize_group(other_name) ⇒ Object


22
23
24
25
26
# File 'lib/ironfan/dsl/security_group.rb', line 22

def authorize_group(other_name)
  group_authorized << other_name.to_s
  group_authorized.compact!
  group_authorized.uniq!
end

#authorize_port_range(range, cidr_ip = '0.0.0.0/0', ip_protocol = 'tcp') ⇒ Object


9
10
11
12
13
14
# File 'lib/ironfan/dsl/security_group.rb', line 9

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

#authorized_by_group(other_name) ⇒ Object


16
17
18
19
20
# File 'lib/ironfan/dsl/security_group.rb', line 16

def authorized_by_group(other_name)
  group_authorized_by << other_name.to_s
  group_authorized_by.compact!
  group_authorized_by.uniq!
end