[5110] Entire D2 configuration is now handled through new parsing scheme
src/bin/d2/d2_cfg_mgr.h
src/bin/d2/d2_cfg_mgr.cc
"forward-ddns" and "reverse-ddns" are now parsed using SimpleParsers
src/bin/d2/d2_config.h
src/bin/d2/d2_config.cc
TSIGKeyInfoParser converted to flat style
DnsServerInfoParser, DnsServerInfoListParser, DdnsDomainParser,
DdnsDomainListParser, DdnsDomainListMgrParser
- now all derive from SimpleParser
src/bin/d2/d2_lexer.ll
Added sub-grammar/contexts for PARSER_TSIG_KEY, PARSER_DDNS_DOMAIN,
PARSER_DNS_SERVER:
D2SimpleParser::setDdnsDomainDefaults()
D2SimpleParser::setManagerDefaults() - new methods to handle setting
scalar defaults and defaults of child elements
D2SimpleParser::setAllDefaults() - now sets defaults for entire D2
config
src/bin/d2/tests/d2_cfg_mgr_unittests.h
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
Moved all component SimpleParser tests to d2_simple_parser_unittest.cc/h
Revamped D2CfgMgrTest
src/bin/d2/tests/d2_simple_parser_unittest.h
src/bin/d2/tests/d2_simple_parser_unittest.cc
Moved component SimpleParser tests here.
src/bin/d2/tests/nc_test_utils.h
src/bin/d2/tests/nc_test_utils.cc
Moved valid_d2_config global from lib/process/tests to here
src/bin/d2/tests/testdata/d2_cfg_tests.json
Updated format and error messages
[5110] D2 now uses JSON parsing and SimpleParsers to handle D2 global scalars
new files:
src/bin/d2/tests/
d2_simple_parser_unittest.cc
parser_unittest.cc
parser_unittest.h
src/bin/d2/d2_cfg_mgr.h
src/bin/d2/d2_cfg_mgr.cc
D2CfgMgr::parseElement() - overrides base class implementation,
flag global parameters as parsed without pushing them to D2CfgContext
value stores
D2CfgMgr::setCfgDefaults() - overrides base class implementation,
sets defaults for D2
D2CfgMgr::buildParams() - revamped to pull parameters from the given
element map instead of context value stores. Removed checks that
are now done by JSON parser.
src/bin/d2/d2_controller.cc
D2Controller::parseFile() - instead of generic JSON parsing, parse
file with PARSER_DHCPDDNS context
src/bin/d2/d2_lexer.ll
src/bin/d2/d2_parser.yy
Changed namespace from dhcp to d2
Added PARSER_SUB_DHCPDDNS and D2 global parameter parsing
Added objects for forward-ddns, reverse-ddns, tsig-keys
src/bin/d2/tests/Makefile.am
Added new test source files
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
src/bin/d2/tests/testdata/d2_cfg_tests.json
TEST_F(D2CfgMgrTest, configPermutations) - revamped to test JSON parsing
as well as element parsing
src/bin/d2/tests/parser_unittest.h
src/bin/d2/tests/parser_unittest.cc
New file that tests basic JSON parsing
src/lib/cc/data.h
Added parens around TypeError position error text
src/lib/cc/simple_parser.cc
SimpleParser::setDefaults() - added logic to detect bad lexical casts
when handling integers
[5110] Added support for setting configuration defaults to DCfgMgrBase
src/lib/process/d_cfg_mgr.h
src/lib/process/d_cfg_mgr.cc
DCfgMgrBase::setCfgDefaults() - new virtual method so derivations can
insert default values prior into a configuration
DCfgMgrBase::parseConfig() - added call to setCfgDefaults() prior to
calling parseConfig().
[5110] Added basic bison parser and SimpleParser to D2
D2 now uses bison parsing to parse its config file and has starter
files for SimpleParser. This check-in uses only generic JSON context
parsing (i.e. no D2 specific grammar).
Added new bison/flex parsing files:
d2_lexer.ll
d2_parser.yy
parser_context.cc
parser_context.h
parser_context_decl.h
Added new generated files:
d2_parser.cc
d2_parser.h
location.hh
position.hh
stack.hh
Added new SimpleParser related files:
d2_simple_parser.cc
d2_simple_parser.h
src/bin/d2/Makefile.am
Added bison/flex related entries and rules
src/bin/d2/d2_controller.h
src/bin/d2/d2_controller.cc
D2Controller::parseFile() - new method which overrides base class
version and calls new bison parsing to parse JSON config file.
[5110] Added alternate parsing hooks into DController and DCfgMgrBase
In order to accomodate bison parsing for JSON text and SimpleParser
based element parsing, virtual methods were added to allow derivations
to migrate.
src/lib/process/d_cfg_mgr.h
src/lib/process/d_cfg_mgr.cc
DCfgMgrBase::parseElement() - new method to allow derivaitons
to support alternate Element parsers on a element by element basis
DCfgMgrBase::buildParams()
DCfgMgrBase::buildAndCommit() - added call to parseElement()
src/lib/process/d_controller.h
src/lib/process/d_controller.cc
DControllerBase::parseFile() - new method to allow derivations
to use alternate JSON parsers
DControllerBase::configFromFile() - added call to parseFile()
[5033] - kea-dhcp6 now uses new D2ClientConfigParser
src/bin/dhcp6/json_config_parser.cc
createGlobalDhcp6ConfigParser()
- added clause to invoke new D2ClientConfigParser to
set staging config
- added clause to apply staged D2ClientConfig (formerly done
by parser commit
src/bin/dhcp4/simple_parser6.h
src/bin/dhcp4/simple_parser6.cc
defined SimpleParser6::D2_CLIENT_CONFIG_DEFAULTS
SimpleParser6::setAllDefaults() - now sets defaults
for D2ClientConfig
src/bin/dhcp6/tests/d2_unittest.cc
src/bin/dhcp6/tests/fqdn_unittest.cc
Updated replace-name-mode values and tests
(true/false no longer supported)
doc/guide/dhcp6-srv.xml
Updated, replace-client-name no longer accepts booleans
[5033] - migrated D2ClientConfigParser to SimpleParser, kea-dhcp4 uses it
src/bin/dhcp4/json_config_parser.cc
createGlobalDhcp4ConfigParser()
- added clause to invoke new D2ClientConfigParser to
set staging config
- added clause to apply staged D2ClientConfig (formerly done
by parser commit
src/bin/dhcp4/simple_parser4.h
src/bin/dhcp4/simple_parser4.cc
defined SimpleParser4::D2_CLIENT_CONFIG_DEFAULTS
SimpleParser4::setAllDefaults() - now sets defaults
for D2ClientConfig
src/bin/dhcp4/tests/d2_unittest.cc
src/bin/dhcp4/tests/fqdn_unittest.cc
Updated replace-name-mode values (true/false no longer supported)
src/lib/dhcpsrv/parsers/dhcp_parsers.h
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
D2ClientConfig now derives from SimpleParser
src/lib/dhcpsrv/srv_config.h
src/lib/dhcpsrv/srv_config.cc
Added a D2ClientConfigPtr member to SrvConfig.
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
Updated tests to set D2 client config defaults
doc/guide/dhcp4-srv.xml
Updated, replace-client-name no longer accepts booleans