Skip to content

Commit

Permalink
Use warning instead of notify when inform about deprecation.
Browse files Browse the repository at this point in the history
Some modules ex. puppet-nova still use $cluster_disk_nodes, and when
notify is used to inform about deprecation every puppet runs cause
rabbitmq server restart.
  • Loading branch information
michalskalski committed Sep 2, 2014
1 parent bf59be0 commit b377b82
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
5 changes: 1 addition & 4 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@

# Handle deprecated option.
if $cluster_disk_nodes != [] {
notify { 'cluster_disk_nodes':
message => 'WARNING: The cluster_disk_nodes is deprecated.
Use cluster_nodes instead.',
}
warning('The $cluster_disk_nodes is deprecated. Use $cluster_nodes instead.')
$r_cluster_nodes = $cluster_disk_nodes
} else {
$r_cluster_nodes = $cluster_nodes
Expand Down
8 changes: 0 additions & 8 deletions spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@
end
end

context 'deprecated parameters' do
describe 'cluster_disk_nodes' do
let(:params) {{ :cluster_disk_nodes => ['node1', 'node2'] }}

it { should contain_notify('cluster_disk_nodes') }
end
end

describe 'manages configuration directory correctly' do
it { should contain_file('/etc/rabbitmq').with(
'ensure' => 'directory'
Expand Down

0 comments on commit b377b82

Please sign in to comment.