mirror of https://github.com/Icinga/icinga2.git
parent
8ab39194f1
commit
0e79abb8f2
|
@ -5,6 +5,7 @@ abstract class DynamicObject
|
|||
{
|
||||
[config] String name (Name);
|
||||
[config, get_protected] String type (TypeName);
|
||||
[config, get_protected] Array::Ptr templates;
|
||||
[config] Dictionary::Ptr methods;
|
||||
[config] Dictionary::Ptr custom;
|
||||
[config] Array::Ptr domains;
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
%require "type",
|
||||
%attribute %string "type",
|
||||
|
||||
%attribute %array "templates" {
|
||||
%attribute %string "*"
|
||||
},
|
||||
|
||||
%attribute %dictionary "methods",
|
||||
|
||||
%attribute %dictionary "custom" {
|
||||
|
|
|
@ -86,6 +86,9 @@ ConfigItem::Ptr ConfigItemBuilder::Compile(void)
|
|||
}
|
||||
|
||||
Array::Ptr exprs = make_shared<Array>();
|
||||
Array::Ptr templateArray = make_shared<Array>();
|
||||
templateArray->Add(m_Name);
|
||||
exprs->Add(make_shared<AExpression>(&AExpression::OpSetPlus, "templates", make_shared<AExpression>(&AExpression::OpLiteral, templateArray, m_DebugInfo), m_DebugInfo));
|
||||
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "type", make_shared<AExpression>(&AExpression::OpLiteral, m_Type, m_DebugInfo), m_DebugInfo));
|
||||
exprs->Add(make_shared<AExpression>(&AExpression::OpDict, m_Expressions, true, m_DebugInfo));
|
||||
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "name", make_shared<AExpression>(&AExpression::OpLiteral, m_Name, m_DebugInfo), m_DebugInfo));
|
||||
|
|
Loading…
Reference in New Issue