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: Ie623d7ae68a0ad58ed8a60e06abc906ebdfac0c4
This commit is contained in:
parent
76de1bcc95
commit
6795430c5a
|
@ -26,7 +26,7 @@ class mistral::config (
|
||||||
|
|
||||||
include ::mistral::deps
|
include ::mistral::deps
|
||||||
|
|
||||||
validate_hash($mistral_config)
|
validate_legacy(Hash, 'validate_hash', $mistral_config)
|
||||||
|
|
||||||
create_resources('mistral_config', $mistral_config)
|
create_resources('mistral_config', $mistral_config)
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,8 +66,8 @@ class mistral::db (
|
||||||
$database_retry_interval_real = pick($::mistral::database_retry_interval,$database_retry_interval)
|
$database_retry_interval_real = pick($::mistral::database_retry_interval,$database_retry_interval)
|
||||||
$database_max_overflow_real = pick($::mistral::database_max_overflow,$database_max_overflow)
|
$database_max_overflow_real = pick($::mistral::database_max_overflow,$database_max_overflow)
|
||||||
|
|
||||||
validate_re($database_connection_real,
|
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection_real,
|
||||||
'^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?')
|
['^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||||
|
|
||||||
oslo::db { 'mistral_config':
|
oslo::db { 'mistral_config':
|
||||||
connection => $database_connection_real,
|
connection => $database_connection_real,
|
||||||
|
|
|
@ -45,7 +45,7 @@ class mistral::db::mysql(
|
||||||
|
|
||||||
include ::mistral::deps
|
include ::mistral::deps
|
||||||
|
|
||||||
validate_string($password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
::openstacklib::db::mysql { 'mistral':
|
::openstacklib::db::mysql { 'mistral':
|
||||||
user => $user,
|
user => $user,
|
||||||
|
|
|
@ -83,7 +83,7 @@ class mistral::keystone::auth(
|
||||||
|
|
||||||
include ::mistral::deps
|
include ::mistral::deps
|
||||||
|
|
||||||
validate_string($password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
keystone::resource::service_identity { 'mistral':
|
keystone::resource::service_identity { 'mistral':
|
||||||
configure_user => $configure_user,
|
configure_user => $configure_user,
|
||||||
|
|
|
@ -31,7 +31,7 @@ class mistral::policy (
|
||||||
include ::mistral::deps
|
include ::mistral::deps
|
||||||
include ::mistral::params
|
include ::mistral::params
|
||||||
|
|
||||||
validate_hash($policies)
|
validate_legacy(Hash, 'validate_hash', $policies)
|
||||||
|
|
||||||
Openstacklib::Policy::Base {
|
Openstacklib::Policy::Base {
|
||||||
file_path => $policy_path,
|
file_path => $policy_path,
|
||||||
|
|
Loading…
Reference in New Issue