Remove debug code

refs #7559
This commit is contained in:
Gunnar Beutner 2014-11-13 15:53:15 +01:00
parent 7bcca244e7
commit bb04f66b25
2 changed files with 1 additions and 31 deletions

View File

@ -29,7 +29,7 @@ endif()
add_library(hello SHARED ${hello_SOURCES})
target_link_libraries(hello ${Boost_LIBRARIES} base config icinga)
target_link_libraries(hello ${Boost_LIBRARIES} base config)
set_target_properties (
hello PROPERTIES

View File

@ -39,35 +39,5 @@ int Hello::Main(void)
{
Log(LogInformation, "Hello", "Hello World!");
Host::Ptr host = Host::GetByName("test");
CheckCommand::Ptr command = host->GetCheckCommand();
Dictionary::Ptr macros = new Dictionary();
command->Execute(host, CheckResult::Ptr(), macros);
std::cout << JsonEncode(macros) << std::endl;
Host::Ptr host2 = new Host();
Dictionary::Ptr attrs = new Dictionary();
attrs->Set("__name", "keks");
attrs->Set("type", "Host");
attrs->Set("check_command", "http");
attrs->Set("command_endpoint", "test");
Deserialize(host2, attrs, false, FAConfig);
host2->SetExtension("agent_service_name", "foobar");
static_pointer_cast<DynamicObject>(host2)->OnStateLoaded();
static_pointer_cast<DynamicObject>(host2)->OnConfigLoaded();
std::cout << host2->GetName() << std::endl;
host2->ExecuteCheck(macros, true);
Utility::Sleep(30);
return 0;
}