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: If25820ad85e763246d90954a80db86763ed9e9c5
This commit is contained in:
parent
e66ca58657
commit
916bbb41e7
@ -26,7 +26,7 @@ class tacker::config (
|
||||
|
||||
include ::tacker::deps
|
||||
|
||||
validate_hash($tacker_config)
|
||||
validate_legacy(Hash, 'validate_hash', $tacker_config)
|
||||
|
||||
create_resources('tacker_config', $tacker_config)
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ class tacker::db (
|
||||
|
||||
include ::tacker::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 { 'tacker_config':
|
||||
db_max_retries => $database_db_max_retries,
|
||||
|
@ -45,7 +45,7 @@ class tacker::db::mysql(
|
||||
|
||||
include ::tacker::deps
|
||||
|
||||
validate_string($password)
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql { 'tacker':
|
||||
user => $user,
|
||||
|
@ -31,7 +31,7 @@ class tacker::policy (
|
||||
include ::tacker::deps
|
||||
include ::tacker::params
|
||||
|
||||
validate_hash($policies)
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
Openstacklib::Policy::Base {
|
||||
file_path => $policy_path,
|
||||
|
Loading…
Reference in New Issue
Block a user