Use validate_legacy
This changes all the puppet 3 validate_* functions to use the validate_legacy function. The validate_legacy function has been available since about three years but require Puppet >= 4.4.0 and since there is Puppet 4.10.12 as latest we should assume people are running a fairly new Puppet 4 version. This is the first step to then remove all validate function calls and use proper types for parameter as described in spec [1]. [1] https://review.openstack.org/#/c/568929/ Change-Id: Ie05d6e6222224470450637f16691f933085e6520
This commit is contained in:
parent
b6228764a1
commit
fd5b7c4ec6
|
@ -188,15 +188,16 @@ class qdr(
|
|||
$router_worker_threads = $::os_workers,
|
||||
) inherits qdr::params {
|
||||
|
||||
validate_absolute_path($router_debug_dump)
|
||||
validate_absolute_path($router_sasl_path)
|
||||
validate_string($router_sasl_name)
|
||||
validate_re($router_mode,'^(standalone$|edge$|interior$)')
|
||||
validate_string($router_id)
|
||||
validate_string($listener_addr)
|
||||
validate_re($listener_port, '\d+')
|
||||
validate_re($listener_auth_peer,'^(yes$|no$)')
|
||||
validate_string($listener_sasl_mech)
|
||||
validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $router_debug_dump)
|
||||
validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $router_sasl_path)
|
||||
validate_legacy(String, 'validate_string', $router_sasl_name)
|
||||
validate_legacy(Enum['standalone', 'edge', 'interior'], 'validate_re', $router_mode,
|
||||
['^(standalone$|edge$|interior$)'])
|
||||
validate_legacy(String, 'validate_string', $router_id)
|
||||
validate_legacy(String, 'validate_string', $listener_addr)
|
||||
validate_legacy(Integer, 'validate_re', $listener_port, ['\d+'])
|
||||
validate_legacy(Enum['yes', 'no'], 'validate_re', $listener_auth_peer, ['^(yes$|no$)'])
|
||||
validate_legacy(String, 'validate_string', $listener_sasl_mech)
|
||||
|
||||
# TODO (ansmith) - manage repo via openstack-extras
|
||||
# if $::operatingsystem == 'Ubuntu' {
|
||||
|
|
Loading…
Reference in New Issue