1. 14 Dec, 2016 1 commit
  2. 01 Nov, 2016 1 commit
    • Thomas Markwalder's avatar
      [5058] - Addressed review comments · 43ad2f49
      Thomas Markwalder authored
          Fixed typos and added decline lease checks for DHCPv6
      
      src/lib/dhcp/duid.h
      src/lib/dhcp/duid.cc
      src/lib/dhcp/tests/duid_unittest.cc
          - Replaced DUID::generateEmpty() with DUID::EMPTY() which returns
          a constant reference to a static DUID instance.  This facilitates
          comparisions.
          - Updated TEST(DuidTest,empty) accordingly
      
      src/lib/dhcpsrv/csv_lease_file6.cc
          CSVLeaseFile6::next() - added test to permit the Empty DUID
          only if state is STATE_DECLINED.
      
      src/lib/dhcpsrv/lease.cc
          Lease6::decline() - modified to use DUID::EMPTY().
      
      src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
          Fixed Typos
      
      src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
          TEST_F(CSVLeaseFile6Test, declinedLeaseTest) - new test to
          verify proper handling of declined leases
      43ad2f49
  3. 29 Oct, 2016 1 commit
  4. 28 Oct, 2016 2 commits
    • Thomas Markwalder's avatar
      [5058] CSVLeaseFile4 now properly loads declined leases · 9b19d774
      Thomas Markwalder authored
      src/lib/dhcpsrv/csv_lease_file4.cc
          CSVLeaseFile4::next() - modified to produce a read error
          if the hardware address is empty and the lease state
          is NOT declined.
      
          CSVLeaseFile4::readHWAddr() - no longer throws an exception
          if the hardware address is empty
      
      src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
      src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc
          Changed test lease data so invalid records do not
          have lease state of declined
      9b19d774
    • Thomas Markwalder's avatar
      [5058] Added unit test to check loading declined leases from CSV file · 8ce85344
      Thomas Markwalder authored
      src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
          TEST_F(CSVLeaseFile4Test, declinedLeaseTest) - new test
      8ce85344
  5. 26 Oct, 2016 1 commit
  6. 12 Oct, 2016 1 commit
  7. 11 Oct, 2016 1 commit
  8. 03 Oct, 2016 1 commit
  9. 20 Sep, 2016 1 commit
  10. 13 Sep, 2016 2 commits
  11. 01 Sep, 2016 1 commit
  12. 28 Aug, 2016 1 commit
  13. 25 Aug, 2016 2 commits
    • Tomek Mrugalski's avatar
      [4626] Changes after review · ada652ba
      Tomek Mrugalski authored
       - Dhcp4Srv::vendorClassSpecificProcessing removed
       - User's Guide updated
       - disabled obsolete test (will need to be rewritten to take advantage
         of new classification code)
       - classes definitions now use strings for server-name and filename
       - unused configuration removed from unit-tests
       - textFixedFields is now documented
       - Unit-tests now have short descriptions
      ada652ba
    • Marcin Siodelski's avatar
      [4552] Addressed review comments. · 7612f815
      Marcin Siodelski authored
      7612f815
  14. 24 Aug, 2016 7 commits
  15. 23 Aug, 2016 5 commits
    • Thomas Markwalder's avatar
      [4294] Refactored AddressStatsRow and AddressStatsQuery classes · 9a1249f1
      Thomas Markwalder authored
      src/lib/dhcpsrv/cfg_subnets4.cc
          CfgSubnets4::updateStatistics() -  replaced recountAddressStats4()
          with recountLeaseStats4()
      
      src/lib/dhcpsrv/cfg_subnets6.cc
          CfgSubnets6::updateStatistics() - replaced recountAddressStats6()
          with recountLeaseStats6()
      
      src/lib/dhcpsrv/lease_mgr.cc
          renamed LeaseMgr::recountAddressStats4() to recountLeaseStats4()
          renamed LeaseMgr::recountAddressStats6() to recountLeaseStats6()
          renamed LeaseMgr::startAddressStats4() to startLeaseStats4()
          renamed LeaseMgr::startAddressStats6() to startLeaseStats6()
      
      src/lib/dhcpsrv/lease_mgr.h
          replaced AddressStatsRow4 and AddressStatsRow6 with single class,
          LeaseStatsRow
      
          replaced AddressStatsQuery4 and AddressStatsQuery6 with single class,
          AddressStatsQuery
      
      src/lib/dhcpsrv/memfile_lease_mgr.h
      src/lib/dhcpsrv/memfile_lease_mgr.cc
          Replaced this class heirarchy:
          AddressStatsQuery4 <-- MemfileAddressStatsQuery4
          AddressStatsQuery6 <-- MemfileAddressStatsQuery6
      
          With this one:
          LeaseStatsQuery
              |
              +--- MemfileLeaseStatsQuery
                     |
                     +--- MemfileLeaseStatsQuery4
                     |
                     +--- MemfileLeaseStatsQuery6
      
          Replaced startAddressStatsQuery4() with startLeaseStatsQuery4()
          Replaced startAddressStatsQuery6() with startLeaseStatsQuery6()
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          Renamed:
           checkAddressStats() to checkLeaseStats()
           testAddressLeaseStats4() to testRecountLeaseStats4()
           testAddressLeaseStats6() to testRecountLeaseStats6()
      
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
          Renamed tests to recountLeaseStats4 and recountLeaseStats6
      9a1249f1
    • Thomas Markwalder's avatar
      [4294] Reverted Lease states back to uin32_t per review comments · 86411b64
      Thomas Markwalder authored
      I had replaced the uint32_t constants for lease states with an enum.
      Tomek stated that they should remain uin32_t as they may eventually be bitmasks.
      86411b64
    • Marcin Siodelski's avatar
      [4552] MySQL backend now supports storing siaddr, sname and file. · 8a23588b
      Marcin Siodelski authored
      In addition, added a generic unit test for MySQL and Postgres, which
      tests inertion and retrieval of these values.
      8a23588b
    • Marcin Siodelski's avatar
    • Marcin Siodelski's avatar
  16. 22 Aug, 2016 2 commits
    • Marcin Siodelski's avatar
    • Thomas Markwalder's avatar
      [4279] Addressed review comments · 44c93060
      Thomas Markwalder authored
      src/lib/dhcpsrv/tests/generic_host_data_source_unittest.cc
          GenericHostDataSourceTest::compareClientClasses() - now uses
          std::equal()
      
          GenericHostDataSourceTest::testMultipleClientClasses4()
          GenericHostDataSourceTest::testMultipleClientClasses6() - added
          steps for each of the host getters defined in BaseHostDataSource
      
      src/lib/dhcpsrv/tests/generic_host_data_source_unittest.h
      src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc
      src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc - fixed typo
      44c93060
  17. 18 Aug, 2016 4 commits
  18. 17 Aug, 2016 1 commit
  19. 16 Aug, 2016 3 commits
    • Thomas Markwalder's avatar
      [4294] Memfile now supports IPv6 lease stats recounting · 4a94a1f7
      Thomas Markwalder authored
      src/lib/dhcpsrv/memfile_lease_mgr.h
      src/lib/dhcpsrv/memfile_lease_mgr.cc
          - MemfileAddressStatsQuery6 - new class, Memfile derivation of
          the IPv6 statistical lease data query
          - Memfile_LeaseMgr::startAddressStatsQuery6() - new virtual
          method that creates and runs the IPv6 lease stats query
      
      src/lib/dhcpsrv/memfile_lease_storage.h
          - Added non-unique index on subnet ID to Lease6Storage
      
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
          TEST_F(MemfileLeaseMgrTest, recountAddressStats6) - new test
      4a94a1f7
    • Thomas Markwalder's avatar
      [4294] PostgreSQL now supports IPv6 lease stats recounting · efbf437f
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_lease_mgr.h
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          - Added TaggedStatement RECOUNT_LEASE6_STATS
          - PgSqlAddressStatsQuery6 - new class PgSql derivation of the IPv6
          statistical lease data query
          - PgSqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
          creates and runs the IPv6 lease stats query
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          TEST_F(PgSqlLeaseMgrTest, recountAddressStats6) - new test
      efbf437f
    • Thomas Markwalder's avatar
      [4294] Unit tests and MySql now support IPv6 lease stat recounting · 6f56be5a
      Thomas Markwalder authored
      src/lib/dhcpsrv/cfg_subnets6.cc
          - CfgSubnets6::removeStatistics() - added removal of declined stats
          - CfgSubnets6::updateStatistics() - added call to recountAddressStats6()
      
      src/lib/dhcpsrv/mysql_lease_mgr.h
      src/lib/dhcpsrv/mysql_lease_mgr.cc
          - Added TaggedStatement RECOUNT_LEASE6_STATS
          - MySqlAddressStatsQuery6 - new MySql derivation of AddressStatsQuery6
          - MySqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
          creates and starts a MySqlAddressStatsQuery6
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          - GenericLeaseMgrTest::checkAddressStats4 renamed to checkAddressStats as
          it applies to either v4 or v6
          - GenericLeaseMgrTest::makeLease6() - new method which creates a minimal
          IPv6 lease and adds it to lease storage
          - GenericLeaseMgrTest::testRecountAddressStats6() - new method which
          checks IPv6 lease stats recounting
      
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
          - TEST_F(MySqlLeaseMgrTest, recountAddressStats6) - new test
      6f56be5a
  20. 15 Aug, 2016 2 commits
    • Thomas Markwalder's avatar
      [4294] Added abstract support for IPv6 lease stats recount to LeaseMgr · 61bc7b00
      Thomas Markwalder authored
      src/lib/dhcpsrv/lease_mgr.h
      src/lib/dhcpsrv/lease_mgr.cc
          AddressStatsRow6 - new struct that contains a single row of IPv6 lease
          statistical data
      
          AddressStatsQuery6 - new base class for fulfilling the IPv6 statistical
          lease data query
      
          LeaseMgr::recountAddressStats6() - new method that recalculates per-subnet
          and global stats for IPv6 leases
      
          LeaseMgr::startAddressStatsQuery6() - new virtual method which creates
          then executes the IPv6 lease stats query
      61bc7b00
    • Thomas Markwalder's avatar
      [4294] PostgreSQL now supports IPv4 lease stats recount · 64c23c76
      Thomas Markwalder authored
      src/lib/dhcpsrv/cfg_subnets4.cc
          CfgSubnets4::updateStatistics() - removed lease mgr instance check
      
      src/lib/dhcpsrv/mysql_lease_mgr.cc
          Added "ORDER by subnet_id" to RECOUNT_LEASE4_STATS
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          Added tagged statement RECOUNT_LEASE4_STATS
          PgSqlAddressStatsQuery4 - new class, PostgreSQL derivation of AddressStatsQuery4
          PgSqlLeaseMgr::startAddressStatsQuery4() - PostgreSQL impl of virtual method
      
      src/lib/dhcpsrv/srv_config.cc -
          SrvConfig::updateStatistics() - Added LeaseMgr singleton check around
          calls subnet statistics updates
      
      src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
          CfgMgrTest:
             ~CfgMgrTest() - now destroys LeaseMgr singleton
             startBackend(int family = AF_INET) -  new method to create memfile lease mgr
      
              TEST_F(CfgMgrTest, commitStats4)
              TEST_F(CfgMgrTest, commitStats6)
          - added call to startBackend()
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          TEST_F(PgSqlLeaseMgrTest, recountAddressStats4) - new test
      64c23c76