Commit Graph

407 Commits

Author SHA1 Message Date
Gunnar Beutner 3cc79a6005 Optimize apply/object filters
refs 
2014-11-10 12:06:29 +01:00
Gunnar Beutner ec109b04dd Refactor the AST
refs 
2014-11-10 12:06:25 +01:00
Gunnar Beutner e3c5063aff Remove unused fields from the ObjectRule class
refs 
2014-11-10 09:52:27 +01:00
Gunnar Beutner 478f03b49a Replace boost::shared_ptr with boost::intrusive_ptr
refs 
2014-11-09 16:54:41 +01:00
Gunnar Beutner 684ad2641a Fix GetInstance() methods for the DbType and config validator registry classes 2014-11-09 13:06:25 +01:00
Gunnar Beutner 4bb535fc47 Discard unnamed config items as early as possible 2014-11-09 04:17:34 +01:00
Gunnar Beutner 25ee5dd1fd Fix problem with missing config items 2014-11-08 14:24:17 +01:00
Gunnar Beutner e1c95d4fa0 Improve config compiler's memory usage 2014-11-08 13:21:51 +01:00
Gunnar Beutner 266b1754c7 Speed up type lookups
refs 
2014-11-07 12:39:32 +01:00
Gunnar Beutner f69f7d61f2 Fix variable scope for object rules 2014-11-06 19:26:44 +01:00
Gunnar Beutner 8bbb2bfb7b Fix compiler warnings for the lexers 2014-11-06 06:23:45 +01:00
Gunnar Beutner 32b0429904 Fix templates field
fixes 
2014-11-05 15:40:13 +01:00
Gunnar Beutner ad14ff6d6b Fix memory leak in the config parser
refs 
2014-11-05 09:29:15 +01:00
Gunnar Beutner 4eb37563b4 Improve memory usage for the config compiler 2014-11-05 08:55:00 +01:00
Gunnar Beutner c1cbe157db Allow strings as indexers
refs 
2014-11-04 15:22:10 +01:00
Gunnar Beutner a6f20c7a22 Implement support for arbitrarily complex indexers
fixes 
2014-11-04 15:20:33 +01:00
Gunnar Beutner a1c905bf62 Implement dictionary support for apply+for
fixes 
2014-11-04 11:02:10 +01:00
Gunnar Beutner 170c5a59e4 Implement typeof() function 2014-11-03 00:45:14 +01:00
Gunnar Beutner 4677014b6d Implement support for arrays in custom variables
fixes 
2014-11-02 07:27:50 +01:00
Gunnar Beutner db3887d09e Make the 'name' attribute available in object definitions
fixes 
2014-11-01 06:39:21 +01:00
Gunnar Beutner d300ceaaf7 Fix: Nesting an object in a template causes the template to become non-abstract
fixes 
2014-11-01 06:25:58 +01:00
Gunnar Beutner 93b66a0c4a Clean up the config parser a bit 2014-11-01 05:23:14 +01:00
Gunnar Beutner 1811f8689b Make sure templates are never evaluated on their own
fixes 
2014-11-01 05:12:13 +01:00
Gunnar Beutner f8f89cef6d Fix scoping rules for apply rules
fixes 
2014-10-30 09:20:42 +01:00
Gunnar Beutner c10da708ff Fix incorrect locks 2014-10-28 18:57:30 +01:00
Gunnar Beutner a5684ea2ac Build fix for Windows 2014-10-28 18:09:52 +01:00
Gunnar Beutner 76444027e9 Fix: Don't validate templates
refs 
2014-10-28 12:20:35 +01:00
Gunnar Beutner 3dc2f82345 Implement validation for "repository add"
fixes 
2014-10-28 11:55:25 +01:00
Gunnar Beutner 028186e7f0 Remove support for partial type validators
refs 
2014-10-28 08:22:41 +01:00
Gunnar Beutner 7559273359 Replace cJSON with YAJL
fixes 
2014-10-26 20:00:35 +01:00
Gunnar Beutner 2d5e9514a5 Refactor logging code 2014-10-19 17:52:17 +02:00
Gunnar Beutner b18f57a745 Remove logger_fwd.hpp 2014-10-19 14:50:39 +02:00
Gunnar Beutner 8cc6368954 Implement generic color support for terminals
fixes 
2014-10-17 20:44:17 +02:00
Gunnar Beutner f13ea9e1b8 Remove zone keyword
fixes 
2014-10-17 12:45:57 +02:00
Gunnar Beutner feeb550654 Rename AExpression to Expression 2014-10-16 17:44:06 +02:00
Gunnar Beutner 14ac7dd974 Replace spaces with tabs 2014-10-13 09:47:05 +02:00
Gunnar Beutner 15358c6e95 Fix missing error messages (part 2)
refs 
2014-10-01 16:01:47 +01:00
Gunnar Beutner a08f4588eb Add error message for missing imports (and possibly other errors)
fixes 
2014-10-01 15:13:11 +01:00
Gunnar Beutner 308ba45102 Improve error message for duplicate objects
refs 
2014-09-09 14:49:21 +02:00
Gunnar Beutner 46f26024dc Implement support for excluding files from unity builds
refs 
2014-09-01 09:19:21 +02:00
Gunnar Beutner 2a65c7821c Remove validator for the Script type
fixes 
2014-08-31 11:09:18 +02:00
Gunnar Beutner eb091a87b0 Implement support for unity builds
fixes 
fixes 
2014-08-30 20:02:12 +02:00
Gunnar Beutner 65bec9e904 Clean up some parts of the code 2014-08-17 17:57:41 +02:00
Gunnar Beutner fdca524cdd Fix some minor issues with the icinga2.debug feature
refs 
2014-08-16 22:12:40 +02:00
Gunnar Beutner e359c55909 Add debug hints for attributes
refs 
2014-08-16 09:37:17 +02:00
Gunnar Beutner 0443c85bf5 Implement support for writing the icinga2.debug file
refs 
2014-08-15 21:00:26 +02:00
Michael Friedrich 7d35585cb0 Fix AExpression log message.
Refs 
2014-05-28 14:42:00 +02:00
Michael Friedrich 43dd9729d7 Change log message identifier for libconfig.
Refs 
2014-05-28 14:42:00 +02:00
Gunnar Beutner d66b4d587e Implement the "cluster-zone" check task.
Fixes 
2014-05-25 19:59:52 +02:00
Gunnar Beutner 632026cd9f Rename C++ header files.
Fixes 
2014-05-25 16:27:14 +02:00
Gunnar Beutner 3a1ce23aeb Implicitly set zone attribute for files includes from zones.d.
Refs 
2014-05-13 14:40:12 +02:00
Gunnar Beutner a5d3523b85 Rename the function, return and for keywords and remove the lambda keyword.
Fixes 
2014-05-12 12:59:12 +02:00
Gunnar Beutner 9c3e399188 Remove unnecessary includes.
Fixes 
2014-05-11 18:11:32 +02:00
Gunnar Beutner 12c8814bd8 Fix some more compiler warnings.
Refs 
2014-05-11 06:43:01 +02:00
Gunnar Beutner c7b5e4c31e Fix some compiler warnings.
Refs 
2014-05-11 06:04:43 +02:00
Gunnar Beutner 7df7ec94d2 Fix scoping rules for dictionaries.
Refs 
2014-05-10 12:43:16 +02:00
Gunnar Beutner 6d7e028f92 Use a separate scope for "for" loops.
Refs 
2014-05-10 12:03:54 +02:00
Gunnar Beutner 0e34968e8f Implement for loops.
Fixes 
2014-05-10 11:26:56 +02:00
Gunnar Beutner ab8624d2f5 Implement support for arrays for the indexer operator.
Fixes 
2014-05-10 10:46:49 +02:00
Gunnar Beutner 0c31bae792 Config validator: Make sure that objects are not abstract.
Fixes 
2014-05-09 19:40:56 +02:00
Gunnar Beutner bd8ccec258 Fix deadlock when calling functions recursively.
Fixes 
2014-05-09 14:45:59 +02:00
Gunnar Beutner 45270f1bb8 Refactor the agent and cluster components.
Refs 
2014-05-08 09:13:04 +02:00
Gunnar Beutner b1dab6c074 Implement support for the "package" keyword.
Refs 
2014-05-08 09:13:04 +02:00
Michael Friedrich e04d200d36 Allow EvaluateRules() to keep rules for the next iteration.
Refs 
2014-05-02 00:23:29 +02:00
Michael Friedrich 3c2dae1804 Evaluate object rules (group assign) before and after creating objects with apply rules.
Refs 
2014-05-01 23:51:42 +02:00
Gerd von Egidy 6ac851ca10 Improve error message when trying to open a config file.
Fixes 

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2014-04-30 00:36:49 +02:00
Gerd von Egidy 19afcd894a Split ConfigItem::ActivateItems() into ConfigItem::ValidateItems() and ConfigItem::ActivateItems().
Also removes the -Z commandline parameter: won't be needed when this feature is done.

Refs 
2014-04-29 10:34:01 +02:00
Michael Friedrich d0af8a226b Fix headers. 2014-04-23 15:57:58 +02:00
Michael Friedrich 7a147d268e Add group assign/ignore rules.
Fixes 
2014-04-23 15:50:00 +02:00
Michael Friedrich c239f84fd7 Revert "Add group apply (creates object only once and sets membership)."
This reverts commit 559a4fef67.

Refs 
2014-04-23 14:59:48 +02:00
Michael Friedrich 559a4fef67 Add group apply (creates object only once and sets membership).
Refs 
2014-04-15 14:55:29 +02:00
Gunnar Beutner b8d3d42b7f Allow trailing comma in arrays.
Fixes 
2014-04-11 13:51:14 +02:00
Gunnar Beutner e6667c15d3 Support shell-style comments.
Fixes 
2014-04-10 11:30:01 +02:00
Gunnar Beutner a16ef350e2 Avoid unnecessary copies for DynamicType::GetObjects.
Fixes 
2014-04-09 12:22:23 +02:00
Gunnar Beutner 91f946a40e Implement the "return" keyword.
Fixes 
2014-04-09 10:36:57 +02:00
Michael Friedrich aae5f092d4 Log warning if apply rule does not match anywhere.
Fixes 
Fixes 
2014-04-07 15:00:14 +02:00
Michael Friedrich e97e1cf63f Throw error on missing 'assign' in 'apply'.
Refs 
2014-04-07 13:04:13 +02:00
Gunnar Beutner ad42367999 Refactor name helper classes a bit.
Refs 
2014-04-06 08:15:07 +02:00
Gunnar Beutner 020eaf99ab Fix yet another validation issue.
Refs 
2014-04-05 23:23:49 +02:00
Gunnar Beutner 8d81f4b90a Fix another bug with relative object names.
Refs 
2014-04-05 23:23:49 +02:00
Gunnar Beutner bc4cacfee9 Fix validation problem with relative object names.
Refs 
2014-04-05 23:23:39 +02:00
Gunnar Beutner 00fd51e628 Implement relative object names.
Fixes 
2014-04-05 22:17:37 +02:00
Gunnar Beutner 5e38c81eb5 Implement apply target types.
Fixes 
2014-04-05 13:53:55 +02:00
Gunnar Beutner c42a582307 Rename "short_name", "host" and "sevice" attributes.
Fixes 
2014-04-05 09:15:40 +02:00
Michael Friedrich 5c58eb368c Merge 'macros' and 'custom' attributes into 'vars', part 1.
Refs 
2014-04-03 11:35:25 +02:00
Gunnar Beutner 41d0dde52e Allow functions to return values.
Fixes 
2014-04-02 17:27:04 +02:00
Gunnar Beutner 0683fca535 Allow anonymous functions to be garbage-collected.
Fixes 
2014-04-02 17:27:04 +02:00
Gunnar Beutner 2faf17cb14 Fix column information for config errors.
Refs 
2014-04-01 11:43:53 +02:00
Gunnar Beutner 5eca503362 Support new-lines in addition to commas to separate commands.
Fixes 
2014-04-01 09:45:57 +02:00
Gunnar Beutner b924941488 Fix ShowCodeFragment column numbers.
Refs 
2014-03-31 12:44:18 +02:00
Gunnar Beutner d874cbfe5b Fix: Crash when there's a config error in the first line / first column.
Fixes 
2014-03-31 09:41:07 +02:00
Gunnar Beutner 397fee13ff Allow "object" and "apply" in AST expressions.
Refs 
2014-03-30 15:04:53 +02:00
Gunnar Beutner 7a6172c135 Remove support for the deprecated "var" and "set" keywords.
Refs #
2014-03-30 10:29:52 +02:00
Gunnar Beutner 5179eebf09 Allow rterm in indexer ops.
Refs 
2014-03-30 10:00:11 +02:00
Gunnar Beutner ec0fdd3fd2 Fix operator precedence.
Refs 
2014-03-30 05:04:58 +02:00
Gunnar Beutner 14084735da Make sure we evaluate "apply" rules in the right order.
Refs 
2014-03-30 01:20:58 +01:00
Gunnar Beutner d00a839620 Fix incorrect debug info for "apply" rules.
Refs 
2014-03-30 01:20:58 +01:00
Gunnar Beutner 64aa5d1b09 Dump AST execution state in debug mode.
Refs 
2014-03-29 13:48:04 +01:00
Gunnar Beutner 66e769672c Fix failed assertion in ConfigItem::GetProperties.
Refs 
2014-03-28 23:01:35 +01:00
Gunnar Beutner 33ae12d084 Implement apply support for scheduled downtimes and notifications.
Refs 
2014-03-28 23:01:33 +01:00