]> granicus.if.org Git - icinga2/commit
Config Conversion: Treat command arg macros directly as object macros
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 12 Sep 2013 18:07:41 +0000 (20:07 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 12 Sep 2013 18:13:28 +0000 (20:13 +0200)
commita5fe44b81f39dfc71ffd28d8037a4a91944617df
tree3c51af82bb1ab0f520cde8329e0e622f6ced4634
parentf1e1a716d3732f23f9ad08ba7bfeec92feb8e82e
Config Conversion: Treat command arg macros directly as object macros

- if detected, they will be replaced with their real name on the command
  line (instead of $ARGn$)
- if macro is resolvable, its value will be added to the macro
  dictionary
- if macro is not resolvable, it will be skipped and left for the core
  to resolve the macro on runtime.

caveat: getting host/service attributes requires lookups from the object
into the template tree, as well as host macros on services a search on
the host object itsself.

note: macro resolver is rudimentary implemented. there's space for more
detailed if-macro-name-is-then-return-attribute-abc. main problem are
the missing underscores in macro names, but not in attributes (what the
...?).

fixes #4700
tools/configconvert/Icinga2/Convert.pm