dpeters / puppet-opsview

Puppet types/providers to support Opsview resources
12 stars 10 forks source link

check_command should be optional #22

Closed antaflos closed 10 years ago

antaflos commented 10 years ago

Seeing as not every host that is monitored by an Opsview installation has to have a host check command defined, the check_command property should be handled as optional and only added to the properties hash if it is actually defined (i.e. when a GET request against the host object does not contain "check_command" : null). Doing otherwise results in nasty "undefined method [] for nil:NilClass" errors for host objects that have no host check command.