Merge "replace validate_legacy with proper data types"

This commit is contained in:
Zuul 2023-06-16 22:16:49 +00:00 committed by Gerrit Code Review
commit 2079fb1ff5
7 changed files with 15 additions and 36 deletions

View File

@ -257,7 +257,7 @@ class barbican::api (
$enabled_secretstore_plugins = $facts['os_service_default'],
$enabled_crypto_plugins = $facts['os_service_default'],
$enabled_secret_stores = 'simple_crypto',
$multiple_secret_stores_enabled = false,
Boolean $multiple_secret_stores_enabled = false,
$enabled_certificate_plugins = $facts['os_service_default'],
$enabled_certificate_event_plugins = $facts['os_service_default'],
$kombu_ssl_ca_certs = $facts['os_service_default'],
@ -268,9 +268,9 @@ class barbican::api (
$kombu_failover_strategy = $facts['os_service_default'],
$kombu_compression = $facts['os_service_default'],
$auth_strategy = 'keystone',
$manage_service = true,
$enabled = true,
$sync_db = true,
Boolean $manage_service = true,
Boolean $enabled = true,
Boolean $sync_db = true,
$db_auto_create = $facts['os_service_default'],
$service_name = $::barbican::params::api_service_name,
$enable_proxy_headers_parsing = $facts['os_service_default'],
@ -284,11 +284,6 @@ class barbican::api (
include barbican::client
include barbican::policy
validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled)
validate_legacy(Boolean, 'validate_bool', $sync_db)
validate_legacy(Boolean, 'validate_bool', $multiple_secret_stores_enabled)
package { 'barbican-api':
ensure => $package_ensure,
name => $::barbican::params::api_package_name,

View File

@ -27,15 +27,12 @@
# or Puppet catalog compilation will fail with duplicate resources.
#
class barbican::config (
$api_config = {},
$api_paste_ini_config = {},
Hash $api_config = {},
Hash $api_paste_ini_config = {},
) {
include barbican::deps
validate_legacy(Hash, 'validate_hash', $api_config)
validate_legacy(Hash, 'validate_hash', $api_paste_ini_config)
create_resources('barbican_config', $api_config)
create_resources('barbican_api_paste_ini', $api_paste_ini_config)
}

View File

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

View File

@ -39,14 +39,12 @@ class barbican::keystone::notification (
$keystone_notification_allow_requeue = $facts['os_service_default'],
$keystone_notification_thread_pool_size = $facts['os_service_default'],
$package_ensure = 'present',
$manage_service = true,
Boolean $manage_service = true,
) {
include barbican::deps
include barbican::params
validate_legacy(Boolean, 'validate_bool', $manage_service)
barbican_config {
'keystone_notifications/enable': value => $enable_keystone_notification;
'keystone_notifications/control_exchange': value => $keystone_notification_control_exchange;
@ -64,8 +62,7 @@ class barbican::keystone::notification (
if is_service_default($enable_keystone_notification) {
$service_enabled = false
} else {
validate_legacy(Boolean, 'validate_bool', $enable_keystone_notification)
$service_enabled = $enable_keystone_notification
$service_enabled = Boolean($enable_keystone_notification)
}
if $manage_service {

View File

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

View File

@ -26,8 +26,8 @@
#
class barbican::retry_scheduler (
$package_ensure = 'present',
$manage_service = true,
$enabled = true,
Boolean $manage_service = true,
Boolean $enabled = true,
$initial_delay_seconds = $facts['os_service_default'],
$periodic_interval_max_seconds = $facts['os_service_default'],
){
@ -35,9 +35,6 @@ class barbican::retry_scheduler (
include barbican::deps
include barbican::params
validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled)
barbican_config {
'retry_scheduler/initial_delay_seconds': value => $initial_delay_seconds;
'retry_scheduler/periodic_interval_max_seconds': value => $periodic_interval_max_seconds;

View File

@ -34,16 +34,13 @@
# Defaults to true
#
class barbican::worker (
$package_ensure = 'present',
$manage_service = true,
$enabled = true,
$package_ensure = 'present',
Boolean $manage_service = true,
Boolean $enabled = true,
) inherits barbican::params {
include barbican::deps
validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled)
package { 'barbican-worker':
ensure => $package_ensure,
name => $::barbican::params::worker_package_name,