Skip to content

Commit

Permalink
Add additional applyto options for policies
Browse files Browse the repository at this point in the history
Add additional `applyto` options for the `rabbimq_policy` resource type.

Fixes #947
  • Loading branch information
wyardley committed Oct 30, 2023
1 parent d03c21a commit 19af788
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ The following properties are available in the `rabbitmq_policy` type.

##### `applyto`

Valid values: `all`, `exchanges`, `queues`
Valid values: `all`, `classic_queues`, `exchanges`, `queues`, `quorum_queues`, `streams`

policy apply to

Expand Down
3 changes: 3 additions & 0 deletions lib/puppet/type/rabbitmq_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
newproperty(:applyto) do
desc 'policy apply to'
newvalue(:all)
newvalue(:classic_queues)
newvalue(:exchanges)
newvalue(:queues)
newvalue(:quorum_queues)
newvalue(:streams)
defaultto :all
end

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/puppet/type/rabbitmq_policy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
end

it 'accepts valid value for applyto' do
%i[all exchanges queues].each do |v|
%i[all classic_queues exchanges queues quorum_queues streams].each do |v|
policy[:applyto] = v
expect(policy[:applyto]).to eq(v)
end
Expand Down

0 comments on commit 19af788

Please sign in to comment.