[icinga-checkins] icinga.org: icinga2/mfriedrich/config: ConfigConvert: fix service linking not unique, add hostgroup->members re-link to host-> hostgroups

git at icinga.org git at icinga.org
Thu Apr 4 23:17:17 CEST 2013


Module: icinga2
Branch: mfriedrich/config
Commit: fdaeb26d7b7e080f3d65298ef34279cb99b0ec61
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=fdaeb26d7b7e080f3d65298ef34279cb99b0ec61

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Apr  4 21:33:54 2013 +0200

ConfigConvert: fix service linking not unique, add hostgroup->members re-link to host->hostgroups

while working on the missing servicegroups and their facepalm members
syntax (host1,svc1,host2,svc2 - awesome to parse), i figured that the
whole detection of services by their attribute 'service_description' is
not uniquely implemented. now the getter functions are duplicated, and
not modular anymore, for the sake of having a service identified by its
host_name + service_description. since that lookup is recursive, we must
pass the host_name from the very beginning - otherwise we could
accidently overwrite that with a template entry.

the hostgroup re-linking works, also thanks to the fact that the inner
object structure is just an array in the hashref, which allows smart
push.

contact/user groups are tricky again due to the different naming.

further todo: sort all macros and hostservice links. right now this
looks like chaos.

refs #2743

---

 contrib/configconvert/Icinga2/Convert.pm        |  139 ++++++++++++++++++++---
 contrib/configconvert/Icinga2/DumpIcinga2Cfg.pm |    1 +
 2 files changed, 122 insertions(+), 18 deletions(-)

Diff:   https://git.icinga.org/?p=icinga2.git;a=commitdiff;h=fdaeb26d7b7e080f3d65298ef34279cb99b0ec61




More information about the icinga-checkins mailing list