Skip to content

Commit 68bf4e2

Browse files
committed
Merge remote-tracking branch 'origin/main' into zero-lenth-prefix-source-fix
2 parents c0ef42b + ad47cf9 commit 68bf4e2

26 files changed

+624
-164
lines changed

.github/workflows/labeller.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Publish module"
22

33
on:
44
workflow_dispatch:
5-
5+
66
jobs:
77
release:
88
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main"

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@
1919
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log

.pdkignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,20 @@
1919
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log
2936
/.fixtures.yml
3037
/Gemfile
3138
/.gitattributes

.rubocop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ require:
33
- rubocop-performance
44
- rubocop-rspec
55
AllCops:
6+
NewCops: enable
67
DisplayCopNames: true
78
TargetRubyVersion: '2.6'
89
Include:
@@ -528,6 +529,8 @@ Lint/DuplicateBranch:
528529
Enabled: false
529530
Lint/DuplicateMagicComment:
530531
Enabled: false
532+
Lint/DuplicateMatchPattern:
533+
Enabled: false
531534
Lint/DuplicateRegexpCharacterClassElement:
532535
Enabled: false
533536
Lint/EmptyBlock:
@@ -644,6 +647,8 @@ Style/ComparableClamp:
644647
Enabled: false
645648
Style/ConcatArrayLiterals:
646649
Enabled: false
650+
Style/DataInheritance:
651+
Enabled: false
647652
Style/DirEmpty:
648653
Enabled: false
649654
Style/DocumentDynamicEvalDefinition:
@@ -712,6 +717,8 @@ Style/RedundantHeredocDelimiterQuotes:
712717
Enabled: false
713718
Style/RedundantInitialize:
714719
Enabled: false
720+
Style/RedundantLineContinuation:
721+
Enabled: false
715722
Style/RedundantSelfAssignmentBranch:
716723
Enabled: false
717724
Style/RedundantStringEscape:

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"recommendations": [
33
"puppet.puppet-vscode",
4-
"rebornix.Ruby"
4+
"Shopify.ruby-lsp"
55
]
66
}

CHANGELOG.md

Lines changed: 106 additions & 35 deletions
Large diffs are not rendered by default.

Gemfile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ group :development do
2020
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2121
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2222
gem "racc", '~> 1.4.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
23+
gem "deep_merge", '~> 1.2.2', require: false
2324
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
24-
gem "facterdb", '~> 1.18', require: false
25-
gem "metadata-json-lint", '~> 3.0', require: false
26-
gem "puppetlabs_spec_helper", '~> 6.0', require: false
25+
gem "facterdb", '~> 1.18', require: false
26+
gem "metadata-json-lint", '~> 4.0', require: false
2727
gem "rspec-puppet-facts", '~> 2.0', require: false
28-
gem "codecov", '~> 0.2', require: false
2928
gem "dependency_checker", '~> 1.0.0', require: false
3029
gem "parallel_tests", '= 3.12.1', require: false
3130
gem "pry", '~> 0.10', require: false
32-
gem "simplecov-console", '~> 0.5', require: false
31+
gem "simplecov-console", '~> 0.9', require: false
3332
gem "puppet-debugger", '~> 1.0', require: false
34-
gem "rubocop", '= 1.48.1', require: false
33+
gem "rubocop", '~> 1.50.0', require: false
3534
gem "rubocop-performance", '= 1.16.0', require: false
3635
gem "rubocop-rspec", '= 2.19.0', require: false
37-
gem "puppet-strings", '~> 4.0', require: false
3836
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
37+
gem "rexml", '>= 3.0.0', '< 3.2.7', require: false
3938
gem "puppet-resource_api", require: false
4039
end
41-
group :system_tests do
42-
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
43-
gem "serverspec", '~> 2.41', require: false
44-
end
45-
group :release_prep do
40+
group :development, :release_prep do
4641
gem "puppet-strings", '~> 4.0', require: false
47-
gem "puppetlabs_spec_helper", '~> 6.0', require: false
42+
gem "puppetlabs_spec_helper", '~> 7.0', require: false
43+
end
44+
group :system_tests do
45+
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
46+
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
47+
gem "serverspec", '~> 2.41', require: false
4848
end
4949

5050
puppet_version = ENV['PUPPET_GEM_VERSION']

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ As part of this process several breaking changes where made to the code that wil
568568
* Attributes that allow both arrays and negated values have now been updated.
569569
* For attributes that require that all passed values be negated as one, you now merely have to negate the first value within the array, rather than all of them, though negating all is still accepted.
570570
* For attributes that allow passed values to be negated seperately this is not the case. All attributes in this situation are noted within their description.
571-
* The `sport` and `dport` attributes have been updated so that they will now accept with `:` or `-` as a separator when passing ranges, with `:` being preferred as it matchs what is passed to iptables.
571+
* The `sport` and `dport` attributes have been updated so that they will now accept with `:` or `-` as a separator when passing ranges, with `:` being preferred as it matches what is passed to iptables.
572572

573573
Two pairs of manifest taken from the tests can be seen below, illustrating the changes that may be required, the first applying a hoplimit on `ip6tables`:
574574

REFERENCE.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ Data type: `Optional[Integer]`
364364

365365
##### `connmark`
366366

367-
Data type: `Optional[Pattern[/^(?:!\s)?[a-fA-F0-9x]+$/]]`
367+
Data type: `Optional[Pattern[/^(?:!\s)?[a-fA-F0-9x]+(?:\/[a-fA-F0-9x]+)?$/]]`
368368
_*this data type contains a regex that may not be accurately reflected in generated documentation_
369369

370-
Match the Netfilter mark value associated with the packet, accepts a mark.
370+
Match the Netfilter mark value associated with the packet. Accepts either of mark/mask or mark.
371371
This value will be converted to hex if it is not already.
372372
This value can be negated by adding a space seperated `!` to the beginning.
373373

@@ -730,8 +730,7 @@ Data type: `Optional[Variant[String[1], Integer]]`
730730

731731
##### `goto`
732732

733-
Data type: `Optional[Pattern[/^[a-zA-Z0-9_]+$/]]`
734-
_*this data type contains a regex that may not be accurately reflected in generated documentation_
733+
Data type: `Optional[String[1]]`
735734

736735
The value for the iptables --goto parameter. Normal values are:
737736

@@ -880,7 +879,7 @@ Data type: `Optional[Enum['none', 'ipsec']]`
880879

881880
##### `ipset`
882881

883-
Data type: `Optional[Variant[Pattern[/^(?:!\s)?\w+\s(?:src|dst)(?:,src|,dst)?$/], Array[Pattern[/^(?:!\s)?\w+\s(?:src|dst)(?:,src|,dst)?$/]]]]`
882+
Data type: `Optional[Variant[Pattern[/^(?:!\s)?[\w\-:_]+\s(?:src|dst)(?:,src|,dst)?$/], Array[Pattern[/^(?:!\s)?[\w\-:_]+\s(?:src|dst)(?:,src|,dst)?$/]]]]`
884883
_*this data type contains a regex that may not be accurately reflected in generated documentation_
885884

886885
Matches against the specified ipset list.
@@ -927,16 +926,15 @@ Data type: `Optional[Boolean]`
927926

928927
##### `jump`
929928

930-
Data type: `Optional[Pattern[/^[a-zA-Z0-9_]+$/]]`
931-
_*this data type contains a regex that may not be accurately reflected in generated documentation_
929+
Data type: `Optional[String[1]]`
932930

933931
This value for the iptables --jump parameter and the action to perform on a match. Common values are:
934932

935933
* ACCEPT - the packet is accepted
936934
* REJECT - the packet is rejected with a suitable ICMP response
937935
* DROP - the packet is dropped
938936

939-
But can also be on of the following:
937+
But can also be one of the following:
940938

941939
* QUEUE
942940
* RETURN
@@ -1041,10 +1039,10 @@ _*this data type contains a regex that may not be accurately reflected in genera
10411039

10421040
##### `match_mark`
10431041

1044-
Data type: `Optional[Pattern[/^(?:!\s)?[a-fA-F0-9x]+$/]]`
1042+
Data type: `Optional[Pattern[/^(?:!\s)?[a-fA-F0-9x]+(?:\/[a-fA-F0-9x]+)?$/]]`
10451043
_*this data type contains a regex that may not be accurately reflected in generated documentation_
10461044

1047-
Match the Netfilter mark value associated with the packet, accepts a mark.
1045+
Match the Netfilter mark value associated with the packet. Accepts either of mark/mask or mark.
10481046
This value will be converted to hex if it is not already.
10491047
This value can be negated by adding a space seperated `!` to the beginning.
10501048

@@ -1269,13 +1267,15 @@ Data type: `Optional[Enum['set', 'update', 'rcheck', 'remove', '! set', '! updat
12691267

12701268
Data type: `Optional[Enum['icmp-net-unreachable', 'icmp-host-unreachable', 'icmp-port-unreachable', 'icmp-proto-unreachable',
12711269
'icmp-net-prohibited', 'icmp-host-prohibited', 'icmp-admin-prohibited', 'icmp6-no-route', 'no-route',
1272-
'icmp6-adm-prohibited', 'adm-prohibited', 'icmp6-addr-unreachable', 'addr-unreach', 'icmp6-port-unreachable']]`
1270+
'icmp6-adm-prohibited', 'adm-prohibited', 'icmp6-addr-unreachable', 'addr-unreach', 'icmp6-port-unreachable',
1271+
'tcp-reset']]`
12731272

12741273
When combined with jump => "REJECT" you can specify a different icmp response to be sent back to the packet sender.
12751274
Valid values differ depending on if the protocol is `IPv4` or `IPv6`.
12761275
IPv4 allows: icmp-net-unreachable, icmp-host-unreachable, icmp-port-unreachable, icmp-proto-unreachable, icmp-net-prohibited,
1277-
icmp-host-prohibited, or icmp-admin-prohibited.
1278-
IPv6 allows: icmp6-no-route, no-route, icmp6-adm-prohibited, adm-prohibited, icmp6-addr-unreachable, addr-unreach, or icmp6-port-unreachable.
1276+
icmp-host-prohibited, icmp-admin-prohibited, or tcp-reset.
1277+
IPv6 allows: icmp6-no-route, no-route, icmp6-adm-prohibited, adm-prohibited, icmp6-addr-unreachable, addr-unreach,
1278+
icmp6-port-unreachable, or tcp-reset.
12791279

12801280
##### `rhitcount`
12811281

@@ -1635,7 +1635,7 @@ Data type: `Optional[String[1]]`
16351635

16361636
##### `toports`
16371637

1638-
Data type: `Optional[Pattern[/^\d+(?:-\d+)?$/]]`
1638+
Data type: `Optional[Variant[Integer[0, 65535], Pattern[/^\d+(?:-\d+)?$/]]]`
16391639
_*this data type contains a regex that may not be accurately reflected in generated documentation_
16401640

16411641
For REDIRECT/MASQUERADE this is the port that will replace the destination/source port.

0 commit comments

Comments
 (0)