Update validators for CustomVarObject

fixes #7542
This commit is contained in:
Gunnar Beutner 2015-02-10 08:53:15 +01:00
parent 898e385891
commit 9de7da4d2a
3 changed files with 15 additions and 13 deletions

View File

@ -31,8 +31,6 @@
%attribute %array "templates" {
%attribute %string "*"
},
%attribute %dictionary "vars"
}
%type Logger {

View File

@ -25,7 +25,11 @@
%attribute %number "update_interval"
}
%type Checkable {
%type CustomVarObject {
%attribute %dictionary "vars",
}
%type Checkable %inherits CustomVarObject {
%validator "ValidateCheckableCheckInterval",
%attribute %string "display_name",
@ -70,7 +74,7 @@
%attribute %string "address6",
}
%type HostGroup {
%type HostGroup %inherits CustomVarObject {
%attribute %string "display_name"
%attribute %array "groups" {
@ -93,7 +97,7 @@
},
}
%type ServiceGroup {
%type ServiceGroup %inherits CustomVarObject {
%attribute %string "display_name"
%attribute %array "groups" {
@ -105,7 +109,7 @@
%attribute %string "action_url",
}
%type Notification {
%type Notification %inherits CustomVarObject {
%validator "ValidateNotificationFilters"
%validator "ValidateNotificationUsers"
@ -143,7 +147,7 @@
%attribute %name(Endpoint) "command_endpoint",
}
%type User {
%type User %inherits CustomVarObject {
%validator "ValidateUserFilters"
%attribute %string "display_name",
@ -165,7 +169,7 @@
%attribute %string "pager",
}
%type UserGroup {
%type UserGroup %inherits CustomVarObject {
%attribute %string "display_name",
%attribute %array "groups" {
@ -173,7 +177,7 @@
},
}
%type TimePeriod {
%type TimePeriod %inherits CustomVarObject {
%attribute %string "display_name",
%require "update",
@ -187,7 +191,7 @@
/* } */
}
%type Command {
%type Command %inherits CustomVarObject {
%validator "ValidateCommandAttributes",
%require "execute",
@ -235,7 +239,7 @@
}
%type ScheduledDowntime {
%type ScheduledDowntime %inherits CustomVarObject {
%require "host_name",
%attribute %name(Host) "host_name",
%attribute %string "service_name",
@ -257,7 +261,7 @@
},
}
%type Dependency {
%type Dependency %inherits CustomVarObject {
%validator "ValidateDependencyFilters"
%require "parent_host_name",

View File

@ -23,7 +23,7 @@
namespace icinga
{
class IcingaStatusWriter : CustomVarObject
class IcingaStatusWriter : DynamicObject
{
[config] String status_path {
default {{{ return Application::GetLocalStateDir() + "/cache/icinga2/status.json"; }}}