Skip to content

Commit

Permalink
Remove deprecated parameters
Browse files Browse the repository at this point in the history
All parameters removed in this patch were deprecated prior to
3.0.0. It is time to let them go.
  • Loading branch information
Colleen Murphy committed Dec 22, 2014
1 parent 04145c1 commit 0c061fb
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 36 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ class { 'rabbitmq':

Boolean, if enabled sets up the management interface/plugin for RabbitMQ.

####`cluster_disk_nodes`

DEPRECATED AND REPLACED BY CLUSTER_NODES.

####`cluster_node_type`

Choose between disk and ram nodes.
Expand Down
9 changes: 0 additions & 9 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
class rabbitmq::config {

$admin_enable = $rabbitmq::admin_enable
$cluster_disk_nodes = $rabbitmq::cluster_disk_nodes
$cluster_node_type = $rabbitmq::cluster_node_type
$cluster_nodes = $rabbitmq::cluster_nodes
$config = $rabbitmq::config
Expand Down Expand Up @@ -45,14 +44,6 @@
# Handle env variables.
$environment_variables = merge($default_env_variables, $rabbitmq::environment_variables)

# Handle deprecated option.
if $cluster_disk_nodes != [] {
warning('The $cluster_disk_nodes is deprecated. Use $cluster_nodes instead.')
$r_cluster_nodes = $cluster_disk_nodes
} else {
$r_cluster_nodes = $cluster_nodes
}

file { '/etc/rabbitmq':
ensure => directory,
owner => '0',
Expand Down
2 changes: 0 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Main rabbitmq class
class rabbitmq(
$admin_enable = $rabbitmq::params::admin_enable,
$cluster_disk_nodes = $rabbitmq::params::cluster_disk_nodes,
$cluster_node_type = $rabbitmq::params::cluster_node_type,
$cluster_nodes = $rabbitmq::params::cluster_nodes,
$config = $rabbitmq::params::config,
Expand Down Expand Up @@ -67,7 +66,6 @@
validate_bool($repos_ensure)
validate_re($version, '^\d+\.\d+\.\d+(-\d+)*$') # Allow 3 digits and optional -n postfix.
# Validate config parameters.
validate_array($cluster_disk_nodes)
validate_re($cluster_node_type, '^(ram|disc|disk)$') # Both disc and disk are valid http://www.rabbitmq.com/clustering.html
validate_array($cluster_nodes)
validate_string($config)
Expand Down
1 change: 0 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
$service_ensure = 'running'
$service_manage = true
#config
$cluster_disk_nodes = []
$cluster_node_type = 'disc'
$cluster_nodes = []
$config = 'rabbitmq/rabbitmq.config.erb'
Expand Down
20 changes: 1 addition & 19 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# [*config*] - contents of config file
# [*env_config*] - contents of env-config file
# [*config_cluster*] - whether to configure a RabbitMQ cluster
# [*config_mirrored_queues*] - DEPRECATED (doesn't do anything)
# [*cluster_disk_nodes*] - DEPRECATED (use cluster_nodes instead)
# [*cluster_nodes*] - which nodes to cluster with (including the current one)
# [*cluster_node_type*] - Type of cluster node (disc/disk or ram)
# [*erlang_cookie*] - erlang cookie, must be the same for all nodes in a cluster
Expand Down Expand Up @@ -45,30 +43,15 @@
$config_stomp = $rabbitmq::params::config_stomp,
$stomp_port = $rabbitmq::params::stomp_port,
$config_cluster = $rabbitmq::params::config_cluster,
$cluster_disk_nodes = $rabbitmq::params::cluster_disk_nodes,
$cluster_nodes = $rabbitmq::params::cluster_nodes,
$cluster_node_type = $rabbitmq::params::cluster_node_type,
$node_ip_address = $rabbitmq::params::node_ip_address,
$config = $rabbitmq::params::config,
$env_config = $rabbitmq::params::env_config,
$erlang_cookie = $rabbitmq::params::erlang_cookie,
$wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change,
# DEPRECATED
$manage_service = undef,
$config_mirrored_queues = undef,
) inherits rabbitmq::params {

if $manage_service != undef {
warning('The $manage_service parameter is deprecated; please use $service_manage instead')
$_service_manage = $manage_service
} else {
$_service_manage = $service_manage
}

if $config_mirrored_queues != undef {
warning('The $config_mirrored_queues parameter is deprecated; it does not affect anything')
}

anchor {'before::rabbimq::class':
before => Class['rabbitmq'],
}
Expand All @@ -84,11 +67,10 @@
version => $version,
service_name => $service_name,
service_ensure => $service_ensure,
service_manage => $_service_manage,
service_manage => $service_manage,
config_stomp => $config_stomp,
stomp_port => $stomp_port,
config_cluster => $config_cluster,
cluster_disk_nodes => $cluster_disk_nodes,
cluster_nodes => $cluster_nodes,
cluster_node_type => $cluster_node_type,
node_ip_address => $node_ip_address,
Expand Down
2 changes: 1 addition & 1 deletion templates/rabbitmq.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
<% end -%>
<% if @config_cluster -%>
{cluster_nodes, {[<%= @r_cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}},
{cluster_nodes, {[<%= @cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}},
{cluster_partition_handling, <%= @cluster_partition_handling %>},
<% end -%>
<%- if @tcp_keepalive -%>
Expand Down

0 comments on commit 0c061fb

Please sign in to comment.