From b8df909ad5555390fae9050b9447e6eca0697ac4 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 31 Aug 2016 13:00:39 +0200 Subject: [PATCH] Add name property to the delete comment command refs #11398 --- .../Command/Object/DeleteCommentCommand.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Command/Object/DeleteCommentCommand.php b/modules/monitoring/library/Monitoring/Command/Object/DeleteCommentCommand.php index 9ba9e0d85..4d791064f 100644 --- a/modules/monitoring/library/Monitoring/Command/Object/DeleteCommentCommand.php +++ b/modules/monitoring/library/Monitoring/Command/Object/DeleteCommentCommand.php @@ -17,6 +17,15 @@ class DeleteCommentCommand extends IcingaCommand */ protected $commentId; + /** + * Name of the comment (Icinga 2.4+) + * + * Required for removing the comment via Icinga 2's API. + * + * @var string + */ + protected $commentName; + /** * Whether the command affects a service comment * @@ -47,6 +56,33 @@ class DeleteCommentCommand extends IcingaCommand return $this; } + /** + * Get the name of the comment (Icinga 2.4+) + * + * Required for removing the comment via Icinga 2's API. + * + * @return string + */ + public function getCommentName() + { + return $this->commentName; + } + + /** + * Set the name of the comment (Icinga 2.4+) + * + * Required for removing the comment via Icinga 2's API. + * + * @param string $commentName + * + * @return $this + */ + public function setCommentName($commentName) + { + $this->commentName = $commentName; + return $this; + } + /** * Get whether the command affects a service comment *