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: I96d77730bcf2024cfef133153846f36dec905088
This commit is contained in:
parent
865209bd1b
commit
b9c9e5b166
@ -26,7 +26,7 @@ class senlin::config (
|
||||
|
||||
include ::senlin::deps
|
||||
|
||||
validate_hash($senlin_config)
|
||||
validate_legacy(Hash, 'validate_hash', $senlin_config)
|
||||
|
||||
create_resources('senlin_config', $senlin_config)
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ class senlin::db (
|
||||
|
||||
include ::senlin::deps
|
||||
|
||||
validate_re($database_connection,
|
||||
'^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?')
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection,
|
||||
['^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
|
||||
oslo::db { 'senlin_config':
|
||||
connection => $database_connection,
|
||||
|
@ -45,7 +45,7 @@ class senlin::db::mysql(
|
||||
|
||||
include ::senlin::deps
|
||||
|
||||
validate_string($password)
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql { 'senlin':
|
||||
user => $user,
|
||||
|
@ -31,7 +31,7 @@ class senlin::policy (
|
||||
include ::senlin::deps
|
||||
include ::senlin::params
|
||||
|
||||
validate_hash($policies)
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
Openstacklib::Policy::Base {
|
||||
file_path => $policy_path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user