Merge "replace validate_legacy with proper data types"
This commit is contained in:
commit
2079fb1ff5
@ -257,7 +257,7 @@ class barbican::api (
|
|||||||
$enabled_secretstore_plugins = $facts['os_service_default'],
|
$enabled_secretstore_plugins = $facts['os_service_default'],
|
||||||
$enabled_crypto_plugins = $facts['os_service_default'],
|
$enabled_crypto_plugins = $facts['os_service_default'],
|
||||||
$enabled_secret_stores = 'simple_crypto',
|
$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_plugins = $facts['os_service_default'],
|
||||||
$enabled_certificate_event_plugins = $facts['os_service_default'],
|
$enabled_certificate_event_plugins = $facts['os_service_default'],
|
||||||
$kombu_ssl_ca_certs = $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_failover_strategy = $facts['os_service_default'],
|
||||||
$kombu_compression = $facts['os_service_default'],
|
$kombu_compression = $facts['os_service_default'],
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$enabled = true,
|
Boolean $enabled = true,
|
||||||
$sync_db = true,
|
Boolean $sync_db = true,
|
||||||
$db_auto_create = $facts['os_service_default'],
|
$db_auto_create = $facts['os_service_default'],
|
||||||
$service_name = $::barbican::params::api_service_name,
|
$service_name = $::barbican::params::api_service_name,
|
||||||
$enable_proxy_headers_parsing = $facts['os_service_default'],
|
$enable_proxy_headers_parsing = $facts['os_service_default'],
|
||||||
@ -284,11 +284,6 @@ class barbican::api (
|
|||||||
include barbican::client
|
include barbican::client
|
||||||
include barbican::policy
|
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':
|
package { 'barbican-api':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
name => $::barbican::params::api_package_name,
|
name => $::barbican::params::api_package_name,
|
||||||
|
@ -27,15 +27,12 @@
|
|||||||
# or Puppet catalog compilation will fail with duplicate resources.
|
# or Puppet catalog compilation will fail with duplicate resources.
|
||||||
#
|
#
|
||||||
class barbican::config (
|
class barbican::config (
|
||||||
$api_config = {},
|
Hash $api_config = {},
|
||||||
$api_paste_ini_config = {},
|
Hash $api_paste_ini_config = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include barbican::deps
|
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_config', $api_config)
|
||||||
create_resources('barbican_api_paste_ini', $api_paste_ini_config)
|
create_resources('barbican_api_paste_ini', $api_paste_ini_config)
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
# Defaults to 'utf8_general_ci'
|
# Defaults to 'utf8_general_ci'
|
||||||
#
|
#
|
||||||
class barbican::db::mysql(
|
class barbican::db::mysql(
|
||||||
$password,
|
String[1] $password,
|
||||||
$dbname = 'barbican',
|
$dbname = 'barbican',
|
||||||
$user = 'barbican',
|
$user = 'barbican',
|
||||||
$host = '127.0.0.1',
|
$host = '127.0.0.1',
|
||||||
@ -45,8 +45,6 @@ class barbican::db::mysql(
|
|||||||
|
|
||||||
include barbican::deps
|
include barbican::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
|
||||||
|
|
||||||
openstacklib::db::mysql { 'barbican':
|
openstacklib::db::mysql { 'barbican':
|
||||||
user => $user,
|
user => $user,
|
||||||
password => $password,
|
password => $password,
|
||||||
|
@ -39,14 +39,12 @@ class barbican::keystone::notification (
|
|||||||
$keystone_notification_allow_requeue = $facts['os_service_default'],
|
$keystone_notification_allow_requeue = $facts['os_service_default'],
|
||||||
$keystone_notification_thread_pool_size = $facts['os_service_default'],
|
$keystone_notification_thread_pool_size = $facts['os_service_default'],
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include barbican::deps
|
include barbican::deps
|
||||||
include barbican::params
|
include barbican::params
|
||||||
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
|
||||||
|
|
||||||
barbican_config {
|
barbican_config {
|
||||||
'keystone_notifications/enable': value => $enable_keystone_notification;
|
'keystone_notifications/enable': value => $enable_keystone_notification;
|
||||||
'keystone_notifications/control_exchange': value => $keystone_notification_control_exchange;
|
'keystone_notifications/control_exchange': value => $keystone_notification_control_exchange;
|
||||||
@ -64,8 +62,7 @@ class barbican::keystone::notification (
|
|||||||
if is_service_default($enable_keystone_notification) {
|
if is_service_default($enable_keystone_notification) {
|
||||||
$service_enabled = false
|
$service_enabled = false
|
||||||
} else {
|
} else {
|
||||||
validate_legacy(Boolean, 'validate_bool', $enable_keystone_notification)
|
$service_enabled = Boolean($enable_keystone_notification)
|
||||||
$service_enabled = $enable_keystone_notification
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if $manage_service {
|
if $manage_service {
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
class barbican::policy (
|
class barbican::policy (
|
||||||
$enforce_scope = $facts['os_service_default'],
|
$enforce_scope = $facts['os_service_default'],
|
||||||
$enforce_new_defaults = $facts['os_service_default'],
|
$enforce_new_defaults = $facts['os_service_default'],
|
||||||
$policies = {},
|
Hash $policies = {},
|
||||||
$policy_path = '/etc/barbican/policy.yaml',
|
$policy_path = '/etc/barbican/policy.yaml',
|
||||||
$policy_default_rule = $facts['os_service_default'],
|
$policy_default_rule = $facts['os_service_default'],
|
||||||
$policy_dirs = $facts['os_service_default'],
|
$policy_dirs = $facts['os_service_default'],
|
||||||
@ -58,8 +58,6 @@ class barbican::policy (
|
|||||||
include barbican::deps
|
include barbican::deps
|
||||||
include barbican::params
|
include barbican::params
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $policies)
|
|
||||||
|
|
||||||
$policy_parameters = {
|
$policy_parameters = {
|
||||||
policies => $policies,
|
policies => $policies,
|
||||||
policy_path => $policy_path,
|
policy_path => $policy_path,
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
#
|
#
|
||||||
class barbican::retry_scheduler (
|
class barbican::retry_scheduler (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$enabled = true,
|
Boolean $enabled = true,
|
||||||
$initial_delay_seconds = $facts['os_service_default'],
|
$initial_delay_seconds = $facts['os_service_default'],
|
||||||
$periodic_interval_max_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::deps
|
||||||
include barbican::params
|
include barbican::params
|
||||||
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
|
||||||
|
|
||||||
barbican_config {
|
barbican_config {
|
||||||
'retry_scheduler/initial_delay_seconds': value => $initial_delay_seconds;
|
'retry_scheduler/initial_delay_seconds': value => $initial_delay_seconds;
|
||||||
'retry_scheduler/periodic_interval_max_seconds': value => $periodic_interval_max_seconds;
|
'retry_scheduler/periodic_interval_max_seconds': value => $periodic_interval_max_seconds;
|
||||||
|
@ -34,16 +34,13 @@
|
|||||||
# Defaults to true
|
# Defaults to true
|
||||||
#
|
#
|
||||||
class barbican::worker (
|
class barbican::worker (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$enabled = true,
|
Boolean $enabled = true,
|
||||||
) inherits barbican::params {
|
) inherits barbican::params {
|
||||||
|
|
||||||
include barbican::deps
|
include barbican::deps
|
||||||
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
|
||||||
|
|
||||||
package { 'barbican-worker':
|
package { 'barbican-worker':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
name => $::barbican::params::worker_package_name,
|
name => $::barbican::params::worker_package_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user