[icinga-checkins] icinga.org: icinga2/master: Make schedule-downtime default fixed

git at icinga.org git at icinga.org
Mon Feb 8 16:19:48 CET 2016


Module: icinga2
Branch: master
Commit: 964cfcebd39497083b4444d75bf3b2eabff823f8
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=964cfcebd39497083b4444d75bf3b2eabff823f8

Author: Jean Flach <jean-marcel.flach at netways.de>
Date:   Mon Feb  8 16:04:41 2016 +0100

Make schedule-downtime default fixed

fixes #10923

---

 doc/9-icinga2-api.md      |    2 +-
 lib/icinga/apiactions.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md
index bc66c1b..ee0e6f4 100644
--- a/doc/9-icinga2-api.md
+++ b/doc/9-icinga2-api.md
@@ -905,7 +905,7 @@ Send a `POST` request to the URL endpoint `/v1/actions/schedule-downtime`.
   start\_time   | timestamp | **Required.** Timestamp marking the beginning of the downtime.
   end\_time     | timestamp | **Required.** Timestamp marking the end of the downtime.
   duration      | integer   | **Required.** Duration of the downtime in seconds if `fixed` is set to false.
-  fixed         | boolean   | **Optional.** Defaults to `false`. If true the downtime is `fixed` otherwise `flexible`. See [downtimes](5-advanced-topics.md#downtimes) for more information.
+  fixed         | boolean   | **Optional.** Defaults to `true`. If true the downtime is `fixed` otherwise `flexible`. See [downtimes](5-advanced-topics.md#downtimes) for more information.
   trigger\_name | string    | **Optional.** Sets the trigger for a triggered downtime. See [downtimes](5-advanced-topics.md#downtimes) for more information on triggered downtimes.
 
 In addition to these parameters a [filter](9-icinga2-api.md#icinga2-api-filters) must be provided. The valid types for this action are `Host` and `Service`.
diff --git a/lib/icinga/apiactions.cpp b/lib/icinga/apiactions.cpp
index db8e8c3..b428381 100644
--- a/lib/icinga/apiactions.cpp
+++ b/lib/icinga/apiactions.cpp
@@ -303,7 +303,7 @@ Dictionary::Ptr ApiActions::ScheduleDowntime(const ConfigObject::Ptr& object,
 		return ApiActions::CreateResult(404, "Options 'start_time', 'end_time', 'duration', 'author' and 'comment' are required");
 	}
 
-	bool fixed = false;
+	bool fixed = true;
 	if (params->Contains("fixed"))
 		fixed = HttpUtility::GetLastParameter(params, "fixed");
 



More information about the icinga-checkins mailing list