mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-21 12:44:58 +02:00
Removed the old-style validation code.
This commit is contained in:
parent
628d8374c7
commit
b74c2c8a68
@ -120,13 +120,6 @@ void DynamicObject::InternalApplyUpdate(const Dictionary::Ptr& serializedUpdate,
|
|||||||
Value data = attr->Get("data");
|
Value data = attr->Get("data");
|
||||||
double tx = attr->Get("tx");
|
double tx = attr->Get("tx");
|
||||||
|
|
||||||
if (!HasAttribute(it->first)) {
|
|
||||||
DynamicType::Ptr dtype = GetType();
|
|
||||||
if (dtype && !dtype->HasAttribute(it->first))
|
|
||||||
Logger::Write(LogWarning, "base", "Adding unknown attribute '" +
|
|
||||||
it->first + "' to object '" + GetName() + "' of type '" + dtype->GetName() + "'");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type & Attribute_Config)
|
if (type & Attribute_Config)
|
||||||
RegisterAttribute(it->first, Attribute_Config);
|
RegisterAttribute(it->first, Attribute_Config);
|
||||||
|
|
||||||
@ -485,4 +478,4 @@ DynamicObject::Ptr DynamicObject::GetObject(const String& type, const String& na
|
|||||||
const DynamicObject::AttributeMap& DynamicObject::GetAttributes(void) const
|
const DynamicObject::AttributeMap& DynamicObject::GetAttributes(void) const
|
||||||
{
|
{
|
||||||
return m_Attributes;
|
return m_Attributes;
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,7 @@
|
|||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
static AttributeDescription loggerAttributes[] = {
|
REGISTER_TYPE(Logger, NULL);
|
||||||
{ "type", Attribute_Config },
|
|
||||||
{ "path", Attribute_Config },
|
|
||||||
{ "severity", Attribute_Config }
|
|
||||||
};
|
|
||||||
|
|
||||||
REGISTER_TYPE(Logger, loggerAttributes);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for the Logger class.
|
* Constructor for the Logger class.
|
||||||
|
@ -25,12 +25,6 @@ map<String, vector<Service::WeakPtr> > Host::m_ServicesCache;
|
|||||||
bool Host::m_ServicesCacheValid = true;
|
bool Host::m_ServicesCacheValid = true;
|
||||||
|
|
||||||
static AttributeDescription hostAttributes[] = {
|
static AttributeDescription hostAttributes[] = {
|
||||||
{ "alias", Attribute_Config },
|
|
||||||
{ "hostgroups", Attribute_Config },
|
|
||||||
{ "dependencies", Attribute_Config },
|
|
||||||
{ "hostchecks", Attribute_Config },
|
|
||||||
{ "macros", Attribute_Config },
|
|
||||||
{ "services", Attribute_Config },
|
|
||||||
{ "acknowledgement", Attribute_Replicated },
|
{ "acknowledgement", Attribute_Replicated },
|
||||||
{ "acknowledgement_expiry", Attribute_Replicated },
|
{ "acknowledgement_expiry", Attribute_Replicated },
|
||||||
{ "downtimes", Attribute_Replicated },
|
{ "downtimes", Attribute_Replicated },
|
||||||
|
@ -24,13 +24,7 @@ using namespace icinga;
|
|||||||
map<String, vector<Host::WeakPtr> > HostGroup::m_MembersCache;
|
map<String, vector<Host::WeakPtr> > HostGroup::m_MembersCache;
|
||||||
bool HostGroup::m_MembersCacheValid = true;
|
bool HostGroup::m_MembersCacheValid = true;
|
||||||
|
|
||||||
static AttributeDescription hostGroupAttributes[] = {
|
REGISTER_TYPE(HostGroup, NULL);
|
||||||
{ "alias", Attribute_Config },
|
|
||||||
{ "notes_url", Attribute_Config },
|
|
||||||
{ "action_url", Attribute_Config }
|
|
||||||
};
|
|
||||||
|
|
||||||
REGISTER_TYPE(HostGroup, hostGroupAttributes);
|
|
||||||
|
|
||||||
String HostGroup::GetAlias(void) const
|
String HostGroup::GetAlias(void) const
|
||||||
{
|
{
|
||||||
|
@ -23,17 +23,7 @@
|
|||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
static AttributeDescription icingaApplicationAttributes[] = {
|
REGISTER_TYPE(IcingaApplication, NULL);
|
||||||
{ "cert_path", Attribute_Config },
|
|
||||||
{ "ca_path", Attribute_Config },
|
|
||||||
{ "node", Attribute_Config },
|
|
||||||
{ "service", Attribute_Config },
|
|
||||||
{ "pid_path", Attribute_Config },
|
|
||||||
{ "state_path", Attribute_Config },
|
|
||||||
{ "macros", Attribute_Config }
|
|
||||||
};
|
|
||||||
|
|
||||||
REGISTER_TYPE(IcingaApplication, icingaApplicationAttributes);
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
# include "icinga-version.h"
|
# include "icinga-version.h"
|
||||||
|
@ -22,17 +22,6 @@
|
|||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
static AttributeDescription serviceAttributes[] = {
|
static AttributeDescription serviceAttributes[] = {
|
||||||
{ "alias", Attribute_Config },
|
|
||||||
{ "host_name", Attribute_Config },
|
|
||||||
{ "macros", Attribute_Config },
|
|
||||||
{ "check_command", Attribute_Config },
|
|
||||||
{ "max_check_attempts", Attribute_Config },
|
|
||||||
{ "check_interval", Attribute_Config },
|
|
||||||
{ "retry_interval", Attribute_Config },
|
|
||||||
{ "dependencies", Attribute_Config },
|
|
||||||
{ "servicegroups", Attribute_Config },
|
|
||||||
{ "checkers", Attribute_Config },
|
|
||||||
|
|
||||||
{ "scheduling_offset", Attribute_Transient },
|
{ "scheduling_offset", Attribute_Transient },
|
||||||
{ "first_check", Attribute_Transient },
|
{ "first_check", Attribute_Transient },
|
||||||
{ "next_check", Attribute_Replicated },
|
{ "next_check", Attribute_Replicated },
|
||||||
|
@ -24,13 +24,7 @@ using namespace icinga;
|
|||||||
map<String, vector<Service::WeakPtr> > ServiceGroup::m_MembersCache;
|
map<String, vector<Service::WeakPtr> > ServiceGroup::m_MembersCache;
|
||||||
bool ServiceGroup::m_MembersCacheValid;
|
bool ServiceGroup::m_MembersCacheValid;
|
||||||
|
|
||||||
static AttributeDescription serviceGroupAttributes[] = {
|
REGISTER_TYPE(ServiceGroup, NULL);
|
||||||
{ "alias", Attribute_Config },
|
|
||||||
{ "notes_url", Attribute_Config },
|
|
||||||
{ "action_url", Attribute_Config }
|
|
||||||
};
|
|
||||||
|
|
||||||
REGISTER_TYPE(ServiceGroup, serviceGroupAttributes);
|
|
||||||
|
|
||||||
String ServiceGroup::GetAlias(void) const
|
String ServiceGroup::GetAlias(void) const
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
static AttributeDescription timePeriodAttributes[] = {
|
static AttributeDescription timePeriodAttributes[] = {
|
||||||
{ "alias", Attribute_Config },
|
|
||||||
{ "cached_state", Attribute_Transient },
|
{ "cached_state", Attribute_Transient },
|
||||||
{ "cached_next_change", Attribute_Transient }
|
{ "cached_next_change", Attribute_Transient }
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,6 @@ using namespace icinga;
|
|||||||
static AttributeDescription endpointAttributes[] = {
|
static AttributeDescription endpointAttributes[] = {
|
||||||
{ "node", Attribute_Replicated },
|
{ "node", Attribute_Replicated },
|
||||||
{ "service", Attribute_Replicated },
|
{ "service", Attribute_Replicated },
|
||||||
{ "local", Attribute_Config },
|
|
||||||
{ "subscriptions", Attribute_Replicated },
|
{ "subscriptions", Attribute_Replicated },
|
||||||
{ "client", Attribute_Transient }
|
{ "client", Attribute_Transient }
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user