From 3c759007772b5a043fe3fe167905f49f237f3eed Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 4 Feb 2014 16:34:44 -0800 Subject: [PATCH] Some documentation fixups and newvalues to make tests pass --- lib/puppet/type/firewall.rb | 49 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index b7f2deb..6093441 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -700,10 +700,10 @@ Puppet::Type.newtype(:firewall) do Enable the recent module. Takes as an argument one of set, update, rcheck or remove. For example: - recent => 'update', - rseconds => 60, + recent => 'update', + rseconds => 60, rhitcount => 4, - rsource => true, + rsource => true, EOS newvalues(:set, :update, :rcheck, :remove) @@ -717,6 +717,8 @@ Puppet::Type.newtype(:firewall) do Recent module; add the destination IP address to the list. Must be boolean true. EOS + + newvalues(:true, :false) end newproperty(:rsource, :required_features => :recent_limiting) do @@ -724,6 +726,8 @@ Puppet::Type.newtype(:firewall) do Recent module; add the source IP address to the list. Must be boolean true. EOS + + newvalues(:true, :false) end newproperty(:rname, :required_features => :recent_limiting) do @@ -734,41 +738,42 @@ Puppet::Type.newtype(:firewall) do newproperty(:rseconds, :required_features => :recent_limiting) do desc <<-EOS - Recent module; used in conjunction with one of --rcheck or - --update. When used, this will narrow the match to only happen - when the address is in the list and was seen within the last - given number of seconds. + Recent module; used in conjunction with one of `recent => 'rcheck'` or + `recent => 'update'`. When used, this will narrow the match to only + happen when the address is in the list and was seen within the last given + number of seconds. EOS end newproperty(:reap, :required_features => :recent_limiting) do desc <<-EOS - Recent module; can only be used in conjunction with --seconds. When - used, this will cause entries older then 'seconds' to be purged. - Must be boolean true. + Recent module; can only be used in conjunction with the `rseconds` + attribute. When used, this will cause entries older than 'seconds' to be + purged. Must be boolean true. EOS end newproperty(:rhitcount, :required_features => :recent_limiting) do desc <<-EOS - Recent module; used in conjunction with --update or --rcheck. When - used, this will narrow the match to only happen when the address - is in the list and packets had been received greater than or equal - to the given value. + Recent module; used in conjunction with `recent => 'update'` or `recent + => 'rcheck'. When used, this will narrow the match to only happen when + the address is in the list and packets had been received greater than or + equal to the given value. EOS end newproperty(:rttl, :required_features => :recent_limiting) do desc <<-EOS - Recent module; may only be used in conjunction with one of --rcheck - or --update. When used, this will narrow the match to only happen - when the address is in the list and the TTL of the current packet - matches that of the packet which hit the --set rule. This may be - useful if you have problems with people faking their source - address in order to DoS you via this module by disallowing others - access to your site by sending bogus packets to you. - Must be boolean true. + Recent module; may only be used in conjunction with one of `recent => + 'rcheck'` or `recent => 'update'`. When used, this will narrow the match + to only happen when the address is in the list and the TTL of the current + packet matches that of the packet which hit the `recent => 'set'` rule. + This may be useful if you have problems with people faking their source + address in order to DoS you via this module by disallowing others access + to your site by sending bogus packets to you. Must be boolean true. EOS + + newvalues(:true, :false) end newproperty(:socket, :required_features => :socket) do -- 2.45.2