]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Merge branch 'trac5039' (SimpleParser)
authorTomek Mrugalski <tomasz@isc.org>
Tue, 27 Dec 2016 18:25:31 +0000 (19:25 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 27 Dec 2016 18:25:31 +0000 (19:25 +0100)
# Conflicts:
# src/bin/dhcp4/Makefile.am
# src/bin/dhcp4/json_config_parser.cc
# src/bin/dhcp6/Makefile.am
# src/bin/dhcp6/dhcp6.dox
# src/bin/dhcp6/json_config_parser.cc
# src/bin/dhcp6/tests/Makefile.am

17 files changed:
1  2 
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml
src/bin/dhcp4/Makefile.am
src/bin/dhcp4/dhcp4.dox
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp4/tests/Makefile.am
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp6/Makefile.am
src/bin/dhcp6/dhcp6.dox
src/bin/dhcp6/tests/Makefile.am
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
src/lib/cc/data.cc
src/lib/cc/tests/Makefile.am
src/lib/cc/tests/data_unittests.cc
src/lib/dhcpsrv/Makefile.am
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc

Simple merge
Simple merge
index 4e3e11e093b246d37c3d4adf6873d35dbc61ccdd,d395f458a465d0330ab64f266cfb6370bcff8527..2eb33e27e68dd4dd71ccfb74e1ea816e02061fef
@@@ -62,12 -62,8 +62,11 @@@ libdhcp4_la_SOURCES += json_config_pars
  libdhcp4_la_SOURCES += dhcp4_log.cc dhcp4_log.h
  libdhcp4_la_SOURCES += dhcp4_srv.cc dhcp4_srv.h
  libdhcp4_la_SOURCES += dhcp4to6_ipc.cc dhcp4to6_ipc.h
 +libdhcp4_la_SOURCES += dhcp4_lexer.ll location.hh position.hh stack.hh
 +libdhcp4_la_SOURCES += dhcp4_parser.cc dhcp4_parser.h
 +libdhcp4_la_SOURCES += parser_context.cc parser_context.h parser_context_decl.h
  libdhcp4_la_SOURCES += kea_controller.cc
+ libdhcp4_la_SOURCES += simple_parser4.cc simple_parser4.h
  
  nodist_libdhcp4_la_SOURCES = dhcp4_messages.h dhcp4_messages.cc
  EXTRA_DIST += dhcp4_messages.mes
Simple merge
index b27ee09f3c02849f95db4d09fdcccabbe96d8b43,37c1262d88bd811e050b85a23fa7f663f7e39b2e..bcfad010e85cbac75c5a3ebfe747fbc0adc086ca
@@@ -424,11 -424,9 +424,8 @@@ DhcpConfigParser* createGlobalDhcp4Conf
          parser = new IfacesConfigParser4();
      } else if (config_id.compare("subnet4") == 0) {
          parser = new Subnets4ListConfigParser(config_id);
-     } else if (config_id.compare("option-data") == 0) {
-         parser = new OptionDataListParser(config_id, CfgOptionPtr(), AF_INET);
-     } else if (config_id.compare("option-def") == 0) {
-         parser  = new OptionDefListParser(config_id, globalContext());
+     // option-data and option-def have been converted to SimpleParser already.
 -    } else if ((config_id.compare("version") == 0) ||
 -               (config_id.compare("next-server") == 0)) {
 +    } else if ((config_id.compare("next-server") == 0)) {
          parser  = new StringParser(config_id,
                                      globalContext()->string_values_);
      } else if (config_id.compare("lease-database") == 0) {
Simple merge
index d3277bd22e370a697281487e4027ccc604af7a42,b1f6899e32e03ccee8888ed91a1270a8b5dfc2da..514b0a269bbcfe2385e26111ed2a76570e1e396e
@@@ -63,12 -63,8 +63,11 @@@ libdhcp6_la_SOURCES += dhcp6_srv.cc dhc
  libdhcp6_la_SOURCES += ctrl_dhcp6_srv.cc ctrl_dhcp6_srv.h
  libdhcp6_la_SOURCES += json_config_parser.cc json_config_parser.h
  libdhcp6_la_SOURCES += dhcp6to4_ipc.cc dhcp6to4_ipc.h
 +libdhcp6_la_SOURCES += dhcp6_lexer.ll location.hh position.hh stack.hh
 +libdhcp6_la_SOURCES += dhcp6_parser.cc dhcp6_parser.h
 +libdhcp6_la_SOURCES += parser_context.cc parser_context.h parser_context_decl.h
  libdhcp6_la_SOURCES += kea_controller.cc
+ libdhcp6_la_SOURCES += simple_parser6.cc simple_parser6.h
  
  nodist_libdhcp6_la_SOURCES = dhcp6_messages.h dhcp6_messages.cc
  EXTRA_DIST += dhcp6_messages.mes
index fc13d5befb94aa33fbebbcdf7615bffacf3123ea,da23fefcbc9fb38d1434ba74f6810368a743d769..f86e342a9696d14a3019b896e2572524e6a204c5
@@@ -24,17 -24,8 +24,19 @@@ component implementation
  
  @section dhcpv6ConfigParser Configuration Parsers in DHCPv6
  
- @endcode
 +Three minutes overview. If you are here only to learn absolute minimum about
 +the new parser, here's how you use it:
 +
 +@code
 + // The following code:
 + json = isc::data::Element::fromJSONFile(file_name, true);
 +
 + // can be replaced with this:
 + Parser6Context parser;
 + json = parser.parseFile(file_name, Parser6Context::PARSER_DHCP6);
++
+ Note: parsers are currently being migrated to @ref isc::data::SimpleParser. See
+ @ref ccSimpleParser page for details.
  
  The common configuration parsers for the DHCP servers are located in the
  src/lib/dhcpsrv/parsers/ directory. Parsers specific to the DHCPv6 component
index 9192f3dbca69b10bb1313d3b9f4e2dd6a6a92299,a2dd2358bb9f74dd72585af53e0b4c96c12e1f94..2d844b78e4ac7b5719908ad17488ca53ff4c9cb4
@@@ -94,7 -93,7 +94,8 @@@ dhcp6_unittests_SOURCES += dhcp6_messag
  dhcp6_unittests_SOURCES += kea_controller_unittest.cc
  dhcp6_unittests_SOURCES += dhcp6to4_ipc_unittest.cc
  dhcp6_unittests_SOURCES += classify_unittests.cc
 +dhcp6_unittests_SOURCES += parser_unittest.cc
+ dhcp6_unittests_SOURCES += simple_parser6_unittest.cc
  
  nodist_dhcp6_unittests_SOURCES  = marker_file.h test_libraries.h
  
Simple merge
Simple merge
Simple merge
index 6c8f48bb0f3e2b1eba56f72a4be41f65f578b1ac,fbd269bec61126a8460824738157b8ca8c23d912..28aded2cda8268d6b2aaed9c0017d349b7a8afb2
@@@ -20,8 -20,9 +20,6 @@@ if HAVE_CQ
  AM_CPPFLAGS += $(CQL_CPPFLAGS)
  endif
  
- AM_CXXFLAGS = $(KEA_CXXFLAGS)
 -# This is a temporary workaround until we have Kea-wide support for C++11.
 -AM_CXXFLAGS = $(KEA_CXXFLAGS) -std=c++11
--
  # The files in the subfolder must be explicitly specified here so
  # as they are copied to the distribution. The other option would
  # be to specify a whole 'parsers' folder here but that would also