From edb460d97005a1ffc5e2c935a9e975349a527282 Mon Sep 17 00:00:00 2001 From: dlware Date: Thu, 2 Nov 2023 08:36:40 -0500 Subject: [PATCH] update regex to allow underscores in firewall name update reference as well with puppet strings. --- REFERENCE.md | 8 +++----- lib/puppet/type/firewall.rb | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 6dd126488..6a8a8fef7 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -730,8 +730,7 @@ Data type: `Optional[Variant[String[1], Integer]]` ##### `goto` -Data type: `Optional[Pattern[/^[a-zA-Z0-9_]+$/]]` -_*this data type contains a regex that may not be accurately reflected in generated documentation_ +Data type: `Optional[String[1]]` The value for the iptables --goto parameter. Normal values are: @@ -927,8 +926,7 @@ Data type: `Optional[Boolean]` ##### `jump` -Data type: `Optional[Pattern[/^[a-zA-Z0-9_]+$/]]` -_*this data type contains a regex that may not be accurately reflected in generated documentation_ +Data type: `Optional[String[1]]` This value for the iptables --jump parameter and the action to perform on a match. Common values are: @@ -1699,7 +1697,7 @@ The following parameters are available in the `firewall` type. namevar -Data type: `Pattern[/(^\d+(?:[ \t-]\S+)+$)/]` +Data type: `Pattern[/(^\d+(?:[ \t-_]\S+)+$)/]` _*this data type contains a regex that may not be accurately reflected in generated documentation_ The canonical name of the rule. This name is also used for ordering diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index 9b4591203..65a6ea16f 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -133,7 +133,7 @@ DESC }, name: { - type: 'Pattern[/(^\d+(?:[ \t-]\S+)+$)/]', + type: 'Pattern[/(^\d+(?:[ \t-_]\S+)+$)/]', behaviour: :namevar, desc: <<-DESC The canonical name of the rule. This name is also used for ordering