From 1d09cd4cc048a8a1958f3bf7bc5ee8a9e4617455 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Tue, 19 Dec 2017 10:26:17 -0600 Subject: [PATCH] WRS: Patch3: 0003-Eliminate-Puppet-4-deprecation-warnings.patch --- manifests/init.pp | 49 ++++++++++--------------------------------------- manifests/params.pp | 16 ++++++++-------- metadata.json | 1 - 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 3451599..7808464 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,11 +17,11 @@ class rabbitmq( Stdlib::Absolutepath $env_config_path = $rabbitmq::params::env_config_path, Optional[String] $erlang_cookie = $rabbitmq::params::erlang_cookie, $interface = $rabbitmq::params::interface, - $management_port = $rabbitmq::params::management_port, + Integer[1, 65535] $management_port = $rabbitmq::params::management_port, $management_ssl = $rabbitmq::params::management_ssl, Optional[String] $management_hostname = $rabbitmq::params::management_hostname, String $node_ip_address = $rabbitmq::params::node_ip_address, - $package_apt_pin = $rabbitmq::params::package_apt_pin, + Optional[Variant[Numeric, String]] $package_apt_pin = $rabbitmq::params::package_apt_pin, String $package_ensure = $rabbitmq::params::package_ensure, String $package_gpg_key = $rabbitmq::params::package_gpg_key, String $package_name = $rabbitmq::params::package_name, @@ -33,7 +33,7 @@ class rabbitmq( $rabbitmq_user = $rabbitmq::params::rabbitmq_user, $rabbitmq_group = $rabbitmq::params::rabbitmq_group, $rabbitmq_home = $rabbitmq::params::rabbitmq_home, - $port = $rabbitmq::params::port, + Integer $port = $rabbitmq::params::port, Boolean $tcp_keepalive = $rabbitmq::params::tcp_keepalive, Integer $tcp_backlog = $rabbitmq::params::tcp_backlog, Optional[Integer] $tcp_sndbuf = $rabbitmq::params::tcp_sndbuf, @@ -49,10 +49,10 @@ class rabbitmq( String $ssl_key = $rabbitmq::params::ssl_key, Optional[Integer] $ssl_depth = $rabbitmq::params::ssl_depth, Optional[String] $ssl_cert_password = $rabbitmq::params::ssl_cert_password, - $ssl_port = $rabbitmq::params::ssl_port, + Integer[1, 65535] $ssl_port = $rabbitmq::params::ssl_port, $ssl_interface = $rabbitmq::params::ssl_interface, - $ssl_management_port = $rabbitmq::params::ssl_management_port, - $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port, + Integer[1, 65535] $ssl_management_port = $rabbitmq::params::ssl_management_port, + Integer[1, 65535] $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port, $ssl_verify = $rabbitmq::params::ssl_verify, $ssl_fail_if_no_peer_cert = $rabbitmq::params::ssl_fail_if_no_peer_cert, Optional[Array] $ssl_versions = $rabbitmq::params::ssl_versions, @@ -63,15 +63,15 @@ class rabbitmq( String $ldap_user_dn_pattern = $rabbitmq::params::ldap_user_dn_pattern, String $ldap_other_bind = $rabbitmq::params::ldap_other_bind, Boolean $ldap_use_ssl = $rabbitmq::params::ldap_use_ssl, - $ldap_port = $rabbitmq::params::ldap_port, + Integer[1, 65535] $ldap_port = $rabbitmq::params::ldap_port, Boolean $ldap_log = $rabbitmq::params::ldap_log, Hash $ldap_config_variables = $rabbitmq::params::ldap_config_variables, - $stomp_port = $rabbitmq::params::stomp_port, + Integer[1, 65535] $stomp_port = $rabbitmq::params::stomp_port, Boolean $stomp_ssl_only = $rabbitmq::params::stomp_ssl_only, - $version = $rabbitmq::params::version, + Optional[String] $version = $rabbitmq::params::version, Boolean $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change, $cluster_partition_handling = $rabbitmq::params::cluster_partition_handling, - $file_limit = $rabbitmq::params::file_limit, + Variant[Integer[-1,], Enum['unlimited', 'infinity']] $file_limit = $rabbitmq::params::file_limit, Hash $environment_variables = $rabbitmq::params::environment_variables, Hash $config_variables = $rabbitmq::params::config_variables, Hash $config_kernel_variables = $rabbitmq::params::config_kernel_variables, @@ -85,35 +85,6 @@ class rabbitmq( Stdlib::Absolutepath $inetrc_config_path = $rabbitmq::params::inetrc_config_path, ) inherits rabbitmq::params { - # Validate install parameters. - validate_re($package_apt_pin, '^(|\d+)$') - validate_re($version, '^\d+\.\d+\.\d+(-\d+)*$') # Allow 3 digits and optional -n postfix. - # Validate config parameters. - if ! is_integer($management_port) { - validate_re($management_port, '\d+') - } - if ! is_integer($port) { - validate_re($port, ['\d+','UNSET']) - } - if ! is_integer($stomp_port) { - validate_re($stomp_port, '\d+') - } - - # using sprintf for conversion to string, because "${file_limit}" doesn't - # pass lint, despite being nicer - validate_re(sprintf('%s', $file_limit), - '^(\d+|-1|unlimited|infinity)$', '$file_limit must be a positive integer, \'-1\', \'unlimited\', or \'infinity\'.') - if ! is_integer($ssl_port) { - validate_re($ssl_port, '\d+') - } - if ! is_integer($ssl_management_port) { - validate_re($ssl_management_port, '\d+') - } - if ! is_integer($ssl_stomp_port) { - validate_re($ssl_stomp_port, '\d+') - } - validate_re($ldap_port, '\d+') - if $ssl_only and ! $ssl { fail('$ssl_only => true requires that $ssl => true') } diff --git a/manifests/params.pp b/manifests/params.pp index da0d2b4..d5ef906 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -68,7 +68,7 @@ class rabbitmq::params { #install $admin_enable = true $management_hostname = undef - $management_port = '15672' + $management_port = 15672 $management_ssl = true $package_apt_pin = '' $package_gpg_key = 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc' @@ -94,7 +94,7 @@ class rabbitmq::params { $erlang_cookie = undef $interface = 'UNSET' $node_ip_address = 'UNSET' - $port = '5672' + $port = 5672 $tcp_keepalive = false $tcp_backlog = 128 $tcp_sndbuf = undef @@ -107,10 +107,10 @@ class rabbitmq::params { $ssl_key = 'UNSET' $ssl_depth = undef $ssl_cert_password = undef - $ssl_port = '5671' + $ssl_port = 5671 $ssl_interface = 'UNSET' - $ssl_management_port = '15671' - $ssl_stomp_port = '6164' + $ssl_management_port = 15671 + $ssl_stomp_port = 6164 $ssl_verify = 'verify_none' $ssl_fail_if_no_peer_cert = false $ssl_versions = undef @@ -121,10 +121,10 @@ class rabbitmq::params { $ldap_user_dn_pattern = 'cn=username,ou=People,dc=example,dc=com' $ldap_other_bind = 'anon' $ldap_use_ssl = false - $ldap_port = '389' + $ldap_port = 389 $ldap_log = false $ldap_config_variables = {} - $stomp_port = '6163' + $stomp_port = 6163 $stomp_ssl_only = false $wipe_db_on_cookie_change = false $cluster_partition_handling = 'ignore' @@ -134,7 +134,7 @@ class rabbitmq::params { $config_management_variables = {} $config_additional_variables = {} $auth_backends = undef - $file_limit = '16384' + $file_limit = 16384 $collect_statistics_interval = undef $ipv6 = false $inetrc_config = 'rabbitmq/inetrc.erb' diff --git a/metadata.json b/metadata.json index 5803cf5..b3426f6 100644 --- a/metadata.json +++ b/metadata.json @@ -48,7 +48,6 @@ ], "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 3.13.1 < 5.0.0"}, - {"name":"puppetlabs/apt","version_requirement":">= 1.8.0 < 5.0.0"}, {"name":"puppet/staging","version_requirement":">= 0.3.1 < 2.0.0"} ] } -- 1.8.3.1