1. 13 Jun, 2018 2 commits
  2. 12 Jun, 2018 1 commit
  3. 11 Jun, 2018 2 commits
  4. 07 Jun, 2018 2 commits
    • Thomas Markwalder's avatar
      [5378] kea-dhcp4/6 now keep track of their configured global params · ef1c0b74
      Thomas Markwalder authored
      src/bin/dhcp4/json_config_parser.cc
          configureDhcp4Server() - added extract of configured globals
      
      src/bin/dhcp4/tests/get_config_unittest.cc
      src/bin/dhcp6/tests/get_config_unittest.cc
          Updated extracted and unparsed configs.
      
      src/bin/dhcp6/json_config_parser.cc
          configureDhcp6Server() - added extract of configured globals
      
      src/lib/dhcpsrv/srv_config.h
      src/lib/dhcpsrv/srv_config.cc
          Added storage and maintence of configured globals
          SrvConfig::toElement() - added configured globals to result
      
      src/lib/dhcpsrv/tests/srv_config_unittest.cc
          TEST_F(SrvConfigTest, configuredGlobals) - new test
      ef1c0b74
    • Francis Dupont's avatar
      [5549a] Code, examples and doc updated · 116962dd
      Francis Dupont authored
      116962dd
  5. 05 Jun, 2018 1 commit
  6. 04 Jun, 2018 2 commits
  7. 01 Jun, 2018 2 commits
  8. 31 May, 2018 4 commits
    • Thomas Markwalder's avatar
      [5629] Cql lease and host now validate schema version · 868996c8
      Thomas Markwalder authored
      src/lib/dhcpsrv/cql_host_data_source.cc
          CqlHostDataSourceImpl::CqlHostDataSourceImpl() - added schema
          version validation
      
      src/lib/dhcpsrv/cql_lease_mgr.cc
          CqlLeaseMgr::CqlLeaseMgr() - added schema version validation
      868996c8
    • Thomas Markwalder's avatar
      [5629] MySQL and PostgreSQL host backends now verify schema version · 3a4e9893
      Thomas Markwalder authored
      src/lib/dhcpsrv/mysql_host_data_source.cc
          MySqlHostDataSourceImpl::getVersion() - new function to
          fetch version accessible to impl constructor
      
          MySqlHostDataSourceImpl() - added schema validation after
          connecting
      
          MySqlHostDataSource::getVersion() - new uses impl method
      
      src/lib/dhcpsrv/pgsql_host_data_source.cc
          PgSqlHostDataSourceImpl()) - added schema validation after
          connecting
      
          PgSqlHostDataSourceImpl::getVersion() - no longer uses
          pre-prepared statement
      3a4e9893
    • Thomas Markwalder's avatar
      [5629] PostgreSQL Lease back end now properly validates schema version · 28e33a3c
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          PgSqlLeaseMgr::PgSqlLeaseMgr() - now validates schema version before
          preparing SQL statements
      
          PgSqlLeaseMgr::getVersion() - no longers uses pre-prepared statement
          or formal statement execution error checking
      28e33a3c
    • Thomas Markwalder's avatar
      [5629] MySQL Lease back end now validates schema after connecting · 7614eb8d
      Thomas Markwalder authored
      src/lib/dhcpsrv/mysql_lease_mgr.*
          MySqlLeaseMgr::MySqlLeaseMgr() - now validates schema
          after connecting
      
          MySqlLeaseMgr::getVersion()  - no longer relies on
          pre-prepared statement or formal statement execution
          error handling
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          LeaseMgrDbLostCallbackTest::testDbLostCallback() - replaced
          use of getVersion() with getLease4() for testing DB usability
      7614eb8d
  9. 29 May, 2018 1 commit
    • Thomas Markwalder's avatar
      [5418] Improved error handling of invalid subnet prefix lengths · 5ba16fab
      Thomas Markwalder authored
      src/lib/dhcpsrv/parsers/dhcp_parsers.cc
          SubnetConfigParser::createSubnet() - explicitly catch
          exceptions thrown by lexical_cast and added logic to
          catch values > 256
      
      src/bin/dhcp4/tests/config_parser_unittest.cc
      src/bin/dhcp6/tests/config_parser_unittest.cc
          badSubnetValues() - new test that checks
          several invalid subnet value scenarios
      5ba16fab
  10. 28 May, 2018 1 commit
  11. 26 May, 2018 1 commit
  12. 25 May, 2018 2 commits
    • Thomas Markwalder's avatar
      [5596] renew-timer and rebind-timer now optional for DHCPv4 · dec8d15f
      Thomas Markwalder authored
      v4 Parsing now allows renew/rebind timers to be unspecified,
      and kea-dhcp4 logic now matchs ISC DHCP:
      
      1. Send T2 only if it is specified and is less than lease lifetime
      2. Send T1 only if it is specified and is less than either T2
      if specified, or lease lifetime in the absence of T2
      
      doc/guide/dhcp4-srv.xml
          Updated discussion of rebind/renew-timers
      
      src/bin/dhcp4/dhcp4_srv.cc
          Dhcpv4Srv::assignLease() - modified to sanity check
          T1 and T2
      
      src/bin/dhcp4/tests/config_parser_unittest.cc
      src/bin/dhcp4/tests/get_config_unittest.cc
      src/bin/dhcp4/tests/simple_parser4_unittest.cc
      src/bin/dhcp6/tests/get_config_unittest.cc
      src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
      src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc
          updated numerous tests
      
      src/lib/dhcpsrv/network.cc
          Network::toElement() - only outputs T1, T2, and
          valid lifetime if they are specified
      
      src/lib/dhcpsrv/network.h
          Network() - inits t1_, t2_, and valid_ to unspecified
          Triplet value
      
      src/lib/dhcpsrv/parsers/dhcp_parsers.cc
          Subnet4ConfigParser::initSubnet() - allow renew-timer and
          rebind-timer to be optional
      
      src/lib/dhcpsrv/parsers/simple_parser4.cc
          SimpleDefaults SimpleParser4::GLOBAL4_DEFAULTS - removed
          entries for renew-timer and rebind-timer
      dec8d15f
    • Marcin Siodelski's avatar
      09dcfbca
  13. 24 May, 2018 2 commits
  14. 18 May, 2018 4 commits
  15. 17 May, 2018 1 commit
  16. 16 May, 2018 3 commits
  17. 14 May, 2018 1 commit
  18. 12 May, 2018 1 commit
  19. 11 May, 2018 1 commit
  20. 09 May, 2018 3 commits
    • Thomas Markwalder's avatar
      [5588] Cassandra shared lease stats support implemented · 83318b90
      Thomas Markwalder authored
          Note this impl is done with calculate-on-demand SQL
          statements rather than stat tables pluse triggers.
      
      src/lib/dhcpsrv/cql_lease_mgr.*
          Added new SQL statements for lease stats queries
      
          CqlLeaseStatsQuery
              Constructors - added variants to support where clause params
      
              start() - modified to support query variants based
              on where clause params
      
         CqlSqlLeaseMgr
              Added start variants:
              - startSubnetLeaseStatsQuery4(const SubnetID& subnet_id)
              - startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
                                                   const SubnetID& last_subnet_id)
      
      src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
          New unit tests:
          - TEST_F(CqlLeaseMgrTest, leaseStatsQuery4)
          - TEST_F(CqlLeaseMgrTest, leaseStatsQuery6)
      83318b90
    • Thomas Markwalder's avatar
      [5587] PostgreSQL support for shared lease stats implementation · b0bea19c
      Thomas Markwalder authored
      src/share/database/scripts/pgsql/dhcpdb_create.pgsql
          Adds lease<4/6>_stat tables and triggers
      src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
          Added drops for lease<4/6>_stat tables and triggers
      
      src/share/database/scripts/pgsql/upgrade_3.3_to_4.0.sh.in
          Adds lease<4/6>_stat tables and triggers
          Populates stat tables from existing lease table content
      src/bin/admin/tests/mysql_tests.sh.in
          mysql_lease6_stat_per_type() - fixed typo in test
      
      src/bin/admin/tests/pgsql_tests.sh.in
          run_statement() - new convenience fucntion for
          running statement with option expected outcome
      
          pgsql_upgrade_schema_to_version() - new function
          which converts the existing schema to a target version
      
          pgsql_lease4_stat_test() - tests v4 stat table and
          triggers in an new database
      
          pgsql_lease6_stat_test() - tests v6 stat table and
          triggers in an new database.
      
          pgsql_lease6_stat_per_type() - helper function which
          tests v6 stat table and triggers using a given address
          and lease type
      
          pgsql_lease_stat_upgrade_test() - tests data migration,
          stat table and trigger operations on an upgraded database
      
      src/lib/dhcpsrv/pgsql_lease_mgr.*
          Added new SQL statements for lease stats queries
      
          PgSqlLeaseStatsQuery
              Constructors - added variants to support where clause params
              start() - modified to support query variants based
              on where clause params
      
          PgSqlLeaseMgr
              Added start variants:
              - startSubnetLeaseStatsQuery4(const SubnetID& subnet_id)
              - startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
                                               const SubnetID& last_subnet_id)
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          New unit tests:
          - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery4)
          - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery6)
      b0bea19c
    • Thomas Markwalder's avatar
      [5586] Addressed further review comments · a070c327
      Thomas Markwalder authored
      src/bin/admin/tests/dhcpdb_create_5.1.mysql - deleted
      
      src/bin/admin/tests/mysql_tests.sh.in
          mysql_upgrade_schema_to_version()  - new function which
          upgrades an existing schema to a target version
      
          mysql_lease_stat_upgrade_test() - modified to start with
          1.0 schema and then use new function to upgrade to 4.0
      
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
          mysql_lease_mgr_unittest.cc
              Added condition compilation around INVALID_HOST scenario
              that causes db connectivity tests to fail
      a070c327
  21. 08 May, 2018 3 commits