summaryrefslogtreecommitdiffstats
path: root/src/bin/netconf
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2018-11-28 23:21:24 +0100
committerFrancis Dupont <fdupont@isc.org>2018-12-11 21:43:36 +0100
commit1294a55fc06a6748ce53b8d2a8fc442835f87a32 (patch)
treee4e6d131f7919a92ec9ef635f3de0f041ca0de00 /src/bin/netconf
parent[#339, !169] Added macro expansion control. (diff)
downloadkea-1294a55fc06a6748ce53b8d2a8fc442835f87a32.tar.xz
kea-1294a55fc06a6748ce53b8d2a8fc442835f87a32.zip
[284-need-dhcp6-example-for-netconf] Removed simple config and add simple DHCPv6 one
Diffstat (limited to 'src/bin/netconf')
-rw-r--r--src/bin/netconf/tests/get_config_unittest.cc2
-rw-r--r--src/bin/netconf/tests/parser_unittests.cc4
-rw-r--r--src/bin/netconf/tests/testdata/get_config.json57
3 files changed, 11 insertions, 52 deletions
diff --git a/src/bin/netconf/tests/get_config_unittest.cc b/src/bin/netconf/tests/get_config_unittest.cc
index 26a96af7b7..77dd2ab6cd 100644
--- a/src/bin/netconf/tests/get_config_unittest.cc
+++ b/src/bin/netconf/tests/get_config_unittest.cc
@@ -230,7 +230,7 @@ public:
TEST_F(NetconfGetCfgTest, simple) {
// get the simple configuration
- std::string simple_file = string(CFG_EXAMPLES) + "/" + "simple.json";
+ std::string simple_file = string(CFG_EXAMPLES) + "/" + "simple-dhcp4.json";
std::string config;
ASSERT_NO_THROW(config = readFile(simple_file));
diff --git a/src/bin/netconf/tests/parser_unittests.cc b/src/bin/netconf/tests/parser_unittests.cc
index f3d8ff2b5b..01cdd0ce4f 100644
--- a/src/bin/netconf/tests/parser_unittests.cc
+++ b/src/bin/netconf/tests/parser_unittests.cc
@@ -376,8 +376,8 @@ void testFile(const std::string& fname) {
TEST(ParserTest, file) {
vector<string> configs;
configs.push_back("comments.json");
- configs.push_back("simple.json");
configs.push_back("simple-dhcp4.json");
+ configs.push_back("simple-dhcp6.json");
for (int i = 0; i<configs.size(); i++) {
testFile(string(CFG_EXAMPLES) + "/" + configs[i]);
@@ -464,7 +464,7 @@ TEST(ParserTest, errors) {
testError("<?include\n",
ParserContext::PARSER_JSON,
"Directive not closed.");
- string file = string(CFG_EXAMPLES) + "/" + "simple.json";
+ string file = string(CFG_EXAMPLES) + "/" + "simple-dhcp4.json";
testError("<?include \"" + file + "\"\n",
ParserContext::PARSER_JSON,
"Directive not closed.");
diff --git a/src/bin/netconf/tests/testdata/get_config.json b/src/bin/netconf/tests/testdata/get_config.json
index 42645769c3..38c6bceb7d 100644
--- a/src/bin/netconf/tests/testdata/get_config.json
+++ b/src/bin/netconf/tests/testdata/get_config.json
@@ -1,43 +1,11 @@
{
"Netconf": {
- "boot-update": false,
- "hooks-libraries": [
- {
- "library": "/tmp/ky/src/bin/netconf/tests/.libs/libbasic.so",
- "parameters": {
- "param1": "foo"
- }
- }
- ],
+ "boot-update": true,
+ "hooks-libraries": [ ],
"managed-servers": {
- "ca": {
- "boot-update": false,
- "control-socket": {
- "socket-name": "",
- "socket-type": "http",
- "socket-url": "http://127.0.0.1:8000/"
- },
- "model": "kea-ctrl-agent",
- "subscribe-changes": true,
- "validate-changes": true
- },
- "d2": {
- "boot-update": false,
- "control-socket": {
- "socket-name": "",
- "socket-type": "stdout",
- "socket-url": "http://127.0.0.1:8000/",
- "user-context": {
- "in-use": false
- }
- },
- "model": "kea-dhcp-ddns",
- "subscribe-changes": true,
- "validate-changes": true
- },
"dhcp4": {
- "comment": "DHCP4 server",
- "boot-update": false,
+ "comment": "Kea DHCP4 server serving network on floor 13",
+ "boot-update": true,
"control-socket": {
"socket-name": "/tmp/kea4-ctrl-socket",
"socket-type": "unix",
@@ -45,19 +13,10 @@
},
"model": "kea-dhcp4-server",
"subscribe-changes": true,
- "validate-changes": true
- },
- "dhcp6": {
- "boot-update": false,
- "control-socket": {
- "socket-name": "/tmp/kea6-ctrl-socket",
- "socket-type": "unix",
- "socket-url": "http://127.0.0.1:8000/"
- },
- "model": "kea-dhcp6-server",
- "subscribe-changes": true,
- "validate-changes": true
+ "validate-changes": false
}
- }
+ },
+ "subscribe-changes": true,
+ "validate-changes": true
}
}