From 1d6d4f0b10889b6cfc4f1bfc7e0011e2fce24688 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 12:19:00 +0200 Subject: [PATCH] RemoteCommandFile: Accept option `instance' refs #9651 --- .../Command/Transport/RemoteCommandFile.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php b/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php index 383970b76..a0f597072 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php @@ -22,6 +22,13 @@ class RemoteCommandFile implements CommandTransportInterface */ const TRANSPORT = 'remote'; + /** + * The name of the Icinga instance this transport will transfer commands to + * + * @var string + */ + protected $instanceName; + /** * Remote host * @@ -74,6 +81,29 @@ class RemoteCommandFile implements CommandTransportInterface $this->renderer = new IcingaCommandFileCommandRenderer(); } + /** + * Set the name of the Icinga instance this transport will transfer commands to + * + * @param string $name + * + * @return $this + */ + public function setInstance($name) + { + $this->instanceName = $name; + return $this; + } + + /** + * Return the name of the Icinga instance this transport will transfer commands to + * + * @return string + */ + public function getInstance() + { + return $this->instanceName; + } + /** * Set the remote host *