]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
allow only a single source or destination value per resource. fixes #4
authorJonathan Boyett <jonathan@failingservers.com>
Mon, 15 Aug 2011 18:13:20 +0000 (11:13 -0700)
committerJonathan Boyett <jonathan@failingservers.com>
Mon, 15 Aug 2011 18:13:20 +0000 (11:13 -0700)
lib/puppet/type/firewall.rb

index 7ea91a54090dd11246d859a854f6575248590a12..1e9a2856d1ea58b664b19aab8f4c4a86ea8fd767 100644 (file)
@@ -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