[icinga-checkins] icinga.org: icinga2/master: Remove debug code

git at icinga.org git at icinga.org
Thu Nov 13 15:53:31 CET 2014


Module: icinga2
Branch: master
Commit: bb04f66b2536925b69c1a3e93ee33964b7a38cd8
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=bb04f66b2536925b69c1a3e93ee33964b7a38cd8

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Nov 13 15:53:15 2014 +0100

Remove debug code

refs #7559

---

 lib/hello/CMakeLists.txt |    2 +-
 lib/hello/hello.cpp      |   30 ------------------------------
 2 files changed, 1 insertion(+), 31 deletions(-)

diff --git a/lib/hello/CMakeLists.txt b/lib/hello/CMakeLists.txt
index 2a11666..ea1244a 100644
--- a/lib/hello/CMakeLists.txt
+++ b/lib/hello/CMakeLists.txt
@@ -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
diff --git a/lib/hello/hello.cpp b/lib/hello/hello.cpp
index 6013803..1a4ba53 100644
--- a/lib/hello/hello.cpp
+++ b/lib/hello/hello.cpp
@@ -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;
 }



More information about the icinga-checkins mailing list