Puppet Function: openldap::flatten_limits
- Defined in:
- functions/flatten_limits.pp
- Function type:
- Puppet Language
Overview
Flatten an array of combined size and time limit specifications to an array of strings.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'functions/flatten_limits.pp', line 11
function openldap::flatten_limits(Optional[Array[OpenLDAP::Limit, 1]] $values) {
$values ? {
undef => undef,
default => $values.map |OpenLDAP::Limit $value| {
join(delete_undef_values([
$value['selector'],
type($value['size']) ? {
Type[Scalar] => "size=${value['size']}",
default => openldap::flatten_size_limit($value['size']),
},
type($value['time']) ? {
Type[Scalar] => "time=${value['time']}",
default => openldap::flatten_time_limit($value['time']),
},
]), ' ')
}
}
}
|