1. 03 Jan, 2019 1 commit
  2. 13 Jun, 2018 1 commit
  3. 18 May, 2018 2 commits
  4. 16 May, 2018 1 commit
  5. 01 Mar, 2017 1 commit
  6. 22 Feb, 2017 1 commit
  7. 15 Feb, 2017 1 commit
    • Thomas Markwalder's avatar
      [5110] Addressed review comments part 1 · 0fe888f4
      Thomas Markwalder authored
          Fixed unused parameter errors
          Fixed doxygen errors
          Commentary changes
          Removed reference to .spec file from commentary
          TSIGKeyListParser now uses only one instance of TSIGKeyInfoParser
          src/bin/d2/d2_parser.yy -  added upper limit to port tests
          Updated unit tests to use "example.com"
      0fe888f4
  8. 31 Jan, 2017 1 commit
    • Thomas Markwalder's avatar
      [5110] Entire D2 configuration is now handled through new parsing scheme · 7e1ef0b2
      Thomas Markwalder authored
      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:
      
      src/bin/d2/d2_parser.yy
          Added "false" tokens for sub-contexts:
              SUB_TSIG_KEY, SUB_TSIG_KEYS, SUB_DDNS_DOMAIN,SUB_DDNS_DOMAINS,
              SUB_DNS_SERVER, SUB_DNS_SERVERS
      
      src/bin/d2/d2_simple_parser.h
      src/bin/d2/d2_simple_parser.cc
          Added Defaults:
              TSIG_KEY_DEFAULTS, DDNS_DOMAIN_MGR_DEFAULTS, DDNS_DOMAIN_DEFAULTS,
              DNS_SERVER_DEFAULTS
      
          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
      
      parser_context.h
      parser_context.cc
          Added parser types:
              PARSER_SUB_DHCPDDNS,
              PARSER_TSIG_KEY,
              PARSER_TSIG_KEYS,
              PARSER_DDNS_DOMAIN,
              PARSER_DDNS_DOMAINS,
              PARSER_DNS_SERVER,
              PARSER_DNS_SERVERS
      
      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
      
      src/lib/process/testutils/d_test_stubs.h
      src/lib/process/testutils/d_test_stubs.cc
          Removed valid_d2_config
      7e1ef0b2
  9. 26 Jan, 2017 4 commits
    • Thomas Markwalder's avatar
      [5110] Adding bison parsing for forward-ddns and reverser-ddns to D2 · e93455bd
      Thomas Markwalder authored
      src/bin/d2/d2_lexer.ll
          Added regexp for ddns-domians, key-name,
          dns-servers, hostname
      
      src/bin/d2/d2_parser.yy
          Added tokens and rules for ddns-domains,
          key-name, dns-servers, hostname
      
      src/bin/d2/parser_context.h
      src/bin/d2/parser_context.cc
          Added contexts FORWARD_DDNS, REVERSE_DDNS,
          DDNS_DOMAINS, DNS_SERVERS,
      
      src/bin/d2/tests/testdata/d2_cfg_tests.json
          Changed logic-errors to syntax-errors
      e93455bd
    • Thomas Markwalder's avatar
      [5110] D2 TSIG key list now uses bison parsing and SimpleParsers · 4647edb2
      Thomas Markwalder authored
      src/bin/d2/d2_cfg_mgr.cc
          D2CfgMgr::parseElement() - now handles tsig-keys
      
      src/bin/d2/d2_config.h
      src/bin/d2/d2_config.cc
          TSIGKeyInfoParser and TSIGKeyInfoListParser now
          derive from SimpleParser
      
      src/bin/d2/d2_lexer.ll
          Added algoritm, digest-bits, secret regexps
      
      src/bin/d2/d2_parser.yy
          Added ALGORITHM, DIGEST_BITS, SECRET tokens
          Added rules for "tsig-keys"
      
      src/bin/d2/parser_context.h
      src/bin/d2/parser_context.cc
          Added contexts: TSIG_KEYS, ALGORITHM, DIGEST_BITS, SECRET
      
      src/bin/d2/tests/d2_cfg_mgr_unittests.cc
          Revamped TSIG key tests
      
      src/bin/d2/tests/testdata/d2_cfg_tests.json
          changed appropriate logic-errors to syntax-errors
      4647edb2
    • Thomas Markwalder's avatar
      [5110] D2 now uses JSON parsing and SimpleParsers to handle D2 global scalars · 94938484
      Thomas Markwalder authored
      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/parser_context.cc
      src/bin/d2/parser_context.h
          Added PARSER_DHCPDDNS, PARSER_SUB_DHCPDDNS
      
      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
      94938484
    • Thomas Markwalder's avatar
      [5110] Added basic bison parser and SimpleParser to D2 · a80a3a6d
      Thomas Markwalder authored
      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.
      a80a3a6d