validate maxdelay for cron job

The parameter descriptions says the value should be a positive integer
(or 0). Validate the given value to reject invalid values such as
strings or even negative values.

Change-Id: I63719129644e3723b86d0b63b78c36e151724473
This commit is contained in:
Takashi Kajinami 2024-04-08 16:42:21 +09:00
parent 58bb9cac0b
commit fe1dd0036f
2 changed files with 20 additions and 20 deletions

View File

@ -63,16 +63,16 @@
# Defaults to present.
#
class glance::cron::db_purge (
$minute = 1,
$hour = 0,
$monthday = '*',
$month = '*',
$weekday = '*',
$user = $::glance::params::user,
$age = 30,
$max_rows = 100,
$destination = '/var/log/glance/glance-rowsflush.log',
$maxdelay = 0,
$minute = 1,
$hour = 0,
$monthday = '*',
$month = '*',
$weekday = '*',
$user = $::glance::params::user,
$age = 30,
$max_rows = 100,
$destination = '/var/log/glance/glance-rowsflush.log',
Integer[0] $maxdelay = 0,
Enum['present', 'absent'] $ensure = 'present',
) inherits glance::params {

View File

@ -63,16 +63,16 @@
# Defaults to present.
#
class glance::cron::db_purge_images_table (
$minute = 1,
$hour = 0,
$monthday = '*',
$month = '*',
$weekday = '*',
$user = $::glance::params::user,
$age = 30,
$max_rows = 100,
$destination = '/var/log/glance/glance-images-rowsflush.log',
$maxdelay = 0,
$minute = 1,
$hour = 0,
$monthday = '*',
$month = '*',
$weekday = '*',
$user = $::glance::params::user,
$age = 30,
$max_rows = 100,
$destination = '/var/log/glance/glance-images-rowsflush.log',
Integer[0] $maxdelay = 0,
Enum['present', 'absent'] $ensure = 'present',
) inherits glance::params {