From 69f547f341ff0e1648f9f4a3e1713878a4def497 Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Wed, 17 Feb 2016 12:59:47 +0100 Subject: [PATCH] Add pim protocol to puppetlabs-firewall --- README.markdown | 1 + lib/puppet/type/firewall.rb | 2 +- spec/unit/puppet/type/firewall_spec.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 0b74b81..26467e0 100644 --- a/README.markdown +++ b/README.markdown @@ -641,6 +641,7 @@ firewall { '999 this runs last': * 'ipencap' * 'ospf' * 'gre' + * 'pim' * 'all' * `provider`: The specific backend to use for this firewall resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform. Available providers are ip6tables and iptables. See the [Providers](#providers) section above for details about these providers. diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index e68b2d6..4073d6c 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -369,7 +369,7 @@ Puppet::Type.newtype(:firewall) do *tcp*. EOS - newvalues(*[:tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :cbt, :sctp, :all].collect do |proto| + newvalues(*[:tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :cbt, :sctp, :pim, :all].collect do |proto| [proto, "! #{proto}".to_sym] end.flatten) defaultto "tcp" diff --git a/spec/unit/puppet/type/firewall_spec.rb b/spec/unit/puppet/type/firewall_spec.rb index 38859f6..3e4804d 100755 --- a/spec/unit/puppet/type/firewall_spec.rb +++ b/spec/unit/puppet/type/firewall_spec.rb @@ -82,7 +82,7 @@ describe firewall do end describe ':proto' do - [:tcp, :udp, :icmp, :esp, :ah, :vrrp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :all].each do |proto| + [:tcp, :udp, :icmp, :esp, :ah, :vrrp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :pim, :all].each do |proto| it "should accept proto value #{proto}" do @resource[:proto] = proto @resource[:proto].should == proto -- 2.45.2