Browse Source

[5107] Renamed ctrl_agent_* to ca_* and unittest to unittests.

Marcin Siodelski 8 years ago
parent
commit
58859405e5

+ 1 - 1
configure.ac

@@ -1601,7 +1601,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/bin/Makefile
                  src/bin/agent/Makefile
                  src/bin/agent/tests/Makefile
-                 src/bin/agent/tests/ctrl_agent_process_tests.sh
+                 src/bin/agent/tests/ca_process_tests.sh
                  src/bin/d2/Makefile
                  src/bin/d2/tests/Makefile
                  src/bin/d2/tests/d2_process_tests.sh

+ 2 - 2
src/bin/agent/.gitignore

@@ -1,6 +1,6 @@
 /kea-ctrl-agent
-/ctrl_agent_messages.cc
-/ctrl_agent_messages.h
+/ca_messages.cc
+/ca_messages.h
 /s-messages
 /kea-ctrl-agent.8
 

+ 14 - 14
src/bin/agent/Makefile.am

@@ -9,7 +9,7 @@ if USE_STATIC_LINK
 AM_LDFLAGS = -static
 endif
 
-CLEANFILES  = *.gcno *.gcda ctrl_agent_messages.h ctrl_agent_messages.cc s-messages
+CLEANFILES  = *.gcno *.gcda ca_messages.h ca_messages.cc s-messages
 
 man_MANS = kea-ctrl-agent.8
 DISTCLEANFILES = $(man_MANS)
@@ -29,13 +29,13 @@ $(man_MANS):
 
 endif
 
-ctrl_agent_messages.h ctrl_agent_messages.cc: s-messages
+ca_messages.h ca_messages.cc: s-messages
 
-s-messages: ctrl_agent_messages.mes
-	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/agent/ctrl_agent_messages.mes
+s-messages: ca_messages.mes
+	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/agent/ca_messages.mes
 	touch $@
 
-BUILT_SOURCES = ctrl_agent_messages.h ctrl_agent_messages.cc
+BUILT_SOURCES = ca_messages.h ca_messages.cc
 
 
 # convenience archive
@@ -44,17 +44,17 @@ noinst_LTLIBRARIES = libagent.la
 
 libagent_la_SOURCES  = agent_parser.cc agent_parser.h
 libagent_la_SOURCES += agent_lexer.cc
-libagent_la_SOURCES += ctrl_agent_cfg_mgr.cc ctrl_agent_cfg_mgr.h
-libagent_la_SOURCES += ctrl_agent_controller.cc ctrl_agent_controller.h
-libagent_la_SOURCES += ctrl_agent_command_mgr.cc ctrl_agent_command_mgr.h
-libagent_la_SOURCES += ctrl_agent_log.cc ctrl_agent_log.h
-libagent_la_SOURCES += ctrl_agent_process.cc ctrl_agent_process.h
-libagent_la_SOURCES += ctrl_agent_response_creator.cc ctrl_agent_response_creator.h
-libagent_la_SOURCES += ctrl_agent_response_creator_factory.h
+libagent_la_SOURCES += ca_cfg_mgr.cc ca_cfg_mgr.h
+libagent_la_SOURCES += ca_controller.cc ca_controller.h
+libagent_la_SOURCES += ca_command_mgr.cc ca_command_mgr.h
+libagent_la_SOURCES += ca_log.cc ca_log.h
+libagent_la_SOURCES += ca_process.cc ca_process.h
+libagent_la_SOURCES += ca_response_creator.cc ca_response_creator.h
+libagent_la_SOURCES += ca_response_creator_factory.h
 libagent_la_SOURCES += parser_context.cc parser_context.h parser_context_decl.h
 
-nodist_libagent_la_SOURCES = ctrl_agent_messages.h ctrl_agent_messages.cc
-EXTRA_DIST += ctrl_agent_messages.mes
+nodist_libagent_la_SOURCES = ca_messages.h ca_messages.cc
+EXTRA_DIST += ca_messages.mes
 EXTRA_DIST += agent_lexer.ll
 EXTRA_DIST += agent_parser.yy
 

+ 2 - 2
src/bin/agent/ctrl_agent_cfg_mgr.cc

@@ -1,11 +1,11 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_cfg_mgr.h>
+#include <agent/ca_cfg_mgr.h>
 
 using namespace isc::dhcp;
 using namespace isc::process;

src/bin/agent/ctrl_agent_cfg_mgr.h → src/bin/agent/ca_cfg_mgr.h


+ 1 - 1
src/bin/agent/ctrl_agent_command_mgr.cc

@@ -4,7 +4,7 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-#include <agent/ctrl_agent_command_mgr.h>
+#include <agent/ca_command_mgr.h>
 #include <cc/data.h>
 #include <boost/pointer_cast.hpp>
 

src/bin/agent/ctrl_agent_command_mgr.h → src/bin/agent/ca_command_mgr.h


+ 2 - 2
src/bin/agent/ctrl_agent_controller.cc

@@ -6,8 +6,8 @@
 
 #include <config.h>
 
-#include <agent/ctrl_agent_controller.h>
-#include <agent/ctrl_agent_process.h>
+#include <agent/ca_controller.h>
+#include <agent/ca_process.h>
 
 using namespace isc::process;
 

src/bin/agent/ctrl_agent_controller.h → src/bin/agent/ca_controller.h


+ 2 - 2
src/bin/agent/ctrl_agent_log.cc

@@ -1,10 +1,10 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-#include <agent/ctrl_agent_log.h>
+#include <agent/ca_log.h>
 
 namespace isc {
 namespace agent {

+ 2 - 2
src/bin/agent/ctrl_agent_log.h

@@ -1,4 +1,4 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -9,7 +9,7 @@
 
 #include <log/logger_support.h>
 #include <log/macros.h>
-#include <agent/ctrl_agent_messages.h>
+#include <agent/ca_messages.h>
 
 namespace isc {
 namespace agent {

src/bin/agent/ctrl_agent_messages.mes → src/bin/agent/ca_messages.mes


+ 3 - 3
src/bin/agent/ctrl_agent_process.cc

@@ -5,9 +5,9 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_process.h>
-#include <agent/ctrl_agent_response_creator_factory.h>
-#include <agent/ctrl_agent_log.h>
+#include <agent/ca_process.h>
+#include <agent/ca_response_creator_factory.h>
+#include <agent/ca_log.h>
 #include <asiolink/io_address.h>
 #include <cc/command_interpreter.h>
 #include <http/listener.h>

+ 2 - 2
src/bin/agent/ctrl_agent_process.h

@@ -1,4 +1,4 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -7,7 +7,7 @@
 #ifndef CTRL_AGENT_PROCESS_H
 #define CTRL_AGENT_PROCESS_H
 
-#include <agent/ctrl_agent_cfg_mgr.h>
+#include <agent/ca_cfg_mgr.h>
 #include <process/d_process.h>
 
 namespace isc {

+ 2 - 2
src/bin/agent/ctrl_agent_response_creator.cc

@@ -4,8 +4,8 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-#include <agent/ctrl_agent_command_mgr.h>
-#include <agent/ctrl_agent_response_creator.h>
+#include <agent/ca_command_mgr.h>
+#include <agent/ca_response_creator.h>
 #include <cc/data.h>
 #include <http/post_request_json.h>
 #include <http/response_json.h>

+ 1 - 1
src/bin/agent/ctrl_agent_response_creator.h

@@ -7,7 +7,7 @@
 #ifndef CTRL_AGENT_RESPONSE_CREATOR_H
 #define CTRL_AGENT_RESPONSE_CREATOR_H
 
-#include <agent/ctrl_agent_command_mgr.h>
+#include <agent/ca_command_mgr.h>
 #include <http/response_creator.h>
 #include <boost/shared_ptr.hpp>
 

+ 1 - 1
src/bin/agent/ctrl_agent_response_creator_factory.h

@@ -7,7 +7,7 @@
 #ifndef CTRL_AGENT_RESPONSE_CREATOR_FACTORY_H
 #define CTRL_AGENT_RESPONSE_CREATOR_FACTORY_H
 
-#include <agent/ctrl_agent_response_creator.h>
+#include <agent/ca_response_creator.h>
 #include <http/response_creator_factory.h>
 
 namespace isc {

+ 2 - 2
src/bin/agent/main.cc

@@ -1,11 +1,11 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_controller.h>
+#include <agent/ca_controller.h>
 #include <exceptions/exceptions.h>
 #include <cstdlib>
 #include <iostream>

+ 2 - 2
src/bin/agent/tests/.gitignore

@@ -1,2 +1,2 @@
-/ctrl_agent_unittest
-/ctrl_agent_process_tests.sh
+/ca_unittests
+/ca_process_tests.sh

+ 41 - 41
src/bin/agent/tests/Makefile.am

@@ -1,11 +1,11 @@
 SHTESTS =
 # The test of dynamic reconfiguration based on signals will work only
 # if we are using file based configuration approach.
-SHTESTS += ctrl_agent_process_tests.sh
+SHTESTS += ca_process_tests.sh
 
-noinst_SCRIPTS = ctrl_agent_process_tests.sh
+noinst_SCRIPTS = ca_process_tests.sh
 
-EXTRA_DIST  = ctrl_agent_process_tests.sh.in
+EXTRA_DIST  = ca_process_tests.sh.in
 
 # test using command-line arguments, so use check-local target instead of TESTS
 check-local:
@@ -26,7 +26,7 @@ AM_CPPFLAGS += -DCFG_EXAMPLES=\"$(abs_top_srcdir)/doc/examples/agent\"
 
 CLEANFILES = $(builddir)/interfaces.txt $(builddir)/logger_lockfile
 
-DISTCLEANFILES = ctrl_agent_process_tests.sh
+DISTCLEANFILES = ca_process_tests.sh
 
 AM_CXXFLAGS = $(KEA_CXXFLAGS)
 
@@ -40,43 +40,43 @@ TESTS_ENVIRONMENT = \
 TESTS =
 if HAVE_GTEST
 
-TESTS += ctrl_agent_unittest
-
-ctrl_agent_unittest_SOURCES  = ctrl_agent_cfg_mgr_unittest.cc
-ctrl_agent_unittest_SOURCES += ctrl_agent_command_mgr_unittest.cc
-ctrl_agent_unittest_SOURCES += ctrl_agent_controller_unittest.cc
-ctrl_agent_unittest_SOURCES += ctrl_agent_process_unittest.cc
-ctrl_agent_unittest_SOURCES += ctrl_agent_response_creator_unittest.cc
-ctrl_agent_unittest_SOURCES += ctrl_agent_response_creator_factory_unittest.cc
-ctrl_agent_unittest_SOURCES += ctrl_agent_unittest.cc
-ctrl_agent_unittest_SOURCES += parser_unittest.cc
-
-ctrl_agent_unittest_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
-ctrl_agent_unittest_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
-
-ctrl_agent_unittest_LDADD = $(top_builddir)/src/bin/agent/libagent.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/process/testutils/libprocesstest.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/process/libkea-process.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/http/libkea-http.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
-ctrl_agent_unittest_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
-ctrl_agent_unittest_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS)
-ctrl_agent_unittest_LDADD += $(BOOST_LIBS) $(GTEST_LDADD)
+TESTS += ca_unittests
+
+ca_unittests_SOURCES  = ca_cfg_mgr_unittests.cc
+ca_unittests_SOURCES += ca_command_mgr_unittests.cc
+ca_unittests_SOURCES += ca_controller_unittests.cc
+ca_unittests_SOURCES += ca_process_unittests.cc
+ca_unittests_SOURCES += ca_response_creator_unittests.cc
+ca_unittests_SOURCES += ca_response_creator_factory_unittests.cc
+ca_unittests_SOURCES += ca_unittests.cc
+ca_unittests_SOURCES += parser_unittests.cc
+
+ca_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
+ca_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
+
+ca_unittests_LDADD = $(top_builddir)/src/bin/agent/libagent.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/process/testutils/libprocesstest.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/process/libkea-process.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/http/libkea-http.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
+ca_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+ca_unittests_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS)
+ca_unittests_LDADD += $(BOOST_LIBS) $(GTEST_LDADD)
 
 endif
 

+ 2 - 2
src/bin/agent/tests/ctrl_agent_cfg_mgr_unittest.cc

@@ -1,11 +1,11 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_cfg_mgr.h>
+#include <agent/ca_cfg_mgr.h>
 #include <process/testutils/d_test_stubs.h>
 #include <boost/scoped_ptr.hpp>
 #include <gtest/gtest.h>

+ 1 - 1
src/bin/agent/tests/ctrl_agent_command_mgr_unittest.cc

@@ -5,7 +5,7 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_command_mgr.h>
+#include <agent/ca_command_mgr.h>
 #include <cc/command_interpreter.h>
 #include <gtest/gtest.h>
 

+ 3 - 3
src/bin/agent/tests/ctrl_agent_controller_unittest.cc

@@ -1,12 +1,12 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_controller.h>
-#include <agent/ctrl_agent_process.h>
+#include <agent/ca_controller.h>
+#include <agent/ca_process.h>
 #include <process/testutils/d_test_stubs.h>
 #include <boost/pointer_cast.hpp>
 

src/bin/agent/tests/ctrl_agent_process_tests.sh.in → src/bin/agent/tests/ca_process_tests.sh.in


+ 3 - 3
src/bin/agent/tests/ctrl_agent_process_unittest.cc

@@ -1,12 +1,12 @@
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_cfg_mgr.h>
-#include <agent/ctrl_agent_process.h>
+#include <agent/ca_cfg_mgr.h>
+#include <agent/ca_process.h>
 #include <asiolink/interval_timer.h>
 #include <asiolink/io_service.h>
 #include <process/testutils/d_test_stubs.h>

+ 2 - 2
src/bin/agent/tests/ctrl_agent_response_creator_factory_unittest.cc

@@ -5,8 +5,8 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_response_creator.h>
-#include <agent/ctrl_agent_response_creator_factory.h>
+#include <agent/ca_response_creator.h>
+#include <agent/ca_response_creator_factory.h>
 #include <boost/pointer_cast.hpp>
 #include <gtest/gtest.h>
 

+ 2 - 2
src/bin/agent/tests/ctrl_agent_response_creator_unittest.cc

@@ -5,8 +5,8 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <agent/ctrl_agent_command_mgr.h>
-#include <agent/ctrl_agent_response_creator.h>
+#include <agent/ca_command_mgr.h>
+#include <agent/ca_response_creator.h>
 #include <cc/command_interpreter.h>
 #include <http/post_request.h>
 #include <http/post_request_json.h>

src/bin/agent/tests/ctrl_agent_unittest.cc → src/bin/agent/tests/ca_unittests.cc


src/bin/agent/tests/parser_unittest.cc → src/bin/agent/tests/parser_unittests.cc