Add a EventCommand object defined type, refs#7215

The idea was keep the code as siple an clean as possible. Suport string and
hash will request more code without advantage. do you disagree?
Le 22 oct. 2014 01:09, "Nicholas Chappell" <notifications@github.com> a
écrit :

> In manifests/object/eventcommand.pp:
>
> > +  $cmd_path          = 'PluginDir',
> > +  $arguments         = {},
> > +  $env               = undef,
> > +  $vars              = {},
> > +  $timeout           = undef,
> > +  $target_dir        = '/etc/icinga2/conf.d',
> > +  $target_file_name  = "${name}.conf",
> > +  $target_file_owner = 'root',
> > +  $target_file_group = 'root',
> > +  $target_file_mode  = '0644'
> > +) {
> > +
> > +  #Do some validation of the class' parameters:
> > +  validate_string($object_eventcommandname)
> > +  validate_string($template_to_import)
> > +  validate_array($command)
>
> Should we validate this as a string instead? The official docs
> <http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-eventcommand>
> say it can be either, but I think it's simpler just to make it a string.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Icinga/puppet-icinga2/pull/33/files#r19194640>.
>