Removed the old-style validation code.

This commit is contained in:
Gunnar Beutner 2013-02-02 20:00:02 +01:00
parent 628d8374c7
commit b74c2c8a68
9 changed files with 5 additions and 59 deletions

View File

@ -120,13 +120,6 @@ void DynamicObject::InternalApplyUpdate(const Dictionary::Ptr& serializedUpdate,
Value data = attr->Get("data");
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)
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
{
return m_Attributes;
}
}

View File

@ -21,13 +21,7 @@
using namespace icinga;
static AttributeDescription loggerAttributes[] = {
{ "type", Attribute_Config },
{ "path", Attribute_Config },
{ "severity", Attribute_Config }
};
REGISTER_TYPE(Logger, loggerAttributes);
REGISTER_TYPE(Logger, NULL);
/**
* Constructor for the Logger class.

View File

@ -25,12 +25,6 @@ map<String, vector<Service::WeakPtr> > Host::m_ServicesCache;
bool Host::m_ServicesCacheValid = true;
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_expiry", Attribute_Replicated },
{ "downtimes", Attribute_Replicated },

View File

@ -24,13 +24,7 @@ using namespace icinga;
map<String, vector<Host::WeakPtr> > HostGroup::m_MembersCache;
bool HostGroup::m_MembersCacheValid = true;
static AttributeDescription hostGroupAttributes[] = {
{ "alias", Attribute_Config },
{ "notes_url", Attribute_Config },
{ "action_url", Attribute_Config }
};
REGISTER_TYPE(HostGroup, hostGroupAttributes);
REGISTER_TYPE(HostGroup, NULL);
String HostGroup::GetAlias(void) const
{

View File

@ -23,17 +23,7 @@
using namespace icinga;
static AttributeDescription icingaApplicationAttributes[] = {
{ "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);
REGISTER_TYPE(IcingaApplication, NULL);
#ifndef _WIN32
# include "icinga-version.h"

View File

@ -22,17 +22,6 @@
using namespace icinga;
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 },
{ "first_check", Attribute_Transient },
{ "next_check", Attribute_Replicated },

View File

@ -24,13 +24,7 @@ using namespace icinga;
map<String, vector<Service::WeakPtr> > ServiceGroup::m_MembersCache;
bool ServiceGroup::m_MembersCacheValid;
static AttributeDescription serviceGroupAttributes[] = {
{ "alias", Attribute_Config },
{ "notes_url", Attribute_Config },
{ "action_url", Attribute_Config }
};
REGISTER_TYPE(ServiceGroup, serviceGroupAttributes);
REGISTER_TYPE(ServiceGroup, NULL);
String ServiceGroup::GetAlias(void) const
{

View File

@ -22,7 +22,6 @@
using namespace icinga;
static AttributeDescription timePeriodAttributes[] = {
{ "alias", Attribute_Config },
{ "cached_state", Attribute_Transient },
{ "cached_next_change", Attribute_Transient }
};

View File

@ -24,7 +24,6 @@ using namespace icinga;
static AttributeDescription endpointAttributes[] = {
{ "node", Attribute_Replicated },
{ "service", Attribute_Replicated },
{ "local", Attribute_Config },
{ "subscriptions", Attribute_Replicated },
{ "client", Attribute_Transient }
};