Skip to content

Commit

Permalink
Do not allow empty strings to be passed
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Jul 11, 2018
1 parent e745233 commit 49173a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions manifests/plugin/threshold.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
class collectd::plugin::threshold (
$ensure = 'present',
$interval = undef,
Hash[String, Collectd::Threshold::Type] $types = {},
Hash[String, Collectd::Threshold::Plugin] $plugins = {},
Hash[String, Collectd::Threshold::Host] $hosts = {},
Hash[String[1], Collectd::Threshold::Type] $types = {},
Hash[String[1], Collectd::Threshold::Plugin] $plugins = {},
Hash[String[1], Collectd::Threshold::Host] $hosts = {},
) {

include ::collectd
Expand Down
4 changes: 2 additions & 2 deletions types/threshold/host.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type Collectd::Threshold::Host = Struct[{
plugins => Hash[String, Collectd::Threshold::Plugin],
types => Hash[String, Collectd::Threshold::Type],
plugins => Hash[String[1], Collectd::Threshold::Plugin],
types => Hash[String[1], Collectd::Threshold::Type],
}]
4 changes: 2 additions & 2 deletions types/threshold/plugin.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type Collectd::Threshold::Plugin = Struct[{
instance => Optional[String],
types => Hash[String, Collectd::Threshold::Type],
instance => Optional[String[1]],
types => Hash[String[1], Collectd::Threshold::Type],
}]
4 changes: 2 additions & 2 deletions types/threshold/type.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
type Collectd::Threshold::Type = Struct[{
instance => Optional[String],
instance => Optional[String[1]],
failure_max => Optional[Numeric],
warning_max => Optional[Numeric],
failure_min => Optional[Numeric],
warning_min => Optional[Numeric],
data_source => Optional[String],
data_source => Optional[String[1]],
invert => Optional[Boolean],
persist => Optional[Boolean],
persist_ok => Optional[Boolean],
Expand Down

0 comments on commit 49173a3

Please sign in to comment.