1. 21 Apr, 2017 1 commit
    • Thomas Markwalder's avatar
      [5247] Corrected issues with assigned-<lease/nas/pd> stats · fe3766ae
      Thomas Markwalder authored
      doc/guide/dhcp4-srv.xml
      doc/guide/dhcp6-srv.xml
          Added entries for reclaimed-leases
      
      src/lib/dhcpsrv/alloc_engine.cc
      
          AllocEngine::reuseExpiredLease(Lease6Ptr&...) - increment
          assigned-<nas/pds> for real allocations
      
          AllocEngine::extendLease6() - increment assigned-<nas/pds>
          for real allocations if the lease expired
      
          AllocEngine::renewLease4(const Lease4Ptr&...)
          - set lease state to STATE_DEFAULT for real allocations
          - increment assigned-leases if lease is expired or reclaimed
            for real allocations
      
          AllocEngine::reuseExpiredLease4(Lease4Ptr&...)
          - increment assigned-leases for real allocations
      
      src/lib/dhcpsrv/cfg_subnets4.cc
          CfgSubnets4::removeStatistics() - added "reclaimed-leases"
      
      src/lib/dhcpsrv/cfg_subnets6.cc
          CfgSubnets4::removeStatistics() - added "reclaimed-leases"
      
      src/lib/dhcpsrv/lease_mgr.cc
          LeaseMgr::recountLeaseStats4()
          LeaseMgr::recountLeaseStats6()
          - added handling of "reclaimed-leases"
          - fixed name of "reclaimed-declined-addresses"
      
      src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
          TEST_F(AllocEngine4Test, simpleRenew4)  - new test to verify stats
          on a normal renew, non-expired
          Added EXPECT_TRUE around calls to testStatistics for invocation line numbers
          Added stat checks to several tests
      
      src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
          Added EXPECT_TRUE around calls to testStatistics for invocation line numbers
          Added stat checks to several tests
      
      src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc
          Added checks of assigned stats
      
      src/lib/dhcpsrv/tests/alloc_engine_utils.cc
          AllocEngine6Test::initSubnet() - removed artificial stat values
      
          NakedAllocEngine::addHost() - new method to add a host to the
          current configuration, rather than use staging/commit as the latter
      fe3766ae
  2. 12 Oct, 2016 1 commit
  3. 24 Aug, 2016 1 commit
  4. 12 Aug, 2016 1 commit
    • Thomas Markwalder's avatar
      [4294] Memfile and MySql now support recalulating IPv4 lease statistics · a8f85f25
      Thomas Markwalder authored
      src/lib/dhcpsrv/cfg_subnets4.cc
          CfgSubnets4::removeStatistics()
          - added removal of all lease statistics per subnet, and global declined address
          stats
      
          CfgSubnets4::updateStatistics()
          - added call to LeaseMgr::recountAddressStats4
      
      src/lib/dhcpsrv/lease.cc
      src/lib/dhcpsrv/lease.h
          Replaces lease state constants with LeaseState enumeration.
      
      src/lib/dhcpsrv/lease_mgr.cc
      src/lib/dhcpsrv/lease_mgr.h
          struct AddressStatsRow4 - contains the content of one row of the IPv4
          lease statistical data result set
      
          class AddressStatsQuery4 - base class for constructing the IPv4
          lease statistical data result set for an IPv4 lease storage
      
          LeaseMgr::recountAddressStats4() -  new method which recalculates
          per-subnet and global stats for IPv4 leases
      
          LeaseMgr::startAddressStatsQuery4() - new virtual method that fetches
          the IPv4 lease statistical data result set
      
      src/lib/dhcpsrv/lease_mgr_factory.h
      src/lib/dhcpsrv/lease_mgr_factory.cc
          LeaseMgrFactory::haveInstance() - new static method which indicates
          whether or not the lease manager singleton exists
      
      src/lib/dhcpsrv/memfile_lease_mgr.h
      src/lib/dhcpsrv/memfile_lease_mgr.cc
          MemfileAddressStatsQuery4 - Derivation of AddressStatsQuery4, it constructs
          the IPv4 lease statistical data by iterating over IPv4 lease storage
      
          Memfile_LeaseMgr::startAddressStatsQuery4() - new virtual method which
          creates, starts, and returns a MemfileAddressStatsQuery4
      
      src/lib/dhcpsrv/memfile_lease_storage.h
          Added an a per subnet_ID index to IPv4 storage
      
      src/lib/dhcpsrv/mysql_lease_mgr.h
      src/lib/dhcpsrv/mysql_lease_mgr.cc
          - Added RECOUNT_LEASE4_STATS query
      
          MySqlAddressStatsQuery4 Derivation of AddressStatsQuery4, it constructs
          the IPv4 lease statistical data by executing RECOUNT_LEASE4_STATS
      
          MySqlLeaseMgr::startAddressStatsQuery4() - new virtual method which
          creates, starts, and returns a MySqlAddressStatsQuery4
      
      src/lib/dhcpsrv/tests/alloc_engine_utils.cc
          AllocEngine6Test::AllocEngine6Test()
          AllocEngine4Test::AllocEngine4Test()
          - moved lease mgr create up above configuration commit
      
      src/lib/dhcpsrv/tests/cfg_db_access_unittest.cc
           ~CfgMySQLDbAccessTest() - added destruction of lease manager singleton,
          otherwise subsequent tests can fail
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          GenericLeaseMgrTest::checkStat() - new method for comparing a stat
          GenericLeaseMgrTest::checkAddressStats4() - new method for comparing a list
          of stats
          GenericLeaseMgrTest::makeLease4() - new method for making a minimal lease
          GenericLeaseMgrTest::testRecountAddressStats4() - new method which tests
          a lease manager's ability to recalculate the IPv4 lease statistics
      
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
          TEST_F(MemfileLeaseMgrTest, recountAddressStats4) - new test which tests
          Memfile_LeaseMgr's ability to recalculate IPv4 lease statistics
      
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
          TEST_F(MySqlLeaseMgrTest, recountAddressStats4) - new test which tests
          MySqlLeaseMgr's ability to recalculate IPv4 lease statistics
      a8f85f25
  5. 06 Jun, 2016 4 commits
  6. 04 Jun, 2016 1 commit
  7. 27 Apr, 2016 1 commit
  8. 13 Apr, 2016 1 commit
  9. 16 Dec, 2015 1 commit
  10. 03 Dec, 2015 1 commit
  11. 02 Oct, 2015 1 commit
  12. 01 Oct, 2015 2 commits
  13. 22 Sep, 2015 1 commit
  14. 30 Jul, 2015 1 commit
  15. 26 Jun, 2015 1 commit
  16. 19 Jun, 2015 1 commit
    • Shawn Routhier's avatar
      [3799] Updates per review comments · 7f5186e3
      Shawn Routhier authored
      Change the -NAs and -PDs strings to -nas and -pds to be in line with
      the rest of the statistic names
      
      Remove @todo from CfgSubnet6::updateStatistics and CfgSubnet6::removeStatistics
      7f5186e3
  17. 18 Jun, 2015 1 commit
    • Shawn Routhier's avatar
      [3799] Add more tests · f4963266
      Shawn Routhier authored
      Update the documents a bit
      
      Fix up handling reservations from outside the subnet
      
      Add more tests
      f4963266
  18. 12 Jun, 2015 1 commit
  19. 11 May, 2015 1 commit
  20. 18 Mar, 2015 1 commit
    • Thomas Markwalder's avatar
      [3689] Addressed primary review comments · 3e09b745
      Thomas Markwalder authored
      doc/guide/dhcp6-srv.xml
          Updated "Reserving a hostname" section
          (also removed trailing spaces)
      
      src/bin/dhcp6/dhcp6_srv.cc
         corrected test and commentary typo in assignIA_NA
         removed second parameter to renewLeases6() calls
      
      src/bin/dhcp6/dhcp6_srv.h
          updated commentary for createContext()
      
      src/lib/dhcpsrv/alloc_engine.cc
      src/lib/dhcpsrv/alloc_engine.h
          AllocEngine::createLease6()
              removed find_host parameter and logic which calls
              findReservation and/or alters context hostname
      
      src/lib/dhcpsrv/tests/alloc_engine_utils.cc
          AllocEngine6Test::renewTest() - added call to
          AllocEngine6Test::findReservation()
      
      src/lib/dhcpsrv/tests/alloc_engine_utils.h
          fixed typo
      3e09b745
  21. 17 Mar, 2015 1 commit
    • Thomas Markwalder's avatar
      [3689] Removed call to findReservation from AllocateEngine::allocateLeases6() · 5493c969
      Thomas Markwalder authored
      src/lib/dhcpsrv/alloc_engine.h
      src/lib/dhcpsrv/alloc_engine.cc
          allocateLeases6()
              - removed find_reservation parameter from allocateLeases6
              - removed logic that called findReservation(), this eliminates
              inadvertanly stomping an already populated host in the context.
              Places burden of doing the reservation lookup always on the caller.
      
      src/bin/dhcp6/dhcp6_srv.cc
          removed obsolete boolean parameter from allocateLeases6 calls
      
      src/lib/dhcpsrv/tests/alloc_engine_utils.h
      src/lib/dhcpsrv/tests/alloc_engine_utils.cc
         AllocEngine6Test::findReservation() - new method which calls
         engine's findReservation() and fills in context hostname accordingly.
      
      src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
          added calls to AlloceEnginetTest::findReservation where needed
      5493c969
  22. 12 Feb, 2015 1 commit
  23. 09 Feb, 2015 2 commits