aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Meusel <tim@bastelfreak.de>2019-03-06 22:11:44 +0100
committerGitHub <noreply@github.com>2019-03-06 22:11:44 +0100
commitd5bab3f9bf3aeb5c3458d3d29533610b4a22c445 (patch)
treec4a96ead29cfbc1131fada613b24cba22220522d
parent0d7d8fdc0aa2adb2b6ce06052668c0e1bf57da77 (diff)
parentb5944f63cff01edcece5c0af00acfef8a5fc10dc (diff)
downloadpuppet-ferm-d5bab3f9bf3aeb5c3458d3d29533610b4a22c445.tar.gz
puppet-ferm-d5bab3f9bf3aeb5c3458d3d29533610b4a22c445.tar.bz2
Merge pull request #39 from bastelfreak/ports
enhance type validation; require stdlib 4.25.0
-rw-r--r--REFERENCE.md8
-rw-r--r--manifests/rule.pp8
-rw-r--r--metadata.json2
3 files changed, 9 insertions, 9 deletions
diff --git a/REFERENCE.md b/REFERENCE.md
index e9736fb..983ee46 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -212,7 +212,7 @@ Default value: $name
##### `dport`
-Data type: `Optional[Variant[Integer,String]]`
+Data type: `Optional[Variant[Stdlib::Port,String[1]]]`
The destination port, can be a range as string or a single port number as integer
@@ -220,7 +220,7 @@ Default value: `undef`
##### `sport`
-Data type: `Optional[Variant[Integer,String]]`
+Data type: `Optional[Variant[Stdlib::Port,String[1]]]`
The source port, can be a range as string or a single port number as integer
@@ -228,7 +228,7 @@ Default value: `undef`
##### `saddr`
-Data type: `Optional[String]`
+Data type: `Optional[String[1]]`
The source address we want to match
@@ -236,7 +236,7 @@ Default value: `undef`
##### `daddr`
-Data type: `Optional[String]`
+Data type: `Optional[String[1]]`
The destination address we want to match
diff --git a/manifests/rule.pp b/manifests/rule.pp
index 6f448f9..c87ef7f 100644
--- a/manifests/rule.pp
+++ b/manifests/rule.pp
@@ -14,10 +14,10 @@ define ferm::rule (
Ferm::Policies $policy,
Ferm::Protocols $proto,
String $comment = $name,
- Optional[Variant[Integer,String]] $dport = undef,
- Optional[Variant[Integer,String]] $sport = undef,
- Optional[String] $saddr = undef,
- Optional[String] $daddr = undef,
+ Optional[Variant[Stdlib::Port,String[1]]] $dport = undef,
+ Optional[Variant[Stdlib::Port,String[1]]] $sport = undef,
+ Optional[String[1]] $saddr = undef,
+ Optional[String[1]] $daddr = undef,
Optional[String[1]] $proto_options = undef,
Enum['absent','present'] $ensure = 'present',
){
diff --git a/metadata.json b/metadata.json
index 78436f1..563cc8a 100644
--- a/metadata.json
+++ b/metadata.json
@@ -10,7 +10,7 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
- "version_requirement": ">= 4.13.1 < 6.0.0"
+ "version_requirement": ">= 4.25.0 < 6.0.0"
},
{
"name": "puppetlabs/concat",