replace validate_legacy with proper data types

the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Change-Id: I497fca8249bbf67f26c0840f362b1297339964e6
This commit is contained in:
Takashi Kajinami 2023-06-20 22:21:20 +09:00
parent 07a13a0c2d
commit e9d004c0d1
9 changed files with 17 additions and 39 deletions

View File

@ -63,8 +63,8 @@ class mistral::api (
$api_workers = $facts['os_workers'],
$bind_host = $facts['os_service_default'],
$bind_port = $facts['os_service_default'],
$enabled = true,
$manage_service = true,
Boolean $enabled = true,
Boolean $manage_service = true,
$package_ensure = present,
$service_name = $::mistral::params::api_service_name,
$enable_proxy_headers_parsing = $facts['os_service_default'],
@ -76,9 +76,6 @@ class mistral::api (
include mistral::params
include mistral::policy
validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled)
if $auth_strategy == 'keystone' {
include mistral::keystone::authtoken
}

View File

@ -21,12 +21,10 @@
# or Puppet catalog compilation will fail with duplicate resources.
#
class mistral::config (
$mistral_config = {},
Hash $mistral_config = {},
) {
include mistral::deps
validate_legacy(Hash, 'validate_hash', $mistral_config)
create_resources('mistral_config', $mistral_config)
}

View File

@ -34,7 +34,7 @@
# Defaults to 'utf8_general_ci'
#
class mistral::db::mysql(
$password,
String[1] $password,
$dbname = 'mistral',
$user = 'mistral',
$host = '127.0.0.1',
@ -45,8 +45,6 @@ class mistral::db::mysql(
include mistral::deps
validate_legacy(String, 'validate_string', $password)
::openstacklib::db::mysql { 'mistral':
user => $user,
password => $password,

View File

@ -54,8 +54,8 @@
#
class mistral::engine (
$package_ensure = present,
$manage_service = true,
$enabled = true,
Boolean $manage_service = true,
Boolean $enabled = true,
$host = $facts['os_service_default'],
$topic = $facts['os_service_default'],
$version = $facts['os_service_default'],
@ -69,9 +69,6 @@ class mistral::engine (
include mistral::deps
include mistral::params
validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled)
package { 'mistral-engine':
ensure => $package_ensure,
name => $::mistral::params::engine_package_name,

View File

@ -30,8 +30,8 @@
#
class mistral::event_engine (
$package_ensure = present,
$manage_service = true,
$enabled = true,
Boolean $manage_service = true,
Boolean $enabled = true,
$host = $facts['os_service_default'],
$topic = $facts['os_service_default'],
$event_definitions_cfg_file = $facts['os_service_default'],
@ -40,9 +40,6 @@ class mistral::event_engine (
include mistral::deps
include mistral::params
validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled)
package { 'mistral-event-engine':
ensure => $package_ensure,
name => $::mistral::params::event_engine_package_name,

View File

@ -29,20 +29,17 @@
# Defaults to $facts['os_service_default'].
#
class mistral::executor (
$package_ensure = present,
$manage_service = true,
$enabled = true,
$host = $facts['os_service_default'],
$topic = $facts['os_service_default'],
$version = $facts['os_service_default'],
$package_ensure = present,
Boolean $manage_service = true,
Boolean $enabled = true,
$host = $facts['os_service_default'],
$topic = $facts['os_service_default'],
$version = $facts['os_service_default'],
) {
include mistral::deps
include mistral::params
validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled)
package { 'mistral-executor':
ensure => $package_ensure,
name => $::mistral::params::executor_package_name,

View File

@ -176,7 +176,7 @@ class mistral(
$kombu_reconnect_delay = $facts['os_service_default'],
$amqp_durable_queues = $facts['os_service_default'],
$purge_config = false,
$sync_db = true,
Boolean $sync_db = true,
$max_missed_heartbeats = $facts['os_service_default'],
$check_interval = $facts['os_service_default'],
$first_heartbeat_timeout = $facts['os_service_default'],
@ -186,8 +186,6 @@ class mistral(
include mistral::params
include mistral::db
validate_legacy(Boolean, 'validate_bool', $sync_db)
package { 'mistral-common':
ensure => $package_ensure,
name => $::mistral::params::common_package_name,

View File

@ -76,7 +76,7 @@
# Defaults to true
#
class mistral::keystone::auth(
$password,
String[1] $password,
$email = 'mistral@localhost',
$auth_name = 'mistral',
$service_name = 'mistral',
@ -98,8 +98,6 @@ class mistral::keystone::auth(
include mistral::deps
validate_legacy(String, 'validate_string', $password)
Keystone::Resource::Service_identity['mistral'] -> Anchor['mistral::service::end']
keystone::resource::service_identity { 'mistral':

View File

@ -48,7 +48,7 @@
class mistral::policy (
$enforce_scope = $facts['os_service_default'],
$enforce_new_defaults = $facts['os_service_default'],
$policies = {},
Hash $policies = {},
$policy_path = '/etc/mistral/policy.yaml',
$policy_default_rule = $facts['os_service_default'],
$policy_dirs = $facts['os_service_default'],
@ -58,8 +58,6 @@ class mistral::policy (
include mistral::deps
include mistral::params
validate_legacy(Hash, 'validate_hash', $policies)
$policy_parameters = {
policies => $policies,
policy_path => $policy_path,