]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5046] Addressed review comments
authorThomas Markwalder <tmark@isc.org>
Tue, 3 Jan 2017 13:23:44 +0000 (08:23 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 3 Jan 2017 13:23:44 +0000 (08:23 -0500)
Added memfile without persistence to set_config unit tests. This eliminates
the tests attempting to create the csv file.

Updated copyrights.

Fixed misspelling.

17 files changed:
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/ctrl_dhcp4_srv.h
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp4/kea_controller.cc
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/dhcp4_test_utils.cc
src/bin/dhcp4/tests/kea_controller_unittest.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/ctrl_dhcp6_srv.h
src/bin/dhcp6/json_config_parser.cc
src/bin/dhcp6/kea_controller.cc
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
src/bin/dhcp6/tests/dhcp6_test_utils.cc
src/lib/config/command_mgr.cc
src/lib/config/config_messages.mes
src/lib/testutils/io_utils.cc
src/lib/testutils/io_utils.h

index 05879f72356179589d34903e05519a2c90bd5639..c75c532efb33d3b68a598cffc3bd9764e619584d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-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
index 6ef362cd41d84bacfb9351cfbc814ded1422a2ab..2d96b344270f48e36cb1164e7d38fb3eef107226 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-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
index 4b50286056413f5913e33fb299bc5e93bf7c5afe..7e29954dcd395d2f6139042f3442cbb7bd8021c2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-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
index ed74214045c6d5590aec95ea64fb5b380db70d1b..1c3e7830344cd914fb1f71f51c1d28bc9b09c314 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-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
index 47de13d40ead33b1f4b641e1ddcd3f274e7385c7..615274e5f5ac6ec90fd56ecdcdc43865370eff45 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-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
@@ -504,6 +504,11 @@ TEST_F(CtrlChannelDhcpv4SrvTest, set_config) {
         "        \"valid-lifetime\": 4000, \n"
         "        \"renew-timer\": 1000, \n"
         "        \"rebind-timer\": 2000, \n"
+        "        \"lease-database\": { \n"
+        "           \"type\": \"memfile\", \n"
+        "           \"persist\":false, \n"
+        "           \"lfc-interval\": 0  \n"
+        "        }, \n"
         "       \"expired-leases-processing\": { \n"
         "            \"reclaim-timer-wait-time\": 0, \n"
         "            \"hold-reclaimed-time\": 0, \n"
@@ -585,7 +590,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, set_config) {
 
     // Should fail with a syntax error
     EXPECT_EQ("{ \"result\": 1, "
-              "\"text\": \"unsupported parameter: BOGUS (<string>:15:26)\" }",
+              "\"text\": \"unsupported parameter: BOGUS (<string>:20:26)\" }",
               response);
 
     // Check that the config was not lost
index 3126447cfbbbabc9ed25b96e23980473fcc56166..4da164d8c54765eb2cbbb87d3f23a1658e4c9996 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-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
index 78d2c5651c11880b5e4b36e3ed722190980eba2e..ccdd355c1a3b886b41422c9f490dddcc3ccaf4bd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-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
index c9ff04d85ac57f897f56fe7322590fac58634f0f..642a8316086d3667871e1df1b0227ff3b91dba63 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-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
index 1c6bde1664230ef72b9903cc2fcb6b13a4e396fd..23abb69632dec1c0962700421d2bdd5265efd5ed 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-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
index 648ffa9e27647a4995db1f92ac9c73aec9f3b81b..571e4662c99bee2af43880340402170bf69f71db 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-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
index 8ee2b64b477dc76b8b9acd1c06e7817882946880..31402c10fb5dada7a8a2c14bb5bdfd6cea8ad0bb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-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
index 3f1331374c53f470e9be8b0af83a9947c7daf86e..12647f96eee66e296f1f450b7d71e2ee361b02ed 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-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
@@ -369,7 +369,12 @@ TEST_F(CtrlChannelDhcpv6SrvTest, set_config) {
         "        \"valid-lifetime\": 4000, \n"
         "        \"renew-timer\": 1000, \n"
         "        \"rebind-timer\": 2000, \n"
-        "       \"expired-leases-processing\": { \n"
+        "        \"lease-database\": { \n"
+        "           \"type\": \"memfile\", \n"
+        "           \"persist\":false, \n"
+        "           \"lfc-interval\": 0  \n"
+        "        }, \n"
+        "        \"expired-leases-processing\": { \n"
         "            \"reclaim-timer-wait-time\": 0, \n"
         "            \"hold-reclaimed-time\": 0, \n"
         "            \"flush-reclaimed-timer-wait-time\": 0 \n"
@@ -450,7 +455,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, set_config) {
 
     // Should fail with a syntax error
     EXPECT_EQ("{ \"result\": 1, "
-              "\"text\": \"unsupported parameter: BOGUS (<string>:16:26)\" }",
+              "\"text\": \"unsupported parameter: BOGUS (<string>:21:26)\" }",
               response);
 
     // Check that the config was not lost
index a1c74dab108fb3d74e4d9f2a5d1b3071dfba1bc9..3ae1478a31da4b73c47774d0caff1058e13cdcf2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-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
index c3e3b43fe6676bf43c5af7bface3eb54ffe87bc2..cf9dfb73068b488f5e4b1aedc188a63f51caccf3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-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
@@ -177,7 +177,7 @@ CommandMgr::commandReader(int sockfd) {
 
     if (!rsp) {
         LOG_WARN(command_logger, COMMAND_RESPONSE_ERROR);
-        // Only close the dupped socket if it's different (should be)
+        // Only close the duped socket if it's different (should be)
         if (rsp_fd != sockfd) {
             close(rsp_fd);
         }
@@ -211,7 +211,7 @@ CommandMgr::commandReader(int sockfd) {
                   .arg(len).arg(sockfd).arg(strerror(saverr));
     }
 
-    // Only close the dupped socket if it's different (should be)
+    // Only close the duped socket if it's different (should be)
     if (rsp_fd != sockfd) {
         close(rsp_fd);
     }
index ef7c0928819ef6cb90860d01d2f870af44881181..ed5df85c8b8ca6f749adcb3fd31735256f8126c8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2011-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
index caf9437071535c9a48d79a220a9b70e5f091cd03..384cb68481ba56ef46dc1a94ce65139fe741a3ec 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-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
index 61a18f8c79f5197a840e8229de14ceff0a487b12..9155a7412e37092a890f37d1071714368bfa2bac 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-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