Skip to content

Commit

Permalink
Merge pull request #505 from jpds/ipv4-encap
Browse files Browse the repository at this point in the history
Added ipv{4,6} to protocol list
  • Loading branch information
jonnytdevops committed Apr 1, 2015
2 parents 317ee17 + a640a43 commit e7121fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ firewall { '999 this runs last':
* 'tcp'
* 'udp'
* 'icmp'
* 'ipv4'
* 'ipv6'
* 'ipv6-icmp'
* 'esp'
* 'ah'
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/firewall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def should_to_s(value)
*tcp*.
EOS

newvalues(*[:tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :igmp, :ipencap, :ospf, :gre, :cbt, :all].collect do |proto|
newvalues(*[:tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :cbt, :all].collect do |proto|
[proto, "! #{proto}".to_sym]
end.flatten)
defaultto "tcp"
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/puppet/type/firewall_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
end

describe ':proto' do
[:tcp, :udp, :icmp, :esp, :ah, :vrrp, :igmp, :ipencap, :ospf, :gre, :all].each do |proto|
[:tcp, :udp, :icmp, :esp, :ah, :vrrp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :all].each do |proto|
it "should accept proto value #{proto}" do
@resource[:proto] = proto
@resource[:proto].should == proto
Expand Down

0 comments on commit e7121fe

Please sign in to comment.