Move endpoint error check to ti file

refs #9623

Conflicts:
	lib/remote/endpoint.cpp
	lib/remote/endpoint.hpp
This commit is contained in:
Jean Flach 2015-08-25 17:06:08 +02:00
parent 0513be27b4
commit f71a2ca340
3 changed files with 1 additions and 10 deletions

View File

@ -56,14 +56,6 @@ void Endpoint::OnAllConfigLoaded(void)
BOOST_THROW_EXCEPTION(ScriptError("Endpoint '" + GetName() + "' does not belong to a zone.", GetDebugInfo()));
}
void Endpoint::ValidatePort(const String& value, const ValidationUtils& utils)
{
ObjectImpl<Endpoint>::ValidatePort(value, utils);
if (value.IsEmpty())
BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("enpoint_port"), "Port may not be empty."));
}
void Endpoint::AddClient(const ApiClient::Ptr& client)
{
bool was_master = ApiListener::GetInstance()->IsMaster();

View File

@ -56,7 +56,6 @@ public:
protected:
virtual void OnAllConfigLoaded(void);
virtual void ValidatePort(const String& value, const ValidationUtils& utils) override;
private:
mutable boost::mutex m_ClientsLock;

View File

@ -25,7 +25,7 @@ namespace icinga
class Endpoint : DynamicObject
{
[config] String host;
[config] String port {
[config, required] String port {
default {{{ return "5665"; }}}
};
[config] double log_duration {