From 92fac8ace518b6f914ed760167aa7ed12e2445b8 Mon Sep 17 00:00:00 2001 From: Jonathan Boyett Date: Mon, 15 Aug 2011 11:13:20 -0700 Subject: [PATCH] allow only a single source or destination value per resource. fixes #2 --- lib/puppet/type/firewall.rb | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index 7ea91a5..1e9a285 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -49,22 +49,12 @@ Puppet::Type.newtype(:firewall) do end # Generic matching properties - newproperty(:source, :array_matching => :all) do - desc "The source IP address to match. Accepts a string or array." - - def should_to_s(value) - value = [value] unless value.is_a?(Array) - value.join(',') - end + newproperty(:source) do + desc "The source IP address to match." end - newproperty(:destination, :array_matching => :all) do - desc "The destination IP address to match. Accepts a string or array." - - def should_to_s(value) - value = [value] unless value.is_a?(Array) - value.join(',') - end + newproperty(:destination) do + desc "The destination IP address to match." end newproperty(:sport, :array_matching => :all) do -- 2.45.2