]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
(#6) - added action property to type for future provider support.
authorKen Barber <ken@bob.sh>
Sat, 16 Jul 2011 19:45:00 +0000 (21:45 +0200)
committerKen Barber <ken@bob.sh>
Sat, 16 Jul 2011 19:45:00 +0000 (21:45 +0200)
lib/puppet/type/firewall.rb

index 3438c2b1edeb1f96df976df878f6cb4f3c771945..2ba12e5cff2289d92f1013c170256cd6789e5eaf 100644 (file)
@@ -44,6 +44,12 @@ Puppet::Type.newtype(:firewall) do
     newvalues(/^\d+[a-zA-Z0-9\s\-_]+$/)
   end
 
+  newparam(:action) do
+    desc "Action to perform on this rule."
+    newvalues(:accept, :reject, :drop)
+    defaultto :accept
+  end
+
   # Generic matching properties
   newproperty(:source, :array_matching => :all) do
     desc "The source IP address to match. Accepts a string or array."