Add strict validation about boolean parameters
This ensures the parameters used by if-else logic accept only boolean values because non-boolean can result in unexpected behavior. Change-Id: I963d73e46f82a780486fa282b424151485e43d1e
This commit is contained in:
parent
729f5d286c
commit
578e24a0b9
@ -284,6 +284,11 @@ 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,
|
||||||
|
@ -35,6 +35,9 @@ 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;
|
||||||
|
@ -41,6 +41,9 @@ class barbican::worker (
|
|||||||
|
|
||||||
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