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: I4da049ff59fd71403f4d00cfad8c5f56041e1e6e
This commit is contained in:
parent
a1a3c25c4a
commit
52f9b4c5f7
@ -38,10 +38,10 @@ class murano::config (
|
||||
|
||||
include ::murano::deps
|
||||
|
||||
validate_hash($murano_config)
|
||||
validate_hash($murano_cfapi_config)
|
||||
validate_hash($murano_paste_config)
|
||||
validate_hash($murano_cfapi_paste_config)
|
||||
validate_legacy(Hash, 'validate_hash', $murano_config)
|
||||
validate_legacy(Hash, 'validate_hash', $murano_cfapi_config)
|
||||
validate_legacy(Hash, 'validate_hash', $murano_paste_config)
|
||||
validate_legacy(Hash, 'validate_hash', $murano_cfapi_paste_config)
|
||||
|
||||
create_resources('murano_config', $murano_config)
|
||||
create_resources('murano_cfapi_config', $murano_cfapi_config)
|
||||
|
@ -66,7 +66,8 @@ class murano::db (
|
||||
$database_retry_interval_real = pick($::murano::database_retry_interval, $database_retry_interval)
|
||||
$database_max_overflow_real = pick($::murano::database_max_overflow, $database_max_overflow)
|
||||
|
||||
validate_re($database_connection_real, '^(mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?')
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection_real,
|
||||
['^(mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
|
||||
oslo::db { 'murano_config':
|
||||
connection => $database_connection_real,
|
||||
|
@ -44,7 +44,7 @@ class murano::db::mysql(
|
||||
|
||||
include ::murano::deps
|
||||
|
||||
validate_string($password)
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql{ 'murano':
|
||||
user => $user,
|
||||
|
@ -44,7 +44,7 @@ class murano::db::mysql_cfapi(
|
||||
|
||||
include ::murano::deps
|
||||
|
||||
validate_string($password)
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql{ 'murano_cfapi':
|
||||
user => $user,
|
||||
|
@ -34,7 +34,7 @@ class murano::db::postgresql(
|
||||
|
||||
include ::murano::deps
|
||||
|
||||
validate_string($password)
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::postgresql { 'murano':
|
||||
password_hash => postgresql_password($user, $password),
|
||||
|
@ -34,7 +34,7 @@ class murano::db::postgresql_cfapi(
|
||||
|
||||
include ::murano::deps
|
||||
|
||||
validate_string($password)
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::postgresql { 'murano_cfapi':
|
||||
password_hash => postgresql_password($user, $password),
|
||||
|
@ -53,7 +53,8 @@ class murano::db_cfapi (
|
||||
|
||||
if !is_service_default($database_connection) {
|
||||
|
||||
validate_re($database_connection, '^(mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?')
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection,
|
||||
['^(mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
|
||||
oslo::db { 'murano_cfapi_config':
|
||||
connection => $database_connection,
|
||||
|
@ -310,7 +310,7 @@ class murano(
|
||||
include ::murano::policy
|
||||
include ::murano::db
|
||||
|
||||
validate_string($admin_password)
|
||||
validate_legacy(String, 'validate_string', $admin_password)
|
||||
|
||||
package { 'murano-common':
|
||||
ensure => $package_ensure,
|
||||
|
@ -31,7 +31,7 @@ class murano::policy (
|
||||
include ::murano::deps
|
||||
include ::murano::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