Skip to content

Commit 1f9d70b

Browse files
committed
set date type validation for server and server database classes
1 parent 723693f commit 1f9d70b

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

manifests/server.pp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -370,16 +370,16 @@
370370
Boolean $manage_database = $puppetdb::params::manage_database,
371371
Hash $java_args = $puppetdb::params::java_args,
372372
Boolean $merge_default_java_args = $puppetdb::params::merge_default_java_args,
373-
Optional $max_threads = $puppetdb::params::max_threads,
374-
Optional $command_threads = $puppetdb::params::command_threads,
375-
Optional $concurrent_writes = $puppetdb::params::concurrent_writes,
376-
Optional $store_usage = $puppetdb::params::store_usage,
377-
Optional $temp_usage = $puppetdb::params::temp_usage,
378-
Optional $disable_update_checking = $puppetdb::params::disable_update_checking,
373+
Optional[Integer] $max_threads = $puppetdb::params::max_threads,
374+
Optional[Integer] $command_threads = $puppetdb::params::command_threads,
375+
Optional[Integer] $concurrent_writes = $puppetdb::params::concurrent_writes,
376+
Optional[Integer] $store_usage = $puppetdb::params::store_usage,
377+
Optional[Integer] $temp_usage = $puppetdb::params::temp_usage,
378+
Optional[Boolean] $disable_update_checking = $puppetdb::params::disable_update_checking,
379379
Stdlib::Absolutepath $certificate_whitelist_file = $puppetdb::params::certificate_whitelist_file,
380380
Array $certificate_whitelist = $puppetdb::params::certificate_whitelist,
381-
Optional $database_max_pool_size = $puppetdb::params::database_max_pool_size,
382-
Optional $read_database_max_pool_size = $puppetdb::params::read_database_max_pool_size,
381+
Optional[Variant[Integer, Enum['absent']]] $database_max_pool_size = $puppetdb::params::database_max_pool_size,
382+
Optional[Variant[Integer, Enum['absent']]] $read_database_max_pool_size = $puppetdb::params::read_database_max_pool_size,
383383
Boolean $automatic_dlo_cleanup = $puppetdb::params::automatic_dlo_cleanup,
384384
String[1] $cleanup_timer_interval = $puppetdb::params::cleanup_timer_interval,
385385
Integer[1] $dlo_max_age = $puppetdb::params::dlo_max_age,

manifests/server/database.pp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22
#
33
# @api private
44
class puppetdb::server::database (
5-
$database_host = $puppetdb::params::database_host,
6-
$database_port = $puppetdb::params::database_port,
7-
$database_username = $puppetdb::params::database_username,
8-
Variant[String[1], Sensitive[String[1]]] $database_password = $puppetdb::params::database_password,
9-
$database_name = $puppetdb::params::database_name,
10-
$manage_db_password = $puppetdb::params::manage_db_password,
11-
$jdbc_ssl_properties = $puppetdb::params::jdbc_ssl_properties,
12-
$database_validate = $puppetdb::params::database_validate,
13-
$node_ttl = $puppetdb::params::node_ttl,
14-
$node_purge_ttl = $puppetdb::params::node_purge_ttl,
15-
$report_ttl = $puppetdb::params::report_ttl,
16-
$facts_blacklist = $puppetdb::params::facts_blacklist,
17-
$gc_interval = $puppetdb::params::gc_interval,
18-
$node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
19-
$conn_max_age = $puppetdb::params::conn_max_age,
20-
$conn_lifetime = $puppetdb::params::conn_lifetime,
21-
$confdir = $puppetdb::params::confdir,
22-
$puppetdb_group = $puppetdb::params::puppetdb_group,
23-
$database_max_pool_size = $puppetdb::params::database_max_pool_size,
24-
$migrate = $puppetdb::params::migrate,
25-
$postgresql_ssl_on = $puppetdb::params::postgresql_ssl_on,
26-
$ssl_cert_path = $puppetdb::params::ssl_cert_path,
27-
$ssl_key_pk8_path = $puppetdb::params::ssl_key_pk8_path,
28-
$ssl_ca_cert_path = $puppetdb::params::ssl_ca_cert_path
5+
Stdlib::Host $database_host = $puppetdb::params::database_host,
6+
Variant[Stdlib::Port::Unprivileged, Pattern[/\A[0-9]+\Z/]] $database_port = $puppetdb::params::database_port,
7+
String[1] $database_username = $puppetdb::params::database_username,
8+
Variant[String[1], Sensitive[String[1]]] $database_password = $puppetdb::params::database_password,
9+
String[1] $database_name = $puppetdb::params::database_name,
10+
Boolean $manage_db_password = $puppetdb::params::manage_db_password,
11+
Variant[String, Boolean] $jdbc_ssl_properties = $puppetdb::params::jdbc_ssl_properties,
12+
Boolean $database_validate = $puppetdb::params::database_validate,
13+
Pattern[/\A[0-9dhms]+\Z/] $node_ttl = $puppetdb::params::node_ttl,
14+
Pattern[/\A[0-9dhms]+\Z/] $node_purge_ttl = $puppetdb::params::node_purge_ttl,
15+
Pattern[/\A[0-9dhms]+\Z/] $report_ttl = $puppetdb::params::report_ttl,
16+
Optional[Array] $facts_blacklist = $puppetdb::params::facts_blacklist,
17+
Variant[Integer, Pattern[/\A[0-9]+\Z/]] $gc_interval = $puppetdb::params::gc_interval,
18+
Variant[Integer, Pattern[/\A[0-9]+\Z/]] $node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
19+
Variant[Integer, Pattern[/\A[0-9]+\Z/]] $conn_max_age = $puppetdb::params::conn_max_age,
20+
Variant[Integer, Pattern[/\A[0-9]+\Z/]] $conn_lifetime = $puppetdb::params::conn_lifetime,
21+
Stdlib::Absolutepath $confdir = $puppetdb::params::confdir,
22+
String[1] $puppetdb_group = $puppetdb::params::puppetdb_group,
23+
Optional[Variant[Integer, Enum['absent']]] $database_max_pool_size = $puppetdb::params::database_max_pool_size,
24+
Boolean $migrate = $puppetdb::params::migrate,
25+
Boolean $postgresql_ssl_on = $puppetdb::params::postgresql_ssl_on,
26+
Stdlib::Absolutepath $ssl_cert_path = $puppetdb::params::ssl_cert_path,
27+
Stdlib::Absolutepath $ssl_key_pk8_path = $puppetdb::params::ssl_key_pk8_path,
28+
Stdlib::Absolutepath $ssl_ca_cert_path = $puppetdb::params::ssl_ca_cert_path
2929
) inherits puppetdb::params {
3030
if str2bool($database_validate) {
3131
# Validate the database connection. If we can't connect, we want to fail

0 commit comments

Comments
 (0)