]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2601] clean up header includes and makefiles in NETCONF code
authorAndrei Pavel <andrei@isc.org>
Mon, 31 Oct 2022 16:27:42 +0000 (18:27 +0200)
committerRazvan Becheriu <razvan@isc.org>
Fri, 25 Nov 2022 16:15:33 +0000 (18:15 +0200)
103 files changed:
src/bin/netconf/control_socket.h
src/bin/netconf/http_control_socket.cc
src/bin/netconf/http_control_socket.h
src/bin/netconf/location.hh
src/bin/netconf/main.cc
src/bin/netconf/netconf.cc
src/bin/netconf/netconf.h
src/bin/netconf/netconf_cfg_mgr.cc
src/bin/netconf/netconf_cfg_mgr.h
src/bin/netconf/netconf_config.cc
src/bin/netconf/netconf_config.h
src/bin/netconf/netconf_controller.cc
src/bin/netconf/netconf_controller.h
src/bin/netconf/netconf_log.cc
src/bin/netconf/netconf_log.h
src/bin/netconf/netconf_parser.cc
src/bin/netconf/netconf_parser.h
src/bin/netconf/netconf_parser.yy
src/bin/netconf/netconf_process.cc
src/bin/netconf/netconf_process.h
src/bin/netconf/parser_context.cc
src/bin/netconf/parser_context.h
src/bin/netconf/parser_context_decl.h
src/bin/netconf/simple_parser.cc
src/bin/netconf/simple_parser.h
src/bin/netconf/stdout_control_socket.cc
src/bin/netconf/stdout_control_socket.h
src/bin/netconf/tests/Makefile.am
src/bin/netconf/tests/basic_library.cc
src/bin/netconf/tests/control_socket_unittests.cc
src/bin/netconf/tests/get_config_unittest.cc
src/bin/netconf/tests/netconf_cfg_mgr_unittests.cc
src/bin/netconf/tests/netconf_controller_unittests.cc
src/bin/netconf/tests/netconf_process_unittests.cc
src/bin/netconf/tests/netconf_unittests.cc
src/bin/netconf/tests/parser_unittests.cc
src/bin/netconf/tests/run_unittests.cc
src/bin/netconf/tests/test_libraries.h.in
src/bin/netconf/unix_control_socket.cc
src/bin/netconf/unix_control_socket.h
src/lib/yang/adaptor.cc
src/lib/yang/adaptor.h
src/lib/yang/adaptor_config.h
src/lib/yang/adaptor_host.cc
src/lib/yang/adaptor_option.cc
src/lib/yang/adaptor_option.h
src/lib/yang/adaptor_pool.cc
src/lib/yang/adaptor_pool.h
src/lib/yang/adaptor_subnet.h
src/lib/yang/pretests/Makefile.am
src/lib/yang/pretests/sysrepo_setup_tests.cc
src/lib/yang/tests/Makefile.am
src/lib/yang/tests/adaptor_config_unittests.cc
src/lib/yang/tests/adaptor_host_unittests.cc
src/lib/yang/tests/adaptor_option_unittests.cc
src/lib/yang/tests/adaptor_pool_unittests.cc
src/lib/yang/tests/adaptor_subnet_unittests.cc
src/lib/yang/tests/adaptor_unittests.cc
src/lib/yang/tests/config_unittests.cc
src/lib/yang/tests/run_unittests.cc
src/lib/yang/tests/sysrepo_setup.h
src/lib/yang/tests/translator_class_unittests.cc
src/lib/yang/tests/translator_control_socket_unittests.cc
src/lib/yang/tests/translator_database_unittests.cc
src/lib/yang/tests/translator_host_unittests.cc
src/lib/yang/tests/translator_logger_unittests.cc
src/lib/yang/tests/translator_option_data_unittests.cc
src/lib/yang/tests/translator_option_def_unittests.cc
src/lib/yang/tests/translator_pd_pool_unittests.cc
src/lib/yang/tests/translator_pool_unittests.cc
src/lib/yang/tests/translator_shared_network_unittests.cc
src/lib/yang/tests/translator_subnet_unittests.cc
src/lib/yang/tests/translator_unittests.cc
src/lib/yang/tests/translator_utils_unittests.cc
src/lib/yang/tests/yang_configs.h
src/lib/yang/testutils/translator_test.cc
src/lib/yang/testutils/translator_test.h
src/lib/yang/translator.cc
src/lib/yang/translator_class.cc
src/lib/yang/translator_class.h
src/lib/yang/translator_config.cc
src/lib/yang/translator_config.h
src/lib/yang/translator_control_socket.cc
src/lib/yang/translator_control_socket.h
src/lib/yang/translator_database.cc
src/lib/yang/translator_database.h
src/lib/yang/translator_host.cc
src/lib/yang/translator_host.h
src/lib/yang/translator_logger.cc
src/lib/yang/translator_logger.h
src/lib/yang/translator_option_data.cc
src/lib/yang/translator_option_data.h
src/lib/yang/translator_option_def.cc
src/lib/yang/translator_option_def.h
src/lib/yang/translator_pd_pool.cc
src/lib/yang/translator_pd_pool.h
src/lib/yang/translator_pool.cc
src/lib/yang/translator_pool.h
src/lib/yang/translator_shared_network.cc
src/lib/yang/translator_shared_network.h
src/lib/yang/translator_subnet.h
src/lib/yang/yang_revisions.h
src/lib/yang/yang_revisions.h.skel

index 180a4247cb61cdbb3f2932ef87e421b90aaccdf0..50192a35231d014c38f60913128b0d974a790b2d 100644 (file)
@@ -10,8 +10,8 @@
 #ifndef CONTROL_SOCKET_H
 #define CONTROL_SOCKET_H
 
-#include <netconf/netconf_config.h>
 #include <exceptions/exceptions.h>
+#include <netconf/netconf_config.h>
 
 namespace isc {
 namespace netconf {
index 192ad08f3c63ecaa3ca8ed84ac1967b85f466bdc..cf90ebfc326d1e3897765cad0b675c0b4476dbbe 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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,15 +9,15 @@
 
 #include <config.h>
 
-#include <netconf/http_control_socket.h>
-#include <cc/command_interpreter.h>
 #include <asiolink/asio_wrapper.h>
 #include <asiolink/io_service.h>
 #include <asiolink/tls_socket.h>
+#include <cc/command_interpreter.h>
+#include <config/timeouts.h>
 #include <http/client.h>
 #include <http/post_request_json.h>
 #include <http/response_json.h>
-#include <config/timeouts.h>
+#include <netconf/http_control_socket.h>
 
 using namespace std;
 using namespace isc::asiolink;
index 42bcb308557e2c76243896e35b6dcab47bc63b91..86f62cda6123741df9883a456701d8852d4992e7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 40ace584a96c448e849385bc7160709d93a8c5d6..842a1114e856c3d44fc03873ed851109aeb8b34f 100644 (file)
@@ -300,7 +300,7 @@ namespace isc { namespace netconf {
   }
 
 #line 14 "netconf_parser.yy"
-} }  // isc::netconf
+} } // isc::netconf
 #line 305 "location.hh"
 
 #endif // !YY_NETCONF_LOCATION_HH_INCLUDED
index 3481b5b171eadbe26082acc07b204d9b9c3af705..24baae91feda7777f5c6700643b19b76be4b4ae8 100644 (file)
@@ -5,8 +5,10 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
-#include <netconf/netconf_controller.h>
+
 #include <exceptions/exceptions.h>
+#include <netconf/netconf_controller.h>
+
 #include <cstdlib>
 #include <iostream>
 
index fc768413e696c8105621a681132ec1ef5b3f5407..7c9ec92e80f524d258de108553eae3b01290f383 100644 (file)
@@ -9,16 +9,15 @@
 
 #include <config.h>
 
+#include <cc/command_interpreter.h>
 #include <netconf/netconf.h>
 #include <netconf/netconf_controller.h>
 #include <netconf/netconf_log.h>
-#include <cc/command_interpreter.h>
 #include <yang/translator_config.h>
 #include <yang/yang_revisions.h>
 
-#include <boost/algorithm/string.hpp>
-
 #include <sstream>
+#include <vector>
 
 using namespace std;
 using namespace isc::config;
index cdf0373290ca598d51beb0b75554d465ca02658e..54ee61adb6f2361e7be80905a7f98acdf78447f4 100644 (file)
@@ -9,9 +9,9 @@
 #ifndef NETCONF_H
 #define NETCONF_H
 
-#include <netconf/netconf_cfg_mgr.h>
 #include <netconf/control_socket.h>
 #include <netconf/http_control_socket.h>
+#include <netconf/netconf_cfg_mgr.h>
 #include <netconf/stdout_control_socket.h>
 #include <netconf/unix_control_socket.h>
 
index 0945e755f1c137ab786c605d1d64aec7664e2a0c..f9f9512f5b256de66f6001c90371f4a78313b2e4 100644 (file)
@@ -1,16 +1,20 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 <cc/command_interpreter.h>
+#include <cc/simple_parser.h>
+#include <exceptions/exceptions.h>
 #include <netconf/netconf_cfg_mgr.h>
 #include <netconf/netconf_log.h>
 #include <netconf/simple_parser.h>
-#include <cc/simple_parser.h>
-#include <cc/command_interpreter.h>
-#include <exceptions/exceptions.h>
+
+#include <map>
+#include <sstream>
 
 using namespace isc::config;
 using namespace isc::dhcp;
index b9a8279665e877f1de061b8ebc82ee4ae25e577c..a8d37f53feac3d3029afdf02cfddce4f56ba66be 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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,10 +9,9 @@
 
 #include <cc/data.h>
 #include <hooks/hooks_config.h>
-#include <process/d_cfg_mgr.h>
 #include <netconf/netconf_config.h>
-#include <boost/pointer_cast.hpp>
-#include <map>
+#include <process/d_cfg_mgr.h>
+
 #include <string>
 
 namespace isc {
index b3e94257cce8c2c0c608c2dd36c7e4242d7078b8..b3ed215051369c1aa0ee58fc233f045f6aef2190 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,13 +6,10 @@
 
 #include <config.h>
 
-#include <netconf/netconf_log.h>
+#include <asiolink/io_error.h>
 #include <netconf/netconf_cfg_mgr.h>
+#include <netconf/netconf_log.h>
 #include <exceptions/exceptions.h>
-#include <asiolink/io_error.h>
-
-#include <boost/foreach.hpp>
-#include <boost/algorithm/string/predicate.hpp>
 
 #include <sstream>
 #include <string>
index 1b9d82cd377b2ca50479e3b4c3bd256d7989d544..3f7a40d01a454d3866c27b0df3a7641c23cbf1b1 100644 (file)
@@ -7,17 +7,17 @@
 #ifndef NETCONF_CONFIG_H
 #define NETCONF_CONFIG_H
 
-#include <cc/data.h>
 #include <cc/cfg_to_element.h>
-#include <cc/user_context.h>
+#include <cc/data.h>
 #include <cc/simple_parser.h>
-#include <http/url.h>
+#include <cc/user_context.h>
 #include <exceptions/exceptions.h>
-
-#include <boost/foreach.hpp>
+#include <http/url.h>
 
 #include <stdint.h>
+
 #include <string>
+#include <unordered_map>
 
 namespace isc {
 namespace netconf {
@@ -273,7 +273,7 @@ private:
 using CfgServerPtr = std::shared_ptr<CfgServer>;
 
 /// @brief Defines a map of CfgServers, keyed by the name.
-using CfgServersMap = std::map<std::string, CfgServerPtr>;
+using CfgServersMap = std::unordered_map<std::string, CfgServerPtr>;
 
 /// @brief Defines a iterator pairing of name and CfgServer
 using CfgServersMapPair = std::pair<std::string, CfgServerPtr>;
index 2d8c438d1b05263ccd62c94528f3b4a8177220e7..4fcc77150919904b22c82a8b1d04a8c648f15eab 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 73f1aff74010a3f36bd53568c5a115b45720caa8..97207fe8581cb459540dcf2d5dda69625795fdd5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 96b192c262766955af8481040baa6c2d955cac05..97079ea2e4d9d7dfbb8372d59e95262a89e6bb2a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 ded7b40dc237583dc828a473c51338e221875525..6d36e3f466c954ea4eba6e24ba82cde580106a0d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 83792aa70076c2b457f259bf3e2ab02c9955bbea..3587cbcdf8e663a7d76f3b7f5dca7f7101cac9de 100644 (file)
@@ -44,7 +44,7 @@
 
 
 // Unqualified %code blocks.
-#line 33 "netconf_parser.yy"
+#line 36 "netconf_parser.yy"
 
 #include <netconf/parser_context.h>
 
@@ -378,43 +378,43 @@ namespace isc { namespace netconf {
         switch (yykind)
     {
       case symbol_kind::S_STRING: // "constant string"
-#line 107 "netconf_parser.yy"
+#line 110 "netconf_parser.yy"
                  { yyoutput << yysym.value.template as < std::string > (); }
 #line 384 "netconf_parser.cc"
         break;
 
       case symbol_kind::S_INTEGER: // "integer"
-#line 107 "netconf_parser.yy"
+#line 110 "netconf_parser.yy"
                  { yyoutput << yysym.value.template as < int64_t > (); }
 #line 390 "netconf_parser.cc"
         break;
 
       case symbol_kind::S_FLOAT: // "floating point"
-#line 107 "netconf_parser.yy"
+#line 110 "netconf_parser.yy"
                  { yyoutput << yysym.value.template as < double > (); }
 #line 396 "netconf_parser.cc"
         break;
 
       case symbol_kind::S_BOOLEAN: // "boolean"
-#line 107 "netconf_parser.yy"
+#line 110 "netconf_parser.yy"
                  { yyoutput << yysym.value.template as < bool > (); }
 #line 402 "netconf_parser.cc"
         break;
 
       case symbol_kind::S_value: // value
-#line 107 "netconf_parser.yy"
+#line 110 "netconf_parser.yy"
                  { yyoutput << yysym.value.template as < ElementPtr > (); }
 #line 408 "netconf_parser.cc"
         break;
 
       case symbol_kind::S_map_value: // map_value
-#line 107 "netconf_parser.yy"
+#line 110 "netconf_parser.yy"
                  { yyoutput << yysym.value.template as < ElementPtr > (); }
 #line 414 "netconf_parser.cc"
         break;
 
       case symbol_kind::S_socket_type_value: // socket_type_value
-#line 107 "netconf_parser.yy"
+#line 110 "netconf_parser.yy"
                  { yyoutput << yysym.value.template as < ElementPtr > (); }
 #line 420 "netconf_parser.cc"
         break;
@@ -689,25 +689,25 @@ namespace isc { namespace netconf {
           switch (yyn)
             {
   case 2: // $@1: %empty
-#line 118 "netconf_parser.yy"
+#line 121 "netconf_parser.yy"
                        { ctx.ctx_ = ctx.NO_KEYWORDS; }
 #line 695 "netconf_parser.cc"
     break;
 
   case 4: // $@2: %empty
-#line 119 "netconf_parser.yy"
+#line 122 "netconf_parser.yy"
                          { ctx.ctx_ = ctx.CONFIG; }
 #line 701 "netconf_parser.cc"
     break;
 
   case 6: // $@3: %empty
-#line 120 "netconf_parser.yy"
+#line 123 "netconf_parser.yy"
                          { ctx.ctx_ = ctx.NETCONF; }
 #line 707 "netconf_parser.cc"
     break;
 
   case 8: // $@4: %empty
-#line 128 "netconf_parser.yy"
+#line 131 "netconf_parser.yy"
                             {
     // Parse the Netconf map
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
@@ -717,7 +717,7 @@ namespace isc { namespace netconf {
     break;
 
   case 9: // sub_netconf: "{" $@4 global_params "}"
-#line 132 "netconf_parser.yy"
+#line 135 "netconf_parser.yy"
                                {
     // parsing completed
 }
@@ -725,7 +725,7 @@ namespace isc { namespace netconf {
     break;
 
   case 10: // json: value
-#line 139 "netconf_parser.yy"
+#line 142 "netconf_parser.yy"
             {
     // Push back the JSON value on the stack
     ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ());
@@ -734,49 +734,49 @@ namespace isc { namespace netconf {
     break;
 
   case 11: // value: "integer"
-#line 145 "netconf_parser.yy"
+#line 148 "netconf_parser.yy"
                { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); }
 #line 740 "netconf_parser.cc"
     break;
 
   case 12: // value: "floating point"
-#line 146 "netconf_parser.yy"
+#line 149 "netconf_parser.yy"
              { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); }
 #line 746 "netconf_parser.cc"
     break;
 
   case 13: // value: "boolean"
-#line 147 "netconf_parser.yy"
+#line 150 "netconf_parser.yy"
                { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); }
 #line 752 "netconf_parser.cc"
     break;
 
   case 14: // value: "constant string"
-#line 148 "netconf_parser.yy"
+#line 151 "netconf_parser.yy"
               { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); }
 #line 758 "netconf_parser.cc"
     break;
 
   case 15: // value: "null"
-#line 149 "netconf_parser.yy"
+#line 152 "netconf_parser.yy"
                  { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
 #line 764 "netconf_parser.cc"
     break;
 
   case 16: // value: map
-#line 150 "netconf_parser.yy"
+#line 153 "netconf_parser.yy"
            { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
 #line 770 "netconf_parser.cc"
     break;
 
   case 17: // value: list_generic
-#line 151 "netconf_parser.yy"
+#line 154 "netconf_parser.yy"
                     { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
 #line 776 "netconf_parser.cc"
     break;
 
   case 18: // $@5: %empty
-#line 155 "netconf_parser.yy"
+#line 158 "netconf_parser.yy"
                     {
     // This code is executed when we're about to start parsing
     // the content of the map
@@ -787,7 +787,7 @@ namespace isc { namespace netconf {
     break;
 
   case 19: // map: "{" $@5 map_content "}"
-#line 160 "netconf_parser.yy"
+#line 163 "netconf_parser.yy"
                              {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
@@ -797,13 +797,13 @@ namespace isc { namespace netconf {
     break;
 
   case 20: // map_value: map
-#line 166 "netconf_parser.yy"
+#line 169 "netconf_parser.yy"
                { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
 #line 803 "netconf_parser.cc"
     break;
 
   case 23: // not_empty_map: "constant string" ":" value
-#line 180 "netconf_parser.yy"
+#line 183 "netconf_parser.yy"
                                   {
                   // map containing a single entry
                   ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
@@ -813,7 +813,7 @@ namespace isc { namespace netconf {
     break;
 
   case 24: // not_empty_map: not_empty_map "," "constant string" ":" value
-#line 185 "netconf_parser.yy"
+#line 188 "netconf_parser.yy"
                                                       {
                   // map consisting of a shorter map followed by
                   // comma and string:value
@@ -824,7 +824,7 @@ namespace isc { namespace netconf {
     break;
 
   case 25: // not_empty_map: not_empty_map ","
-#line 191 "netconf_parser.yy"
+#line 194 "netconf_parser.yy"
                                    {
                  ctx.warnAboutExtraCommas(yystack_[0].location);
                  }
@@ -832,7 +832,7 @@ namespace isc { namespace netconf {
     break;
 
   case 26: // $@6: %empty
-#line 196 "netconf_parser.yy"
+#line 199 "netconf_parser.yy"
                               {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(l);
@@ -841,14 +841,14 @@ namespace isc { namespace netconf {
     break;
 
   case 27: // list_generic: "[" $@6 list_content "]"
-#line 199 "netconf_parser.yy"
+#line 202 "netconf_parser.yy"
                                {
 }
 #line 848 "netconf_parser.cc"
     break;
 
   case 30: // not_empty_list: value
-#line 206 "netconf_parser.yy"
+#line 209 "netconf_parser.yy"
                       {
                   // List consisting of a single element.
                   ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
@@ -857,7 +857,7 @@ namespace isc { namespace netconf {
     break;
 
   case 31: // not_empty_list: not_empty_list "," value
-#line 210 "netconf_parser.yy"
+#line 213 "netconf_parser.yy"
                                            {
                   // List ending with , and a value.
                   ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
@@ -866,7 +866,7 @@ namespace isc { namespace netconf {
     break;
 
   case 32: // not_empty_list: not_empty_list ","
-#line 214 "netconf_parser.yy"
+#line 217 "netconf_parser.yy"
                                      {
                   ctx.warnAboutExtraCommas(yystack_[0].location);
                   }
@@ -874,7 +874,7 @@ namespace isc { namespace netconf {
     break;
 
   case 33: // unknown_map_entry: "constant string" ":"
-#line 226 "netconf_parser.yy"
+#line 229 "netconf_parser.yy"
                                 {
     const std::string& where = ctx.contextName();
     const std::string& keyword = yystack_[1].value.as < std::string > ();
@@ -885,7 +885,7 @@ namespace isc { namespace netconf {
     break;
 
   case 34: // $@7: %empty
-#line 234 "netconf_parser.yy"
+#line 237 "netconf_parser.yy"
                                    {
     // This code is executed when we're about to start parsing
     // the content of the map
@@ -896,7 +896,7 @@ namespace isc { namespace netconf {
     break;
 
   case 35: // netconf_syntax_map: "{" $@7 global_object "}"
-#line 239 "netconf_parser.yy"
+#line 242 "netconf_parser.yy"
                                {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
@@ -906,7 +906,7 @@ namespace isc { namespace netconf {
     break;
 
   case 36: // $@8: %empty
-#line 246 "netconf_parser.yy"
+#line 249 "netconf_parser.yy"
                        {
     // Let's create a MapElement that will represent it, add it to the
     // top level map (that's already on the stack) and put the new map
@@ -924,7 +924,7 @@ namespace isc { namespace netconf {
     break;
 
   case 37: // global_object: "Netconf" $@8 ":" "{" global_params "}"
-#line 258 "netconf_parser.yy"
+#line 261 "netconf_parser.yy"
                                                     {
     // Ok, we're done with parsing Netconf. Let's take the map
     // off the stack.
@@ -935,7 +935,7 @@ namespace isc { namespace netconf {
     break;
 
   case 39: // global_object_comma: global_object ","
-#line 267 "netconf_parser.yy"
+#line 270 "netconf_parser.yy"
                                          {
     ctx.warnAboutExtraCommas(yystack_[0].location);
 }
@@ -943,7 +943,7 @@ namespace isc { namespace netconf {
     break;
 
   case 44: // not_empty_global_params: not_empty_global_params ","
-#line 278 "netconf_parser.yy"
+#line 281 "netconf_parser.yy"
                                                        {
                            ctx.warnAboutExtraCommas(yystack_[0].location);
                            }
@@ -951,7 +951,7 @@ namespace isc { namespace netconf {
     break;
 
   case 54: // boot_update: "boot-update" ":" "boolean"
-#line 296 "netconf_parser.yy"
+#line 299 "netconf_parser.yy"
                                        {
     ctx.unique("boot-update", ctx.loc2pos(yystack_[2].location));
     ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
@@ -961,7 +961,7 @@ namespace isc { namespace netconf {
     break;
 
   case 55: // subscribe_changes: "subscribe-changes" ":" "boolean"
-#line 302 "netconf_parser.yy"
+#line 305 "netconf_parser.yy"
                                                    {
     ctx.unique("subscribe-changes", ctx.loc2pos(yystack_[2].location));
     ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
@@ -971,7 +971,7 @@ namespace isc { namespace netconf {
     break;
 
   case 56: // validate_changes: "validate-changes" ":" "boolean"
-#line 308 "netconf_parser.yy"
+#line 311 "netconf_parser.yy"
                                                  {
     ctx.unique("validate-changes", ctx.loc2pos(yystack_[2].location));
     ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
@@ -981,7 +981,7 @@ namespace isc { namespace netconf {
     break;
 
   case 57: // $@9: %empty
-#line 314 "netconf_parser.yy"
+#line 317 "netconf_parser.yy"
                            {
     ctx.enter(ctx.NO_KEYWORDS);
 }
@@ -989,7 +989,7 @@ namespace isc { namespace netconf {
     break;
 
   case 58: // user_context: "user-context" $@9 ":" map_value
-#line 316 "netconf_parser.yy"
+#line 319 "netconf_parser.yy"
                   {
     ElementPtr parent = ctx.stack_.back();
     ElementPtr user_context = yystack_[0].value.as < ElementPtr > ();
@@ -1016,7 +1016,7 @@ namespace isc { namespace netconf {
     break;
 
   case 59: // $@10: %empty
-#line 339 "netconf_parser.yy"
+#line 342 "netconf_parser.yy"
                  {
     ctx.enter(ctx.NO_KEYWORDS);
 }
@@ -1024,7 +1024,7 @@ namespace isc { namespace netconf {
     break;
 
   case 60: // comment: "comment" $@10 ":" "constant string"
-#line 341 "netconf_parser.yy"
+#line 344 "netconf_parser.yy"
                {
     ElementPtr parent = ctx.stack_.back();
     ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
@@ -1053,7 +1053,7 @@ namespace isc { namespace netconf {
     break;
 
   case 61: // $@11: %empty
-#line 367 "netconf_parser.yy"
+#line 370 "netconf_parser.yy"
                                  {
     ctx.unique("hooks-libraries", ctx.loc2pos(yystack_[0].location));
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
@@ -1065,7 +1065,7 @@ namespace isc { namespace netconf {
     break;
 
   case 62: // hooks_libraries: "hooks-libraries" $@11 ":" "[" hooks_libraries_list "]"
-#line 373 "netconf_parser.yy"
+#line 376 "netconf_parser.yy"
                                                              {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1074,7 +1074,7 @@ namespace isc { namespace netconf {
     break;
 
   case 67: // not_empty_hooks_libraries_list: not_empty_hooks_libraries_list ","
-#line 384 "netconf_parser.yy"
+#line 387 "netconf_parser.yy"
                                            {
         ctx.warnAboutExtraCommas(yystack_[0].location);
         }
@@ -1082,7 +1082,7 @@ namespace isc { namespace netconf {
     break;
 
   case 68: // $@12: %empty
-#line 389 "netconf_parser.yy"
+#line 392 "netconf_parser.yy"
                               {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(m);
@@ -1092,7 +1092,7 @@ namespace isc { namespace netconf {
     break;
 
   case 69: // hooks_library: "{" $@12 hooks_params "}"
-#line 393 "netconf_parser.yy"
+#line 396 "netconf_parser.yy"
                               {
     ctx.stack_.pop_back();
 }
@@ -1100,7 +1100,7 @@ namespace isc { namespace netconf {
     break;
 
   case 72: // hooks_params: hooks_params ","
-#line 399 "netconf_parser.yy"
+#line 402 "netconf_parser.yy"
                                  {
               ctx.warnAboutExtraCommas(yystack_[0].location);
               }
@@ -1108,7 +1108,7 @@ namespace isc { namespace netconf {
     break;
 
   case 76: // $@13: %empty
-#line 409 "netconf_parser.yy"
+#line 412 "netconf_parser.yy"
                  {
     ctx.unique("library", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1117,7 +1117,7 @@ namespace isc { namespace netconf {
     break;
 
   case 77: // library: "library" $@13 ":" "constant string"
-#line 412 "netconf_parser.yy"
+#line 415 "netconf_parser.yy"
                {
     ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("library", lib);
@@ -1127,7 +1127,7 @@ namespace isc { namespace netconf {
     break;
 
   case 78: // $@14: %empty
-#line 418 "netconf_parser.yy"
+#line 421 "netconf_parser.yy"
                        {
     ctx.unique("parameters", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1136,7 +1136,7 @@ namespace isc { namespace netconf {
     break;
 
   case 79: // parameters: "parameters" $@14 ":" map_value
-#line 421 "netconf_parser.yy"
+#line 424 "netconf_parser.yy"
                   {
     ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ());
     ctx.leave();
@@ -1145,7 +1145,7 @@ namespace isc { namespace netconf {
     break;
 
   case 80: // $@15: %empty
-#line 429 "netconf_parser.yy"
+#line 432 "netconf_parser.yy"
                                                       {
     ctx.unique("managed-servers", ctx.loc2pos(yystack_[2].location));
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[2].location)));
@@ -1157,7 +1157,7 @@ namespace isc { namespace netconf {
     break;
 
   case 81: // managed_servers: "managed-servers" ":" "{" $@15 servers_entries "}"
-#line 435 "netconf_parser.yy"
+#line 438 "netconf_parser.yy"
                                  {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1166,7 +1166,7 @@ namespace isc { namespace netconf {
     break;
 
   case 86: // not_empty_servers_entries: not_empty_servers_entries ","
-#line 446 "netconf_parser.yy"
+#line 449 "netconf_parser.yy"
                                                            {
                              ctx.warnAboutExtraCommas(yystack_[0].location);
                              }
@@ -1174,7 +1174,7 @@ namespace isc { namespace netconf {
     break;
 
   case 92: // $@16: %empty
-#line 462 "netconf_parser.yy"
+#line 465 "netconf_parser.yy"
                            {
     ctx.unique("dhcp4", ctx.loc2pos(yystack_[0].location));
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
@@ -1186,7 +1186,7 @@ namespace isc { namespace netconf {
     break;
 
   case 93: // dhcp4_server: "dhcp4" $@16 ":" "{" managed_server_params "}"
-#line 468 "netconf_parser.yy"
+#line 471 "netconf_parser.yy"
                                                             {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1195,7 +1195,7 @@ namespace isc { namespace netconf {
     break;
 
   case 94: // $@17: %empty
-#line 474 "netconf_parser.yy"
+#line 477 "netconf_parser.yy"
                            {
     ctx.unique("dhcp6", ctx.loc2pos(yystack_[0].location));
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
@@ -1207,7 +1207,7 @@ namespace isc { namespace netconf {
     break;
 
   case 95: // dhcp6_server: "dhcp6" $@17 ":" "{" managed_server_params "}"
-#line 480 "netconf_parser.yy"
+#line 483 "netconf_parser.yy"
                                                             {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1216,7 +1216,7 @@ namespace isc { namespace netconf {
     break;
 
   case 96: // $@18: %empty
-#line 486 "netconf_parser.yy"
+#line 489 "netconf_parser.yy"
                      {
     ctx.unique("d2", ctx.loc2pos(yystack_[0].location));
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
@@ -1228,7 +1228,7 @@ namespace isc { namespace netconf {
     break;
 
   case 97: // d2_server: "d2" $@18 ":" "{" managed_server_params "}"
-#line 492 "netconf_parser.yy"
+#line 495 "netconf_parser.yy"
                                                             {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1237,7 +1237,7 @@ namespace isc { namespace netconf {
     break;
 
   case 98: // $@19: %empty
-#line 498 "netconf_parser.yy"
+#line 501 "netconf_parser.yy"
                      {
     ctx.unique("ca", ctx.loc2pos(yystack_[0].location));
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
@@ -1249,7 +1249,7 @@ namespace isc { namespace netconf {
     break;
 
   case 99: // ca_server: "ca" $@19 ":" "{" managed_server_params "}"
-#line 504 "netconf_parser.yy"
+#line 507 "netconf_parser.yy"
                                                             {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1258,7 +1258,7 @@ namespace isc { namespace netconf {
     break;
 
   case 102: // managed_server_params: managed_server_params ","
-#line 512 "netconf_parser.yy"
+#line 515 "netconf_parser.yy"
                                                    {
                          ctx.warnAboutExtraCommas(yystack_[0].location);
                          }
@@ -1266,7 +1266,7 @@ namespace isc { namespace netconf {
     break;
 
   case 111: // $@20: %empty
-#line 529 "netconf_parser.yy"
+#line 532 "netconf_parser.yy"
              {
     ctx.unique("model", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1275,7 +1275,7 @@ namespace isc { namespace netconf {
     break;
 
   case 112: // model: "model" $@20 ":" "constant string"
-#line 532 "netconf_parser.yy"
+#line 535 "netconf_parser.yy"
                {
     ElementPtr model(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("model", model);
@@ -1285,7 +1285,7 @@ namespace isc { namespace netconf {
     break;
 
   case 113: // $@21: %empty
-#line 539 "netconf_parser.yy"
+#line 542 "netconf_parser.yy"
                                {
     ctx.unique("control-socket", ctx.loc2pos(yystack_[0].location));
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
@@ -1297,7 +1297,7 @@ namespace isc { namespace netconf {
     break;
 
   case 114: // control_socket: "control-socket" $@21 ":" "{" control_socket_params "}"
-#line 545 "netconf_parser.yy"
+#line 548 "netconf_parser.yy"
                                                             {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1306,7 +1306,7 @@ namespace isc { namespace netconf {
     break;
 
   case 117: // control_socket_params: control_socket_params ","
-#line 553 "netconf_parser.yy"
+#line 556 "netconf_parser.yy"
                                                    {
                          ctx.warnAboutExtraCommas(yystack_[0].location);
                          }
@@ -1314,7 +1314,7 @@ namespace isc { namespace netconf {
     break;
 
   case 124: // $@22: %empty
-#line 566 "netconf_parser.yy"
+#line 569 "netconf_parser.yy"
                          {
     ctx.unique("socket-type", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.SOCKET_TYPE);
@@ -1323,7 +1323,7 @@ namespace isc { namespace netconf {
     break;
 
   case 125: // socket_type: "socket-type" $@22 ":" socket_type_value
-#line 569 "netconf_parser.yy"
+#line 572 "netconf_parser.yy"
                           {
     ctx.stack_.back()->set("socket-type", yystack_[0].value.as < ElementPtr > ());
     ctx.leave();
@@ -1332,25 +1332,25 @@ namespace isc { namespace netconf {
     break;
 
   case 126: // socket_type_value: "unix"
-#line 575 "netconf_parser.yy"
+#line 578 "netconf_parser.yy"
                          { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); }
 #line 1338 "netconf_parser.cc"
     break;
 
   case 127: // socket_type_value: "http"
-#line 576 "netconf_parser.yy"
+#line 579 "netconf_parser.yy"
                          { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("http", ctx.loc2pos(yystack_[0].location))); }
 #line 1344 "netconf_parser.cc"
     break;
 
   case 128: // socket_type_value: "stdout"
-#line 577 "netconf_parser.yy"
+#line 580 "netconf_parser.yy"
                            { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stdout", ctx.loc2pos(yystack_[0].location))); }
 #line 1350 "netconf_parser.cc"
     break;
 
   case 129: // $@23: %empty
-#line 580 "netconf_parser.yy"
+#line 583 "netconf_parser.yy"
                          {
     ctx.unique("socket-name", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1359,7 +1359,7 @@ namespace isc { namespace netconf {
     break;
 
   case 130: // socket_name: "socket-name" $@23 ":" "constant string"
-#line 583 "netconf_parser.yy"
+#line 586 "netconf_parser.yy"
                {
     ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("socket-name", name);
@@ -1369,7 +1369,7 @@ namespace isc { namespace netconf {
     break;
 
   case 131: // $@24: %empty
-#line 590 "netconf_parser.yy"
+#line 593 "netconf_parser.yy"
                        {
     ctx.unique("socket-url", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1378,7 +1378,7 @@ namespace isc { namespace netconf {
     break;
 
   case 132: // socket_url: "socket-url" $@24 ":" "constant string"
-#line 593 "netconf_parser.yy"
+#line 596 "netconf_parser.yy"
                {
     ElementPtr url(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("socket-url", url);
@@ -1388,7 +1388,7 @@ namespace isc { namespace netconf {
     break;
 
   case 133: // $@25: %empty
-#line 603 "netconf_parser.yy"
+#line 606 "netconf_parser.yy"
                  {
     ctx.unique("loggers", ctx.loc2pos(yystack_[0].location));
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
@@ -1400,7 +1400,7 @@ namespace isc { namespace netconf {
     break;
 
   case 134: // loggers: "loggers" $@25 ":" "[" loggers_entries "]"
-#line 609 "netconf_parser.yy"
+#line 612 "netconf_parser.yy"
                                                          {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1409,7 +1409,7 @@ namespace isc { namespace netconf {
     break;
 
   case 137: // loggers_entries: loggers_entries ","
-#line 618 "netconf_parser.yy"
+#line 621 "netconf_parser.yy"
                                        {
                    ctx.warnAboutExtraCommas(yystack_[0].location);
                    }
@@ -1417,7 +1417,7 @@ namespace isc { namespace netconf {
     break;
 
   case 138: // $@26: %empty
-#line 624 "netconf_parser.yy"
+#line 627 "netconf_parser.yy"
                              {
     ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(l);
@@ -1427,7 +1427,7 @@ namespace isc { namespace netconf {
     break;
 
   case 139: // logger_entry: "{" $@26 logger_params "}"
-#line 628 "netconf_parser.yy"
+#line 631 "netconf_parser.yy"
                                {
     ctx.stack_.pop_back();
 }
@@ -1435,7 +1435,7 @@ namespace isc { namespace netconf {
     break;
 
   case 142: // logger_params: logger_params ","
-#line 634 "netconf_parser.yy"
+#line 637 "netconf_parser.yy"
                                    {
                  ctx.warnAboutExtraCommas(yystack_[0].location);
                  }
@@ -1443,7 +1443,7 @@ namespace isc { namespace netconf {
     break;
 
   case 150: // $@27: %empty
-#line 648 "netconf_parser.yy"
+#line 651 "netconf_parser.yy"
            {
     ctx.unique("name", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1452,7 +1452,7 @@ namespace isc { namespace netconf {
     break;
 
   case 151: // name: "name" $@27 ":" "constant string"
-#line 651 "netconf_parser.yy"
+#line 654 "netconf_parser.yy"
                {
     ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("name", name);
@@ -1462,7 +1462,7 @@ namespace isc { namespace netconf {
     break;
 
   case 152: // debuglevel: "debuglevel" ":" "integer"
-#line 657 "netconf_parser.yy"
+#line 660 "netconf_parser.yy"
                                      {
     ctx.unique("debuglevel", ctx.loc2pos(yystack_[2].location));
     ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
@@ -1472,7 +1472,7 @@ namespace isc { namespace netconf {
     break;
 
   case 153: // $@28: %empty
-#line 663 "netconf_parser.yy"
+#line 666 "netconf_parser.yy"
                    {
     ctx.unique("severity", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1481,7 +1481,7 @@ namespace isc { namespace netconf {
     break;
 
   case 154: // severity: "severity" $@28 ":" "constant string"
-#line 666 "netconf_parser.yy"
+#line 669 "netconf_parser.yy"
                {
     ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("severity", sev);
@@ -1491,7 +1491,7 @@ namespace isc { namespace netconf {
     break;
 
   case 155: // $@29: %empty
-#line 672 "netconf_parser.yy"
+#line 675 "netconf_parser.yy"
                                     {
     ctx.unique("output_options", ctx.loc2pos(yystack_[0].location));
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
@@ -1503,7 +1503,7 @@ namespace isc { namespace netconf {
     break;
 
   case 156: // output_options_list: "output_options" $@29 ":" "[" output_options_list_content "]"
-#line 678 "netconf_parser.yy"
+#line 681 "netconf_parser.yy"
                                                                     {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -1512,7 +1512,7 @@ namespace isc { namespace netconf {
     break;
 
   case 159: // output_options_list_content: output_options_list_content ","
-#line 685 "netconf_parser.yy"
+#line 688 "netconf_parser.yy"
                                                                {
                                ctx.warnAboutExtraCommas(yystack_[0].location);
                                }
@@ -1520,7 +1520,7 @@ namespace isc { namespace netconf {
     break;
 
   case 160: // $@30: %empty
-#line 690 "netconf_parser.yy"
+#line 693 "netconf_parser.yy"
                              {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(m);
@@ -1530,7 +1530,7 @@ namespace isc { namespace netconf {
     break;
 
   case 161: // output_entry: "{" $@30 output_params_list "}"
-#line 694 "netconf_parser.yy"
+#line 697 "netconf_parser.yy"
                                     {
     ctx.stack_.pop_back();
 }
@@ -1538,7 +1538,7 @@ namespace isc { namespace netconf {
     break;
 
   case 164: // output_params_list: output_params_list ","
-#line 700 "netconf_parser.yy"
+#line 703 "netconf_parser.yy"
                                         {
                  ctx.warnAboutExtraCommas(yystack_[0].location);
                  }
@@ -1546,7 +1546,7 @@ namespace isc { namespace netconf {
     break;
 
   case 170: // $@31: %empty
-#line 712 "netconf_parser.yy"
+#line 715 "netconf_parser.yy"
                {
     ctx.unique("output", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1555,7 +1555,7 @@ namespace isc { namespace netconf {
     break;
 
   case 171: // output: "output" $@31 ":" "constant string"
-#line 715 "netconf_parser.yy"
+#line 718 "netconf_parser.yy"
                {
     ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("output", sev);
@@ -1565,7 +1565,7 @@ namespace isc { namespace netconf {
     break;
 
   case 172: // flush: "flush" ":" "boolean"
-#line 721 "netconf_parser.yy"
+#line 724 "netconf_parser.yy"
                            {
     ctx.unique("flush", ctx.loc2pos(yystack_[2].location));
     ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
@@ -1575,7 +1575,7 @@ namespace isc { namespace netconf {
     break;
 
   case 173: // maxsize: "maxsize" ":" "integer"
-#line 727 "netconf_parser.yy"
+#line 730 "netconf_parser.yy"
                                {
     ctx.unique("maxsize", ctx.loc2pos(yystack_[2].location));
     ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
@@ -1585,7 +1585,7 @@ namespace isc { namespace netconf {
     break;
 
   case 174: // maxver: "maxver" ":" "integer"
-#line 733 "netconf_parser.yy"
+#line 736 "netconf_parser.yy"
                              {
     ctx.unique("maxver", ctx.loc2pos(yystack_[2].location));
     ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
@@ -1595,7 +1595,7 @@ namespace isc { namespace netconf {
     break;
 
   case 175: // $@32: %empty
-#line 739 "netconf_parser.yy"
+#line 742 "netconf_parser.yy"
                  {
     ctx.unique("pattern", ctx.loc2pos(yystack_[0].location));
     ctx.enter(ctx.NO_KEYWORDS);
@@ -1604,7 +1604,7 @@ namespace isc { namespace netconf {
     break;
 
   case 176: // pattern: "pattern" $@32 ":" "constant string"
-#line 742 "netconf_parser.yy"
+#line 745 "netconf_parser.yy"
                {
     ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("pattern", sev);
@@ -2249,24 +2249,24 @@ namespace isc { namespace netconf {
   const short
   NetconfParser::yyrline_[] =
   {
-       0,   118,   118,   118,   119,   119,   120,   120,   128,   128,
-     139,   145,   146,   147,   148,   149,   150,   151,   155,   155,
-     166,   171,   172,   180,   185,   191,   196,   196,   202,   203,
-     206,   210,   214,   226,   234,   234,   246,   246,   264,   267,
-     272,   273,   276,   277,   278,   285,   286,   287,   288,   289,
-     290,   291,   292,   293,   296,   302,   308,   314,   314,   339,
-     339,   367,   367,   378,   379,   382,   383,   384,   389,   389,
-     397,   398,   399,   402,   405,   406,   409,   409,   418,   418,
-     429,   429,   440,   441,   444,   445,   446,   454,   455,   456,
-     457,   458,   462,   462,   474,   474,   486,   486,   498,   498,
-     510,   511,   512,   518,   519,   520,   521,   522,   523,   524,
-     525,   529,   529,   539,   539,   551,   552,   553,   558,   559,
-     560,   561,   562,   563,   566,   566,   575,   576,   577,   580,
-     580,   590,   590,   603,   603,   616,   617,   618,   624,   624,
-     632,   633,   634,   639,   640,   641,   642,   643,   644,   645,
-     648,   648,   657,   663,   663,   672,   672,   683,   684,   685,
-     690,   690,   698,   699,   700,   705,   706,   707,   708,   709,
-     712,   712,   721,   727,   733,   739,   739
+       0,   121,   121,   121,   122,   122,   123,   123,   131,   131,
+     142,   148,   149,   150,   151,   152,   153,   154,   158,   158,
+     169,   174,   175,   183,   188,   194,   199,   199,   205,   206,
+     209,   213,   217,   229,   237,   237,   249,   249,   267,   270,
+     275,   276,   279,   280,   281,   288,   289,   290,   291,   292,
+     293,   294,   295,   296,   299,   305,   311,   317,   317,   342,
+     342,   370,   370,   381,   382,   385,   386,   387,   392,   392,
+     400,   401,   402,   405,   408,   409,   412,   412,   421,   421,
+     432,   432,   443,   444,   447,   448,   449,   457,   458,   459,
+     460,   461,   465,   465,   477,   477,   489,   489,   501,   501,
+     513,   514,   515,   521,   522,   523,   524,   525,   526,   527,
+     528,   532,   532,   542,   542,   554,   555,   556,   561,   562,
+     563,   564,   565,   566,   569,   569,   578,   579,   580,   583,
+     583,   593,   593,   606,   606,   619,   620,   621,   627,   627,
+     635,   636,   637,   642,   643,   644,   645,   646,   647,   648,
+     651,   651,   660,   666,   666,   675,   675,   686,   687,   688,
+     693,   693,   701,   702,   703,   708,   709,   710,   711,   712,
+     715,   715,   724,   730,   736,   742,   742
   };
 
   void
@@ -2298,10 +2298,10 @@ namespace isc { namespace netconf {
 
 
 #line 14 "netconf_parser.yy"
-} }  // isc::netconf
+} } // isc::netconf
 #line 2303 "netconf_parser.cc"
 
-#line 748 "netconf_parser.yy"
+#line 751 "netconf_parser.yy"
 
 
 void
index 6f91bd61911184d82d8a697d5be83280ecf80dc6..c465ecbaf046564da4be3cd50ddd619d904c9d50 100644 (file)
 // "%code requires" blocks.
 #line 17 "netconf_parser.yy"
 
-#include <string>
 #include <cc/data.h>
-#include <boost/lexical_cast.hpp>
 #include <netconf/parser_context_decl.h>
 
+#include <boost/lexical_cast.hpp>
+
+#include <sstream>
+#include <string>
+
 using namespace isc::netconf;
 using namespace isc::data;
 using namespace std;
 
-#line 60 "netconf_parser.h"
+#line 63 "netconf_parser.h"
 
 # include <cassert>
 # include <cstdlib> // std::abort
@@ -205,7 +208,7 @@ using namespace std;
 
 #line 14 "netconf_parser.yy"
 namespace isc { namespace netconf {
-#line 209 "netconf_parser.h"
+#line 212 "netconf_parser.h"
 
 
 
@@ -2378,8 +2381,8 @@ switch (yykind)
 
 
 #line 14 "netconf_parser.yy"
-} }  // isc::netconf
-#line 2383 "netconf_parser.h"
+} } // isc::netconf
+#line 2386 "netconf_parser.h"
 
 
 
index 10048dea849ec547d9b34490f775d2fb5bd9c87e..cc2d9684b8338108d412a45d8901ce1da6705747 100644 (file)
 %define parse.assert
 %code requires
 {
-#include <string>
 #include <cc/data.h>
-#include <boost/lexical_cast.hpp>
 #include <netconf/parser_context_decl.h>
 
+#include <boost/lexical_cast.hpp>
+
+#include <sstream>
+#include <string>
+
 using namespace isc::netconf;
 using namespace isc::data;
 using namespace std;
index 55fe070d3c6a26cbe6a70baa993ae1e133b13f82..eafc036108e766bc1abc66db45f853ede05dc6ff 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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,16 +7,14 @@
 #include <config.h>
 
 #include <asiolink/asio_wrapper.h>
-#include <netconf/netconf.h>
-#include <netconf/netconf_process.h>
-#include <netconf/netconf_controller.h>
-#include <netconf/netconf_log.h>
 #include <asiolink/io_address.h>
 #include <asiolink/io_error.h>
 #include <cc/command_interpreter.h>
 #include <config/timeouts.h>
-
-#include <boost/pointer_cast.hpp>
+#include <netconf/netconf.h>
+#include <netconf/netconf_controller.h>
+#include <netconf/netconf_log.h>
+#include <netconf/netconf_process.h>
 
 using namespace isc::asiolink;
 using namespace isc::config;
index 2aa69fc7838c822cb8f2111f21393e81636d7ade..ccc768ea91793a1fe84312d19ce723c892d2bb7f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 d84e1941e07d733b5ee56b51699cbb5f1b208dc6..0fad211472c6b85984c1d50e9d1607630a1145e1 100644 (file)
@@ -6,15 +6,15 @@
 
 #include <config.h>
 
-#include <netconf/parser_context.h>
-#include <netconf/netconf_parser.h>
-#include <netconf/netconf_log.h>
-#include <exceptions/exceptions.h>
-//#include <cc/dhcp_config_error.h>
 #include <cc/data.h>
+#include <exceptions/exceptions.h>
+#include <netconf/netconf_log.h>
+#include <netconf/netconf_parser.h>
+#include <netconf/parser_context.h>
+
 #include <fstream>
-#include <sstream>
 #include <limits>
+#include <sstream>
 
 namespace isc {
 namespace netconf {
index 7438adb354f040e61f8578db9af7cc25cacea769..cb62152ab453e7ff4d92ecf992662620d34c3b8f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 6697a362d0aafbf0358a66bfb95ff7004c87c811..43cb515c4a819572d779e7d00fc49a2000d8f6d6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 1574ddf58135f45013d7d4ce13ad4a37b9771914..791ce5d459b1263999d87d8e46ecf280c1722b74 100644 (file)
@@ -6,13 +6,12 @@
 
 #include <config.h>
 
-#include <netconf/simple_parser.h>
-#include <netconf/netconf_config.h>
 #include <cc/data.h>
 #include <cc/dhcp_config_error.h>
 #include <hooks/hooks_manager.h>
 #include <hooks/hooks_parser.h>
-#include <boost/foreach.hpp>
+#include <netconf/netconf_config.h>
+#include <netconf/simple_parser.h>
 
 using namespace isc::data;
 
index dc9a00db7d32d6876bd44361cec3c5720e557bb7..53978c02707da58f55656fd757ea00babcec5bed 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 6422993c953ed6f2c4503305d7366b63641efd90..949ffe2c0d1e54160afdbebc52b2fbc83fa9592d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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,8 +9,10 @@
 
 #include <config.h>
 
-#include <netconf/stdout_control_socket.h>
 #include <cc/command_interpreter.h>
+#include <netconf/stdout_control_socket.h>
+
+#include <iostream>
 
 using namespace std;
 using namespace isc::config;
index a8acfbcaf1c2a83bfc06d478fc313b2ebf2cf822..a241a9ed5d83215a21b40c4a06cf5901a3ed6176 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 65d5657a989c21760b355eeed9064c9c8872ddc8..629cf85c42664570aa67755079b770caa83834a3 100644 (file)
@@ -2,13 +2,14 @@ SUBDIRS = . shtests
 
 EXTRA_DIST = testdata/get_config.json
 
-AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+AM_CPPFLAGS  =
+AM_CPPFLAGS += -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
 AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src
 AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
-AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/netconf/tests\"
 AM_CPPFLAGS += -DCFG_EXAMPLES=\"$(abs_top_srcdir)/doc/examples/netconf\"
-AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/netconf/tests\"
+AM_CPPFLAGS += -DKEATEST_MODULE
 AM_CPPFLAGS += -DSYNTAX_FILE=\"$(abs_srcdir)/../netconf_parser.yy\"
+AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/netconf/tests\"
 AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES)
 AM_CPPFLAGS += $(LIBYANG_CPPFLAGS)
 AM_CPPFLAGS += $(LIBYANG_INCLUDEDIR)
index f2186e085beb0ed6cbf94815f3b6e19454813f1c..cd0be6896a59836a9233f08d5b6c4d080bc90b35 100644 (file)
 /// - hookpt_one callout is supplied.
 
 #include <config.h>
+
 #include <hooks/hooks.h>
 
 using namespace isc::hooks;
 using namespace std;
 
 namespace {
-
 extern "C" {
 
 // Callouts.  All return their result through the "result" argument.
@@ -67,6 +67,5 @@ load(isc::hooks::LibraryHandle&) {
     return (0);
 }
 
-}
-}
-
+}  // extern "C"
+}  // namespace
index bc8ba7eb7626bb5df92b4d0a8850465958532862..d9ba2f24e823391c6aee19f9ebc9f020e20b435b 100644 (file)
@@ -6,10 +6,8 @@
 
 #include <config.h>
 
-#include <netconf/netconf_config.h>
-#include <netconf/http_control_socket.h>
-#include <netconf/stdout_control_socket.h>
-#include <netconf/unix_control_socket.h>
+#include <gtest/gtest.h>
+
 #include <asiolink/asio_wrapper.h>
 #include <asiolink/interval_timer.h>
 #include <asiolink/io_service.h>
 #include <http/response_creator_factory.h>
 #include <http/response_json.h>
 #include <http/tests/response_test.h>
-#include <testutils/threaded_test.h>
+#include <netconf/http_control_socket.h>
+#include <netconf/netconf_config.h>
+#include <netconf/stdout_control_socket.h>
+#include <netconf/unix_control_socket.h>
 #include <testutils/sandbox.h>
+#include <testutils/threaded_test.h>
 #include <yang/tests/sysrepo_setup.h>
 
-#include <gtest/gtest.h>
-
+#include <iostream>
 #include <sstream>
 #include <thread>
 
index 1b8b3af86337f37e2e2b2a006b7d0d29885735e1..d673515164b1c901e9f7fc0fd286f74bf1b51d6e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,20 +6,19 @@
 
 #include <config.h>
 
-#include <cc/data.h>
+#include <gtest/gtest.h>
+
 #include <cc/command_interpreter.h>
-#include <testutils/gtest_utils.h>
-#include <testutils/user_context_utils.h>
-#include <process/testutils/d_test_stubs.h>
+#include <cc/data.h>
 #include <netconf/netconf_cfg_mgr.h>
 #include <netconf/parser_context.h>
+#include <process/testutils/d_test_stubs.h>
+#include <testutils/gtest_utils.h>
+#include <testutils/user_context_utils.h>
 
-#include <gtest/gtest.h>
-
-#include <iostream>
 #include <fstream>
+#include <iostream>
 #include <string>
-#include <sstream>
 
 #include "test_data_files_config.h"
 #include "test_libraries.h"
index 86e5c37815fadbd9ad8845ba5c975006940d770a..c0dc0881f388bfedd926c9cc49758d6c847e1db2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,18 +6,18 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <cc/command_interpreter.h>
+#include <exceptions/exceptions.h>
 #include <netconf/netconf_cfg_mgr.h>
 #include <netconf/parser_context.h>
-#include <exceptions/exceptions.h>
-#include <cc/command_interpreter.h>
-#include <process/testutils/d_test_stubs.h>
+#include <netconf/tests/test_libraries.h>
 #include <process/d_cfg_mgr.h>
-#include <yang/yang_models.h>
+#include <process/testutils/d_test_stubs.h>
 #include <testutils/gtest_utils.h>
 #include <testutils/test_to_element.h>
-#include <netconf/tests/test_libraries.h>
-
-#include <gtest/gtest.h>
+#include <yang/yang_models.h>
 
 using namespace std;
 using namespace isc;
index 2b2f8bb633cc725626dbaf1fe4d96b6c43db44f3..cbc762ffc12f026b34937f332eb3de7b2e0a1d23 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,17 +6,15 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <asiolink/testutils/timed_signal.h>
+#include <cc/data.h>
 #include <netconf/netconf_controller.h>
 #include <netconf/netconf_process.h>
-#include <cc/data.h>
 #include <process/testutils/d_test_stubs.h>
 #include <testutils/gtest_utils.h>
 
-#include <boost/pointer_cast.hpp>
-
-#include <sstream>
-
 using namespace isc::asiolink::test;
 using namespace isc::netconf;
 using namespace isc::data;
index 7e30f3e0575509ad12af2d87995f973b6b0e0efd..2a0ce33064deeece3b849251949a84cb85967987 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,17 +6,15 @@
 
 #include <config.h>
 
-#include <netconf/netconf_cfg_mgr.h>
-#include <netconf/netconf_process.h>
+#include <gtest/gtest.h>
+
 #include <asiolink/interval_timer.h>
 #include <asiolink/io_service.h>
+#include <netconf/netconf_cfg_mgr.h>
+#include <netconf/netconf_process.h>
 #include <process/testutils/d_test_stubs.h>
 #include <testutils/gtest_utils.h>
 
-#include <boost/date_time/posix_time/posix_time.hpp>
-
-#include <gtest/gtest.h>
-
 #include <functional>
 
 using namespace boost::posix_time;
index 205fef7b75f101384514cc15d65c32e05bb89efa..cf7cd407bfcbd6289737db0818db07884994ecc5 100644 (file)
@@ -6,31 +6,33 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <asiolink/asio_wrapper.h>
+#include <asiolink/interval_timer.h>
+#include <asiolink/io_service.h>
+#include <cc/command_interpreter.h>
 #include <netconf/netconf.h>
 #include <netconf/netconf_process.h>
 #include <netconf/parser_context.h>
 #include <netconf/simple_parser.h>
 #include <netconf/unix_control_socket.h>
-#include <asiolink/asio_wrapper.h>
-#include <asiolink/interval_timer.h>
-#include <asiolink/io_service.h>
-#include <cc/command_interpreter.h>
-#include <yang/yang_models.h>
-#include <yang/yang_revisions.h>
-#include <yang/tests/sysrepo_setup.h>
-#include <yang/translator_config.h>
-#include <yang/testutils/translator_test.h>
 #include <testutils/log_utils.h>
-#include <testutils/threaded_test.h>
 #include <testutils/sandbox.h>
+#include <testutils/threaded_test.h>
+#include <yang/tests/sysrepo_setup.h>
+#include <yang/testutils/translator_test.h>
+#include <yang/translator_config.h>
+#include <yang/yang_models.h>
+#include <yang/yang_revisions.h>
 
 #include <sysrepo-cpp/utils/exception.hpp>
 
-#include <gtest/gtest.h>
-
 #include <chrono>
+#include <iostream>
 #include <sstream>
 #include <thread>
+#include <vector>
 
 using namespace std;
 using namespace isc;
@@ -362,12 +364,14 @@ TEST_F(NetconfAgentTest, initSysrepo) {
 
 // Verifies that the checkModule method emits expected errors.
 TEST_F(NetconfAgentLogTest, checkModule) {
-    // keatest-module should not be in YANG_REVISIONS.
-    EXPECT_EQ(0, YANG_REVISIONS.count("keatest-module"));
-    // But kea-dhcp[46]-server must be in.
+    // Various modules should be available.
+    EXPECT_EQ(1, YANG_REVISIONS.count("keatest-module"));
     ASSERT_EQ(1, YANG_REVISIONS.count("kea-dhcp4-server"));
     ASSERT_EQ(1, YANG_REVISIONS.count("kea-dhcp6-server"));
 
+    // Non-existing modules should not.
+    EXPECT_EQ(0, agent_->modules_.count("does-not-exist"));
+
     // kea-dhcp[46]-server should be available.
     EXPECT_NO_THROW_LOG(agent_->initSysrepo());
     EXPECT_EQ(1, agent_->modules_.count("kea-dhcp4-server"));
index cabfe4a335f894dfa29cfe7b4e22f3299c3084e1..5bfb236d726dc68a554e40affec7cc827a9a0e99 100644 (file)
@@ -6,6 +6,8 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <cc/data.h>
 #include <cc/dhcp_config_error.h>
 #include <netconf/parser_context.h>
 #include <testutils/log_utils.h>
 #include <testutils/user_context_utils.h>
 
-#include <gtest/gtest.h>
-
+#include <iostream>
 #include <fstream>
-#include <set>
+#include <vector>
 
 #include <boost/algorithm/string.hpp>
 
index b735a8e964b9c6f1c240859e69478b42db14451b..0065ec6519b61829c256b90b941c3749e2cea98d 100644 (file)
@@ -7,8 +7,9 @@
 #include <config.h>
 
 #include <gtest/gtest.h>
-#include <util/unittests/run_all.h>
+
 #include <log/logger_support.h>
+#include <util/unittests/run_all.h>
 
 int
 main(int argc, char* argv[]) {
index f90d682cf2cf47438e64b903b5cef43b7cd0d49b..f402b1c3bd1a4f72f41f89db24e09325daf8e7c9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 62dbd80d3979d14a15956dcbf11993952f325c0a..480b74ad9613fb47f30e058a7b57b587eb34329f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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,13 +9,13 @@
 
 #include <config.h>
 
-#include <netconf/unix_control_socket.h>
 #include <asiolink/asio_wrapper.h>
 #include <asiolink/io_service.h>
 #include <cc/command_interpreter.h>
 #include <cc/json_feed.h>
 #include <config/client_connection.h>
 #include <config/timeouts.h>
+#include <netconf/unix_control_socket.h>
 
 using namespace std;
 using namespace isc::asiolink;
index 2cb0b3d10e01358dae3bdad489dc6b7c028a8614..1595ddba8d20fc887c8aee11b7876a9e69d0bced 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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 3af89a7d7ed693f98a802eb6dba49826a9c937e3..fc66339d6383f6295f551d63bb8d8ba514f4608d 100644 (file)
@@ -7,7 +7,6 @@
 #include <config.h>
 
 #include <yang/adaptor.h>
-#include <boost/foreach.hpp>
 
 #include <iostream>
 
@@ -42,7 +41,7 @@ Adaptor::fromParent(const string& name, ConstElementPtr parent,
     if (!param) {
         return;
     }
-    BOOST_FOREACH(ElementPtr item, list->listValue()) {
+    for (ElementPtr const& item : list->listValue()) {
         // don't override. Skip this entry if it already has the parameter.
         if (item->contains(name)) {
             continue;
@@ -56,7 +55,7 @@ Adaptor::toParent(const string& name, ElementPtr parent,
                   ConstElementPtr list) {
     ConstElementPtr param;
     bool first = true;
-    BOOST_FOREACH(ElementPtr item, list->listValue()) {
+    for (ElementPtr const& item : list->listValue()) {
         if (first) {
             first = false;
             param = item->get(name);
@@ -70,7 +69,7 @@ Adaptor::toParent(const string& name, ElementPtr parent,
         }
     }
     if (!first && param) {
-        BOOST_FOREACH(ElementPtr item, list->listValue()) {
+        for (ElementPtr const& item : list->listValue()) {
             if (param) {
                 item->remove(name);
             }
index 35efeca08a158a6a766a0a9718bc75d635b54b93..8142725872653e34e7e6a49256bb1ad17d9c698c 100644 (file)
@@ -7,8 +7,8 @@
 #ifndef ISC_ADAPTOR_H
 #define ISC_ADAPTOR_H 1
 
-#include <exceptions/exceptions.h>
 #include <cc/data.h>
+#include <exceptions/exceptions.h>
 
 namespace isc {
 namespace yang {
index a9422aaacbbce61c6a3bbc067de4456032da5248..6f644a3c60155bd1aa2a2fab203eba61b0097129 100644 (file)
@@ -11,7 +11,6 @@
 #include <yang/adaptor_option.h>
 #include <yang/adaptor_pool.h>
 #include <yang/adaptor_subnet.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 3a85c419afdf1e46475b81123b5b63ed77c60ca4..990a103f7238e813964bf18142a353bb9b8ee4a1 100644 (file)
@@ -9,8 +9,10 @@
 #include <util/encode/hex.h>
 #include <util/strutil.h>
 #include <yang/adaptor_host.h>
+
 #include <iomanip>
 #include <sstream>
+#include <vector>
 
 using namespace std;
 using namespace isc::data;
index 02acde1c30fb8c7c2b9e1dba9c914c8923cf28e6..811de8eb1bc2214718f2428d4c668c6195c2dfbd 100644 (file)
@@ -6,9 +6,9 @@
 
 #include <config.h>
 
-#include <yang/adaptor_option.h>
-#include <dhcp/std_option_defs.h>
 #include <dhcp/docsis3_option_defs.h>
+#include <dhcp/std_option_defs.h>
+#include <yang/adaptor_option.h>
 
 using namespace std;
 using namespace isc::data;
index 66af45df9e46494efe9910b2517ac448f9dd0cbd..a07fe7836e909ddcd3e723dd967f85270d33eafa 100644 (file)
@@ -10,8 +10,7 @@
 #include <dhcp/option_data_types.h>
 #include <yang/adaptor.h>
 
-#include <list>
-#include <map>
+#include <unordered_map>
 
 namespace isc {
 namespace yang {
@@ -21,7 +20,7 @@ namespace yang {
 ///
 /// The map is used to store space+name to code mappings so for
 /// an option data without a code entry the code entry can be supplied.
-using OptionCodes = std::map<std::string, uint16_t>;
+using OptionCodes = std::unordered_map<std::string, uint16_t>;
 
 /// @brief JSON adaptor for option data or definition setting defaults.
 ///
index 2edfcfde1090770c458cd30b67817d0a5e48bf15..54966afc5aaee23792a229a64f27bd0957986631 100644 (file)
@@ -9,6 +9,8 @@
 #include <yang/adaptor_pool.h>
 #include <yang/yang_models.h>
 
+#include <vector>
+
 using namespace std;
 using namespace isc::data;
 
index 84af9dba2d3717111eb1ce695cd47f4adb001727..f1262be628628d3e8ed1555bd9335098fe1c4532 100644 (file)
@@ -8,7 +8,6 @@
 #define ISC_ADAPTOR_POOL_H 1
 
 #include <yang/adaptor.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index ad0d279708f3991110b989d406b23dc8381ad20d..270792f2a796355ac9bc61a26c9a9e717f08d0e5 100644 (file)
@@ -7,15 +7,16 @@
 #ifndef ISC_ADAPTOR_SUBNET_H
 #define ISC_ADAPTOR_SUBNET_H 1
 
-#include <yang/adaptor.h>
 #include <dhcpsrv/subnet_id.h>
-#include <set>
+#include <yang/adaptor.h>
+
+#include <unordered_set>
 
 namespace isc {
 namespace yang {
 
 /// @brief Set of SubnetIDs.
-using SubnetIDSet = std::set<isc::dhcp::SubnetID>;
+using SubnetIDSet = std::unordered_set<isc::dhcp::SubnetID>;
 
 /// @brief JSON adaptor for subnets adding IDs and canonizes relays.
 ///
index 1fb72e813895c86620aef5aa9de04879110afc18..cc28db62aef1d530182c2c5e31df390e4eab8bf5 100644 (file)
@@ -1,10 +1,16 @@
+
+
+
+
 CLEANFILES = *.gcno *.gcda
 
 TESTS = sysrepo_setup_tests
 
 sysrepo_setup_tests_SOURCES = sysrepo_setup_tests.cc
-sysrepo_setup_tests_CPPFLAGS = -I$(top_builddir)/src/lib
+sysrepo_setup_tests_CPPFLAGS  =
+sysrepo_setup_tests_CPPFLAGS += -I$(top_builddir)/src/lib
 sysrepo_setup_tests_CPPFLAGS += -I$(top_srcdir)/src/lib
+sysrepo_setup_tests_CPPFLAGS += -DKEATEST_MODULE
 sysrepo_setup_tests_CPPFLAGS += $(LIBYANG_CPPFLAGS)
 sysrepo_setup_tests_CPPFLAGS += $(LIBYANG_INCLUDEDIR)
 sysrepo_setup_tests_CPPFLAGS += $(LIBYANGCPP_CPPFLAGS)
@@ -13,7 +19,6 @@ sysrepo_setup_tests_CPPFLAGS += $(SYSREPO_CPPFLAGS)
 sysrepo_setup_tests_CPPFLAGS += $(SYSREPO_INCLUDEDIR)
 sysrepo_setup_tests_CPPFLAGS += $(SYSREPOCPP_CPPFLAGS)
 sysrepo_setup_tests_CPPFLAGS += $(SYSREPOCPP_INCLUDEDIR)
-sysrepo_setup_tests_CPPFLAGS += -DSYSREPO_REPO=\"@SR_REPO_PATH@\"
 sysrepo_setup_tests_LDFLAGS = $(AM_LDFLAGS)
 sysrepo_setup_tests_LDADD  =
 sysrepo_setup_tests_LDADD += $(LIBYANG_LIBS)
index b815d24e9b1c184d05bd188c7c4cfb018a1637df..9af238657c2e59dbada79ceecec1c3bc9a102501 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <config.h>
 
-#define KEATEST_MODULE
 #include <yang/yang_revisions.h>
 
 #include <sysrepo-cpp/Connection.hpp>
@@ -15,6 +14,7 @@
 #include <iostream>
 #include <unordered_map>
 #include <sstream>
+#include <vector>
 
 using namespace std;
 using namespace libyang;
@@ -24,8 +24,6 @@ using namespace isc::yang;
 using libyang::Context;
 using libyang::Module;
 
-const string REPOSITORY = SYSREPO_REPO;
-
 /// @brief Returns nicely formed error message if module is missing
 ///
 /// @param name name of the YANG module to complain about
index 517a07d656158da6372fd642e4734a258396d743..c3635ed65f17fe0a055db8151421941eae9644ee 100644 (file)
@@ -1,4 +1,6 @@
-AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+AM_CPPFLAGS  =
+AM_CPPFLAGS += -DKEATEST_MODULE
+AM_CPPFLAGS += -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
 AM_CPPFLAGS += $(BOOST_INCLUDES)
 AM_CPPFLAGS += $(LIBYANG_CPPFLAGS)
 AM_CPPFLAGS += $(LIBYANG_INCLUDEDIR)
index 76d05820704244559c982da59338c12cfc7a3906..a429badc71e97dbadc7dc67b1a99619b397fa6ae 100644 (file)
@@ -6,12 +6,14 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
 #include <testutils/io_utils.h>
 #include <testutils/user_context_utils.h>
 #include <yang/adaptor_config.h>
 
-#include <gtest/gtest.h>
+#include <vector>
 
 using namespace std;
 using namespace isc;
index 6a50420817954663f7bc76db4ad8d10a40c4f46e..0d50632d887380cb87b2e7d507cc752d0936f9ed 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
 #include <yang/adaptor_host.h>
 
-#include <gtest/gtest.h>
-
 using namespace std;
 using namespace isc;
 using namespace isc::data;
index d9bfd563aaf296cb7cff0e571cdcbf2e19f4caaa..8d073ef59543071b75fab58c25016c39fc3a70b4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,6 +6,8 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <dhcp/dhcp4.h>
 #include <dhcp/dhcp6.h>
 #include <dhcp/option_data_types.h>
@@ -13,8 +15,6 @@
 #include <testutils/gtest_utils.h>
 #include <yang/adaptor_option.h>
 
-#include <gtest/gtest.h>
-
 using namespace std;
 using namespace isc;
 using namespace isc::data;
index 367502af6fd7bd0a28bb3b7a72164fe4f1b038e4..6152834bf6d7cb68900722d8e6012b0dc30cc905 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,12 +6,12 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
 #include <yang/adaptor_pool.h>
 #include <yang/yang_models.h>
 
-#include <gtest/gtest.h>
-
 using namespace std;
 using namespace isc;
 using namespace isc::data;
index 00ac3ca39e23c2f4399f64899fb65142250dd5be..85aac8a4a740c51f4fc7019679803e43d8218fde 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
 #include <yang/adaptor_subnet.h>
 
-#include <gtest/gtest.h>
-
 using namespace std;
 using namespace isc;
 using namespace isc::data;
index 431e8b0ad2b4e22b485c4724c03e05e202033462..5289b13d875de00250f315c02e6891c1b14a95dc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
 #include <yang/adaptor.h>
 
-#include <gtest/gtest.h>
-
 using namespace std;
 using namespace isc;
 using namespace isc::data;
index fdb286482ca63119ed797adcd60d385467ce246d..f04b8f6e231cdfd36db6458b891522e77ce1007d 100644 (file)
@@ -6,19 +6,20 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/io_utils.h>
 #include <testutils/user_context_utils.h>
-#include <yang/translator_config.h>
-#include <yang/yang_models.h>
 #include <yang/tests/json_configs.h>
-#include <yang/tests/yang_configs.h>
 #include <yang/tests/sysrepo_setup.h>
-
-#include <boost/algorithm/string.hpp>
-
-#include <gtest/gtest.h>
+#include <yang/tests/yang_configs.h>
+#include <yang/translator_config.h>
+#include <yang/yang_models.h>
 
 #include <iostream>
+#include <vector>
+
+#include <boost/algorithm/string.hpp>
 
 using namespace std;
 using namespace isc;
index c0847cad146034f3393e3a15649128bf0707b0ee..dee9346bdab2cd4fad4156c21f0a37e88302dad5 100644 (file)
@@ -7,8 +7,9 @@
 #include <config.h>
 
 #include <gtest/gtest.h>
-#include <util/unittests/run_all.h>
+
 #include <log/logger_support.h>
+#include <util/unittests/run_all.h>
 
 int
 main(int argc, char* argv[]) {
index 1f551c476834792811fdcf6ed9949e6b5a9b821e..c46fad57da779cf9ee8b98e5b7535958a55a3977 100644 (file)
@@ -9,14 +9,14 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
 #include <yang/translator.h>
 #include <yang/yang_models.h>
 
 #include <sysrepo-cpp/Connection.hpp>
 
-#include <gtest/gtest.h>
-
 namespace isc {
 namespace yang {
 namespace test {
index 1caa44af4c9c81db4bba3c00a048911306828698..f38b39c4f71dc10219ee232af38cc0fa470bf288 100644 (file)
@@ -6,11 +6,12 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_class.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
 
-#include <gtest/gtest.h>
 #include <sstream>
 
 using namespace std;
index 5f87ed2d4add9892d7ee820955b2cef54ce2af54..5f10a920d8d4badd32a576e6246dacad638c1fbe 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_control_socket.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;
index d536d859bc5454887e6d35fc473e1d74adeaca09..ccd22f9de3652e95f32f4db58c1cb99e0ed2017c 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_database.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;
index 4d9b4c05b4b71e114d0b0a2dccb0e29e3385c1cb..e4a97d5b018f6155f4fe8dae1890957dc8cb1175 100644 (file)
@@ -6,11 +6,12 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_host.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
 
-#include <gtest/gtest.h>
 #include <sstream>
 
 using namespace std;
index d767bd4f669e0041255d2f1860420f07df56279f..ae29a42b2e40ac7b6d9fbf09592d42f23e52b457 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_logger.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;
index 161cff88b6640463d04d87a01228055b8f709d14..8830d42084f0bff601320fe4d40ea738ea7e05a7 100644 (file)
@@ -6,12 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_option_data.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
-#include <sstream>
 
 using namespace std;
 using namespace isc;
index 188245bd41b459d9ee89e4dfe6ebc411f23247a3..6aa099b661331503805bb9bcf3c01e45f96e30ce 100644 (file)
@@ -6,12 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_option_def.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
-#include <sstream>
 
 using namespace std;
 using namespace isc;
index a811de9b549669315c91cb27013fb4eb35e98f4c..23ac632026982af06848c16971f4494da0011663 100644 (file)
@@ -6,11 +6,12 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_pd_pool.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
 
-#include <gtest/gtest.h>
 #include <sstream>
 
 using namespace std;
index 93b9b2eeef4a83cd7e6703d9a73d4203b67725b3..a68c20f408a1186a7b0d18558e066034f102bc81 100644 (file)
@@ -6,11 +6,12 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_pool.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
 
-#include <gtest/gtest.h>
 #include <sstream>
 
 using namespace std;
index 4308130c84a8df77d9f8aa2229ddbe6c9d0631b6..374419aa44f2fcb5c080b456eab2b6f6f0c779f2 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_shared_network.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;
index e87eb68a7f2721d51a00f1f39110c9a045ff4cf5..332711ef11dbfdd4a74352b54430854061a70ee3 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
+#include <yang/tests/sysrepo_setup.h>
 #include <yang/translator_subnet.h>
 #include <yang/yang_models.h>
-#include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;
index b38164adceb28b6c2ca46d0068bf7eaa9ba2576a..b2c79ff1b08d77e14c3b2550b1a02a7d679b427c 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
-#include <yang/translator.h>
 #include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
+#include <yang/translator.h>
 
 using namespace std;
 using namespace isc;
index de56acdc0d263d3264408a2487556446db0c67f7..e463d73bda6b3864a60062000ad632c828dcebb7 100644 (file)
@@ -6,11 +6,11 @@
 
 #include <config.h>
 
+#include <gtest/gtest.h>
+
 #include <testutils/gtest_utils.h>
-#include <yang/tests/yang_configs.h>
 #include <yang/tests/sysrepo_setup.h>
-
-#include <gtest/gtest.h>
+#include <yang/tests/yang_configs.h>
 
 #include <sstream>
 
index e94d302d2024ea0790b462120c334907cf72e05a..bd9a6b1eb67e5f948916f3b18837eccc33bf9c6f 100644 (file)
@@ -7,8 +7,10 @@
 #ifndef ISC_YANG_CONFIGS_H
 #define ISC_YANG_CONFIGS_H
 
-#include <yang/yang_models.h>
 #include <yang/testutils/translator_test.h>
+#include <yang/yang_models.h>
+
+#include <vector>
 
 namespace isc {
 namespace yang {
index e8f6e12a9c30912fdb0843b17ba10595e22d48db..ecf18fc6ddd779f419e82f011742a0c1810d5fd8 100644 (file)
@@ -10,7 +10,8 @@
 
 #include <boost/lexical_cast.hpp>
 
-#include <sstream>
+#include <variant>
+#include <vector>
 
 using namespace std;
 using namespace isc::data;
index a3127b21576be26a8a0bd9154422361c2f9fc294..fa7a26a35d610fe2ae618186c124eda6d60bd40f 100644 (file)
@@ -8,8 +8,8 @@
 #define ISC_TRANSLATOR_TEST_H 1
 
 #include <yang/translator.h>
+
 #include <vector>
-#include <iostream>
 #include <unordered_map>
 
 namespace isc {
index 6a293ce95a714064094c14ee929e58d84c8ccdda..0922f248fe9444e0ebd22dabba137f3c089b38c4 100644 (file)
@@ -6,12 +6,13 @@
 
 #include <config.h>
 
-#include <yang/translator.h>
 #include <util/encode/base64.h>
+#include <yang/translator.h>
 
 #include <sysrepo-cpp/utils/exception.hpp>
 
 #include <cstring>
+#include <vector>
 
 using namespace std;
 using namespace isc::data;
index add2ff06784a2521a0153108708dd1abda74f29d..868ed931e23c6dbc4c40c2f7d84c80aad8ee7096 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_class.h>
 #include <yang/adaptor.h>
+#include <yang/translator_class.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index 2659786e9ff831f538dbf9e71f49a5249721bd26..851851f4d97a872e07eddd4a246cacd4d0023047 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <yang/translator_option_data.h>
 #include <yang/translator_option_def.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 1c1dafbb394eb6b73133f2a96ecd851c9c8f992f..b53ea660e8cea12fb61528319f5eeb8e5857cc08 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_config.h>
 #include <yang/adaptor_config.h>
+#include <yang/translator_config.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index a049fe0d84a0bad12634b2ed46a7e540aa0f4f9e..911d2ef726449d5a7598e7f21539e3d0e506d4ae 100644 (file)
@@ -8,12 +8,11 @@
 #define ISC_TRANSLATOR_CONFIG_H 1
 
 #include <yang/translator.h>
+#include <yang/translator_class.h>
 #include <yang/translator_control_socket.h>
 #include <yang/translator_database.h>
-#include <yang/translator_class.h>
-#include <yang/translator_shared_network.h>
 #include <yang/translator_logger.h>
-#include <list>
+#include <yang/translator_shared_network.h>
 
 namespace isc {
 namespace yang {
index 4fb43844020629d7b5cb503e7e2e4b28ceb5d322..e881479a4e52ea925040424d70bbb1525c1e1844 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_control_socket.h>
 #include <yang/adaptor.h>
+#include <yang/translator_control_socket.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index 8d563a3d6b2c9a9c6ede42f37d32bff62c4035f9..39aabc3f7181ff830484499813b4834de265e621 100644 (file)
@@ -8,7 +8,6 @@
 #define ISC_TRANSLATOR_CONTROL_SOCKET_H 1
 
 #include <yang/translator.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 046c092e427262854ce8fc818aa3393cd4fd9b33..a37914495f177c2b9830c451379063eee0229a37 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_database.h>
 #include <yang/adaptor.h>
+#include <yang/translator_database.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index a5e021680419dad94c35ed1632be4d85331ea91f..0657a34e796ebb3552e6a23d407ce4839ea634f6 100644 (file)
@@ -8,7 +8,7 @@
 #define ISC_TRANSLATOR_DATABASE_H 1
 
 #include <yang/translator.h>
-#include <list>
+
 
 namespace isc {
 namespace yang {
index ea014203152ec4fe8ca814fdd65961a4cffe59ae..f24ae783b59f4fdae5aa2b02a510b03c9a880c6a 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_host.h>
 #include <yang/adaptor.h>
+#include <yang/translator_host.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index 45dcdf3c91f8745b9e5b8b3bd4a7672e5cee70d8..65f169bfa2574ab64a25935f0f0390f758a2f7db 100644 (file)
@@ -8,7 +8,6 @@
 #define ISC_TRANSLATOR_HOST_H 1
 
 #include <yang/translator_option_data.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 2b3ddcf3bb1c549c911f6ea3cd29722f2346a0b9..fb1856f38004086c9eee9074efb03ce68e5b77af 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_logger.h>
 #include <yang/adaptor.h>
+#include <yang/translator_logger.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index 1adfcadf224fdca2d9a7fd8ece21f66650e7f666..af0e5f7199046564379f3a661754b4581157c0d4 100644 (file)
@@ -8,7 +8,6 @@
 #define ISC_TRANSLATOR_LOGGER_H 1
 
 #include <yang/translator.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 5f5ba8e515e3aec4aa834582a09a65106755c1f4..bb75c475683fc55d4f7ccb46a8c2a240b09b7ae1 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_option_data.h>
 #include <yang/adaptor.h>
+#include <yang/translator_option_data.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index 10aeb69a1cb363861224735dd2a2b3f43b0fb98b..ace9a36770eb20f2a0e1737473795b7083b96bbd 100644 (file)
@@ -8,7 +8,6 @@
 #define ISC_TRANSLATOR_OPTION_DATA_H 1
 
 #include <yang/translator.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 5e49852f4623e33ee5cfd4e08643c1c9dd735f60..0154f88d52cb6ace50dbef4e9242b6770affa8cb 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <config.h>
 
-#include <yang/translator_option_def.h>
 #include <yang/adaptor.h>
+#include <yang/translator_option_def.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index 07cfd97aee3d3684a63bca9b6e0bf545c4e53b31..1a32b9e23dc5ad79a357bb617f015dbb1fe017b5 100644 (file)
@@ -8,7 +8,7 @@
 #define ISC_TRANSLATOR_OPTION_DEF_H 1
 
 #include <yang/translator.h>
-#include <list>
+
 
 namespace isc {
 namespace yang {
index 58311cf80b340b903b30607a5b4775f963e1bf4b..81bdcb7941c86d7723d349b50dd33a4bdbfd1c3a 100644 (file)
@@ -9,7 +9,9 @@
 #include <yang/adaptor.h>
 #include <yang/translator_pd_pool.h>
 #include <yang/yang_models.h>
+
 #include <boost/lexical_cast.hpp>
+
 #include <sstream>
 
 using namespace std;
index 5756a7ffb50a05cbf40a2f1d3185ea1a090b1d37..7812209bc02b5400ee312d1049ea7f66a9fb4769 100644 (file)
@@ -8,7 +8,6 @@
 #define ISC_TRANSLATOR_PD_POOL_H 1
 
 #include <yang/translator_option_data.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 088227a040835399375aeab6af85496cb69e57d5..04ddb5da6d50f42ecf069085b440a916a8f8e983 100644 (file)
@@ -6,12 +6,14 @@
 
 #include <config.h>
 
-#include <asiolink/io_address.h>
 #include <asiolink/addr_utilities.h>
+#include <asiolink/io_address.h>
 #include <yang/adaptor.h>
 #include <yang/translator_pool.h>
 #include <yang/yang_models.h>
+
 #include <boost/lexical_cast.hpp>
+
 #include <sstream>
 
 using namespace std;
index 9ae9f5226cdf136302480d93db780737aacca7a5..6b5605a8d4ec3f87b5bc5b92e1590f49242bf9f1 100644 (file)
@@ -8,7 +8,6 @@
 #define ISC_TRANSLATOR_POOL_H 1
 
 #include <yang/translator_option_data.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index ed43d3eb3a15daf7bd9c2f4ec346d61191f3b157..517b59a0e7902ae1ed7c866d985bbf43900138ff 100644 (file)
@@ -7,8 +7,8 @@
 #include <config.h>
 
 #include <yang/translator_shared_network.h>
-#include <yang/adaptor.h>
 #include <yang/yang_models.h>
+
 #include <sstream>
 
 using namespace std;
index a95024aca3a262c6ccf41de69e4417386486c986..ec8e94740d3785b87142e0ea2669420f98e1ebd3 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <yang/translator.h>
 #include <yang/translator_subnet.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 07427009bb18c76439f70dec644bf8e09c547c95..60e54b26573ca1f5c6a598573fc3a2e357586f84 100644 (file)
@@ -11,7 +11,6 @@
 #include <yang/translator_pool.h>
 #include <yang/translator_pd_pool.h>
 #include <yang/translator_host.h>
-#include <list>
 
 namespace isc {
 namespace yang {
index 9cba6038ddd837013b43d902405c0bee633f062b..6c9286b0c9952c99e28dfa9637c8205419204e22 100644 (file)
@@ -7,14 +7,14 @@
 #ifndef ISC_YANG_REVISIONS_H
 #define ISC_YANG_REVISIONS_H 1
 
-#include <map>
 #include <string>
+#include <unordered_map>
 
 namespace isc {
 namespace yang {
 
 // Table of module name / revision.
-static const std::map<std::string, std::string> YANG_REVISIONS = {
+static const std::unordered_map<std::string, std::string> YANG_REVISIONS = {
 #ifdef KEATEST_MODULE
     { "keatest-module", "2018-11-20" },
 #endif  // KEATEST_MODULE
index 76edaa25ec575e37b7d3198956bd88ba40069391..7acf0ff2abb5515c5beb3f22f20195dfb3683092 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2022 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,19 +7,19 @@
 #ifndef ISC_YANG_REVISIONS_H
 #define ISC_YANG_REVISIONS_H 1
 
-#include <map>
 #include <string>
+#include <unordered_map>
 
 namespace isc {
 namespace yang {
 
 // Table of module name / revision.
-static const std::map<std::string, std::string> YANG_REVISIONS = {
+static const std::unordered_map<std::string, std::string> YANG_REVISIONS = {
 // Fill this by:
 // cd .../src/share/yang/modules
 // sh utils/gen-revisions.sh > r
 // insert the r file here
-};
+};  // YANG_REVISIONS
 
 }  // namespace yang
 }  // namespace isc