From 0aa39b52cd036a40350229f4279bf670d611b1b8 Mon Sep 17 00:00:00 2001 From: Jonathan Boyett Date: Thu, 16 Jun 2011 11:59:13 -0700 Subject: [PATCH] remove array length validation from dport and sport --- lib/puppet/type/firewall.rb | 12 ------------ spec/type/iptables_type_spec.rb | 4 ---- 2 files changed, 16 deletions(-) diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index c5487f3..2d6531d 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -93,12 +93,6 @@ Puppet::Type.newtype(:firewall) do desc "The value for the iptables --source-port parameter. If an array is specified, values will be passed to multiport module." - validate do |value| - if value.is_a?(Array) && value.length > 15 - self.fail "multiport module only accepts <= 15 ports" - end - end - munge do |value| @resource.string_to_port(value) end @@ -113,12 +107,6 @@ Puppet::Type.newtype(:firewall) do desc "The value for the iptables --destination-port parameter. If an array is specified, values will be passed to multiport module." - validate do |value| - if value.is_a?(Array) && value.length > 15 - self.fail "multiport module only accepts <= 15 ports" - end - end - munge do |value| @resource.string_to_port(value) end diff --git a/spec/type/iptables_type_spec.rb b/spec/type/iptables_type_spec.rb index a76a358..8ff3715 100644 --- a/spec/type/iptables_type_spec.rb +++ b/spec/type/iptables_type_spec.rb @@ -97,10 +97,6 @@ describe Puppet::Type.type(:firewall) do @resource[port] = ['22','23'] @resource[port].should == [22,23] end - - it "should fail if more that 15 #{port}s are specified" do - lambda { @resource[port] = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'] }.should raise_error(Puppet::Error) - end end end -- 2.45.2