[5110] DhcpConfigParser no longer used in libprocess or D2
src/lib/process/d_cfg_mgr.h
src/lib/process/d_cfg_mgr.cc
DCfgMgrBase::parseElement() - changed to void return
DCfgMgrBase::createConfigParser() - deleted this method
DCfgMgrBase::buildParams()
DCfgMgrBase::buildAndCommit() - now only call parseElement()
src/lib/process/tests/d_cfg_mgr_unittests.cc
ParseElementMgr, ParseElementMgrTest - deleted, no longer
relevant
src/lib/process/testutils/d_test_stubs.h
src/lib/process/testutils/d_test_stubs.cc
ObjectParser - deleted this object
DStubCfgMgr::createConfigParser() - deleted this method
DStubCfgMgr::parseElement() - new method which
replaces functionality formerly in createConfigParser
src/bin/d2/d2_cfg_mgr.cc
src/bin/d2/d2_cfg_mgr.h
D2CfgMgr::createConfigParser() - deleted this method
D2CfgMgr::parseElement() - changed to void return,
and throws on unknown element id
[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()