From: Jonathan Boyett Date: Mon, 15 Aug 2011 18:13:20 +0000 (-0700) Subject: allow only a single source or destination value per resource. fixes #2 X-Git-Tag: v0.0.1~15 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=92fac8ace518b6f914ed760167aa7ed12e2445b8;p=puppet-modules%2Fpuppetlabs-firewall.git allow only a single source or destination value per resource. fixes #2 --- 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