[icinga-checkins] icinga.org: icingaweb2-module-director/feature/icinga-legacy-config-13049: Arguments: always render += instead of =

git at icinga.org git at icinga.org
Wed Nov 16 09:25:19 CET 2016


Module: icingaweb2-module-director
Branch: feature/icinga-legacy-config-13049
Commit: d5131f7fac442f37b2d5b9428887e95365830d27
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=d5131f7fac442f37b2d5b9428887e95365830d27

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Nov 15 17:57:02 2016 +0100

Arguments: always render += instead of =

This allows to extend existing arguments

fixes #12941

---

 library/Director/Objects/IcingaArguments.php            |    2 +-
 test/php/library/Director/Objects/rendered/command7.out |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/Director/Objects/IcingaArguments.php b/library/Director/Objects/IcingaArguments.php
index bf9d5cf..7cf330a 100644
--- a/library/Director/Objects/IcingaArguments.php
+++ b/library/Director/Objects/IcingaArguments.php
@@ -371,7 +371,7 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer
 
             $args[$arg->argument_name] = $arg->toConfigString();
         }
-        return c::renderKeyValue('arguments', c::renderDictionary($args));
+        return c::renderKeyOperatorValue('arguments', '+=', c::renderDictionary($args));
     }
 
     public function __toString()
diff --git a/test/php/library/Director/Objects/rendered/command7.out b/test/php/library/Director/Objects/rendered/command7.out
index e422cd3..4f966f0 100644
--- a/test/php/library/Director/Objects/rendered/command7.out
+++ b/test/php/library/Director/Objects/rendered/command7.out
@@ -1,6 +1,6 @@
 object CheckCommand "___TEST___command" {
     command = [ PluginDir + "/bla" ]
-    arguments = {
+    arguments += {
         "-a" = {
             set_if = "$a$"
         }



More information about the icinga-checkins mailing list