From 3690af9758412400c361e474c4fe84657fc7e7c7 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 10 Feb 2019 12:47:52 +0100 Subject: [PATCH] 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: I5644b1b2e8c0c90ed1de91631cbfc2cd1a9ddd07 --- manifests/config.pp | 4 ++-- manifests/db/mysql.pp | 2 +- manifests/policy.pp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index d6c3b456..51465d3a 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -30,8 +30,8 @@ class aodh::config ( include ::aodh::deps - validate_hash($aodh_config) - validate_hash($aodh_api_paste_ini) + validate_legacy(Hash, 'validate_hash', $aodh_config) + validate_legacy(Hash, 'validate_hash', $aodh_api_paste_ini) create_resources('aodh_config', $aodh_config) create_resources('aodh_api_paste_ini', $aodh_api_paste_ini) diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 0b908c94..c1918796 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -45,7 +45,7 @@ class aodh::db::mysql( include ::aodh::deps - validate_string($password) + validate_legacy(String, 'validate_string', $password) ::openstacklib::db::mysql { 'aodh': user => $user, diff --git a/manifests/policy.pp b/manifests/policy.pp index 1e2b7c3c..5537818f 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -31,7 +31,7 @@ class aodh::policy ( include ::aodh::deps include ::aodh::params - validate_hash($policies) + validate_legacy(Hash, 'validate_hash', $policies) Openstacklib::Policy::Base { file_path => $policy_path,