mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-29 21:18:02 +00:00
[3796] ccsession.cc|h renamed to command_interpreter.cc|h
This commit is contained in:
parent
ca03350e6f
commit
aa10ecc86f
@ -18,7 +18,7 @@
|
||||
#include <asiolink/io_service.h>
|
||||
#include <cc/data.h>
|
||||
#include <cc/session.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d2/d2_log.h>
|
||||
#include <d2/d_controller.h>
|
||||
#include <d2/d_process.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d2/d2_log.h>
|
||||
#include <d2/d2_cfg_mgr.h>
|
||||
#include <d2/d2_process.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d2/d2_log.h>
|
||||
#include <dhcp/libdhcp++.h>
|
||||
#include <d2/d_cfg_mgr.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <d2/d2_log.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d2/d_controller.h>
|
||||
#include <exceptions/exceptions.h>
|
||||
#include <log/logger_support.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d_test_stubs.h>
|
||||
#include <d2/bundy_d2_controller.h>
|
||||
#include <d2/spec_config.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d_test_stubs.h>
|
||||
#include <d2/d2_controller.h>
|
||||
#include <d2/d2_process.h>
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <asiolink/io_service.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d2/d2_process.h>
|
||||
#include <dhcp_ddns/ncr_io.h>
|
||||
#include <d_test_stubs.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <config/module_spec.h>
|
||||
#include <dhcpsrv/parsers/dhcp_parsers.h>
|
||||
#include <d2/d_cfg_mgr.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <d_test_stubs.h>
|
||||
#include <d2/spec_config.h>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <asiolink/io_service.h>
|
||||
|
||||
#include <cc/data.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
|
||||
#include <d2/d_controller.h>
|
||||
#include <d2/d_cfg_mgr.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <asiolink/asiolink.h>
|
||||
#include <cc/data.h>
|
||||
#include <cc/session.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp/iface_mgr.h>
|
||||
#include <dhcp4/json_config_parser.h>
|
||||
#include <dhcp4/ctrl_dhcp4_srv.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <asiolink/asiolink.h>
|
||||
#include <cc/data.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp4/dhcp4_srv.h>
|
||||
|
||||
namespace isc {
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp4/dhcp4_log.h>
|
||||
#include <dhcp/libdhcp++.h>
|
||||
#include <dhcp/option_definition.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp4/dhcp4_srv.h>
|
||||
#include <dhcp4/json_config_parser.h>
|
||||
#include <dhcp/option4_addrlst.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp/dhcp4.h>
|
||||
#include <dhcp4/ctrl_dhcp4_srv.h>
|
||||
#include <hooks/hooks_manager.h>
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define D2_UNITTEST_H
|
||||
|
||||
#include <dhcp4/dhcp4_srv.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include <asiolink/io_address.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp4/tests/dhcp4_test_utils.h>
|
||||
#include <dhcp/tests/pkt_captures.h>
|
||||
#include <dhcp/dhcp4.h>
|
||||
@ -42,7 +42,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <hooks/server_hooks.h>
|
||||
#include <hooks/hooks_manager.h>
|
||||
#include <config/ccsession.h>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <asiolink/io_address.h>
|
||||
#include <cc/data.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp4/json_config_parser.h>
|
||||
#include <dhcp4/tests/dhcp4_test_utils.h>
|
||||
#include <dhcp/option4_addrlst.h>
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <dhcpsrv/lease_mgr_factory.h>
|
||||
#include <dhcp4/dhcp4_srv.h>
|
||||
#include <asiolink/io_address.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <list>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp/dhcp4.h>
|
||||
#include <dhcp4/ctrl_dhcp4_srv.h>
|
||||
#include <dhcpsrv/cfgmgr.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <asiolink/asiolink.h>
|
||||
#include <cc/data.h>
|
||||
#include <cc/session.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp/iface_mgr.h>
|
||||
#include <dhcpsrv/dhcp_config_parser.h>
|
||||
#include <dhcpsrv/cfgmgr.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <asiolink/asiolink.h>
|
||||
#include <cc/data.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp6/dhcp6_srv.h>
|
||||
|
||||
namespace isc {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <asiolink/io_address.h>
|
||||
#include <cc/data.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp/libdhcp++.h>
|
||||
#include <dhcp6/json_config_parser.h>
|
||||
#include <dhcp6/dhcp6_log.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp/libdhcp++.h>
|
||||
#include <dhcp/option6_ia.h>
|
||||
#include <dhcp/iface_mgr.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcpsrv/cfgmgr.h>
|
||||
#include <dhcp6/ctrl_dhcp6_srv.h>
|
||||
#include <hooks/hooks_manager.h>
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define D2_UNITTEST_H
|
||||
|
||||
#include <dhcp6/dhcp6_srv.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <dhcp6/tests/dhcp6_test_utils.h>
|
||||
#include <dhcp6/tests/dhcp6_client.h>
|
||||
#include <dhcp/tests/pkt_captures.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <boost/pointer_cast.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <dhcp6/tests/dhcp6_test_utils.h>
|
||||
#include <dhcp6/json_config_parser.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace isc::data;
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <dhcp6/tests/dhcp6_test_utils.h>
|
||||
#include <dhcp/tests/pkt_captures.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
#include <unistd.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcp/dhcp6.h>
|
||||
#include <dhcp6/ctrl_dhcp6_srv.h>
|
||||
#include <dhcpsrv/cfgmgr.h>
|
||||
|
@ -17,7 +17,7 @@ BUILT_SOURCES = config_messages.h config_messages.cc
|
||||
lib_LTLIBRARIES = libkea-cfgclient.la
|
||||
libkea_cfgclient_la_SOURCES = config_data.h config_data.cc
|
||||
libkea_cfgclient_la_SOURCES += module_spec.h module_spec.cc
|
||||
libkea_cfgclient_la_SOURCES += ccsession.cc ccsession.h
|
||||
libkea_cfgclient_la_SOURCES += command_interpreter.cc command_interpreter.h
|
||||
libkea_cfgclient_la_SOURCES += config_log.h config_log.cc
|
||||
|
||||
libkea_cfgclient_la_LIBADD = $(top_builddir)/src/lib/cc/libkea-cc.la
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <exceptions/exceptions.h>
|
||||
|
||||
#include <config/config_log.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
|
||||
#include <log/logger_support.h>
|
||||
#include <log/logger_specification.h>
|
||||
@ -167,6 +167,9 @@ parseCommand(ConstElementPtr& arg, ConstElementPtr command) {
|
||||
return (cmd->stringValue());
|
||||
}
|
||||
|
||||
/// @todo: The code below should be reviewed whether it's still in use. If it is,
|
||||
/// it should be moved to a separate file.
|
||||
|
||||
namespace {
|
||||
// Temporary workaround functions for missing functionality in
|
||||
// getValue() (main problem described in ticket #993)
|
@ -17,7 +17,8 @@ TESTS_ENVIRONMENT = \
|
||||
TESTS =
|
||||
if HAVE_GTEST
|
||||
TESTS += run_unittests
|
||||
run_unittests_SOURCES = ccsession_unittests.cc module_spec_unittests.cc config_data_unittests.cc run_unittests.cc
|
||||
run_unittests_SOURCES = command_interpreter_unittests.cc module_spec_unittests.cc
|
||||
run_unittests_SOURCES += config_data_unittests.cc run_unittests.cc
|
||||
|
||||
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
|
||||
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <config/tests/data_def_unittests_config.h>
|
||||
#include <log/logger_name.h>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
@ -37,16 +37,7 @@ el(const std::string& str) {
|
||||
return (Element::fromJSON(str));
|
||||
}
|
||||
|
||||
class CCSessionTest : public ::testing::Test {
|
||||
protected:
|
||||
CCSessionTest()
|
||||
{
|
||||
}
|
||||
~CCSessionTest() {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(CCSessionTest, createAnswer) {
|
||||
TEST(CommandInterpreterTest, createAnswer) {
|
||||
ConstElementPtr answer;
|
||||
answer = createAnswer();
|
||||
EXPECT_EQ("{ \"result\": 0 }", answer->str());
|
||||
@ -62,7 +53,7 @@ TEST_F(CCSessionTest, createAnswer) {
|
||||
answer->str());
|
||||
}
|
||||
|
||||
TEST_F(CCSessionTest, parseAnswer) {
|
||||
TEST(CommandInterpreterTest, parseAnswer) {
|
||||
ConstElementPtr answer;
|
||||
ConstElementPtr arg;
|
||||
int rcode;
|
||||
@ -92,7 +83,7 @@ TEST_F(CCSessionTest, parseAnswer) {
|
||||
EXPECT_EQ("[ \"just\", \"some\", \"data\" ]", arg->str());
|
||||
}
|
||||
|
||||
TEST_F(CCSessionTest, createCommand) {
|
||||
TEST(CommandInterpreterTest, createCommand) {
|
||||
ConstElementPtr command;
|
||||
ConstElementPtr arg;
|
||||
|
||||
@ -115,7 +106,7 @@ TEST_F(CCSessionTest, createCommand) {
|
||||
command->str());
|
||||
}
|
||||
|
||||
TEST_F(CCSessionTest, parseCommand) {
|
||||
TEST(CommandInterpreterTest, parseCommand) {
|
||||
ConstElementPtr arg;
|
||||
std::string cmd;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcpsrv/lease_mgr_factory.h>
|
||||
#include <dhcpsrv/parsers/dbaccess_parser.h>
|
||||
#include <log/logger_support.h>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
#include <config.h>
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <cc/data.h>
|
||||
#include <dhcp/option.h>
|
||||
#include <dhcp/option_custom.h>
|
||||
|
@ -12,7 +12,7 @@
|
||||
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
#include <config/ccsession.h>
|
||||
#include <config/command_interpreter.h>
|
||||
#include <dhcpsrv/testutils/config_result_check.h>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/constants.hpp>
|
||||
|
Loading…
x
Reference in New Issue
Block a user