[icinga-checkins] icinga.org: icingaweb2-module-director/feature/nested-apply-rules-12033: Add support for Apply for rules in services

git at icinga.org git at icinga.org
Sun Oct 23 06:25:32 CEST 2016


Module: icingaweb2-module-director
Branch: feature/nested-apply-rules-12033
Commit: e7bd4343b50e202ce4e8e1f4c53281ae6ee06e87
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=e7bd4343b50e202ce4e8e1f4c53281ae6ee06e87

Author: Corentin Ardeois <cardeois at internap.com>
Date:   Tue Sep  6 11:18:29 2016 -0400

Add support for Apply for rules in services

Apply for rules are defined through `apply_for` property
Only Array custom variables will be eligible in apply_for dropdown.

API Example:
```bash
 ./director-curl POST director/service?name=my_service '{"apply_for": "for (checked_tcp_port in host.vars.checked_tcp_ports)" }'
 ```

 Will render as:
 ```
  apply Service "my_service" for (checked_tcp_port in host.vars.checked_tcp_ports) {
      ...
  }
  ```
Feature: https://dev.icinga.org/issues/11976

Depends-On: https://github.com/Icinga/icingaweb2-module-director/pull/20
refs #11976

---

 application/forms/IcingaServiceForm.php            |   63 +++++++
 library/Director/Data/PropertiesFilter.php         |   23 +++
 .../ArrayCustomVariablesFilter.php                 |   12 ++
 .../PropertiesFilter/CustomVariablesFilter.php     |   12 ++
 library/Director/Objects/IcingaHost.php            |   51 +++---
 library/Director/Objects/IcingaService.php         |   25 +++
 library/Director/Web/Form/QuickBaseForm.php        |    4 +-
 schema/mysql-migrations/upgrade_119.sql            |    6 +
 schema/pgsql-migrations/upgrade_119.sql            |    6 +
 .../library/Director/Objects/IcingaHostTest.php    |  183 ++++++++++++++++++++
 10 files changed, 358 insertions(+), 27 deletions(-)

Diff:   https://git.icinga.org/?p=icingaweb2-module-director.git;a=commitdiff;h=e7bd4343b50e202ce4e8e1f4c53281ae6ee06e87


More information about the icinga-checkins mailing list