1. 04 Jul, 2022 1 commit
  2. 01 Jul, 2022 5 commits
  3. 30 Jun, 2022 5 commits
  4. 29 Jun, 2022 24 commits
    • Andrei Pavel's avatar
      [#2445] add ChangeLog entry · 290ae47d
      Andrei Pavel authored
      290ae47d
    • Andrei Pavel's avatar
    • Andrei Pavel's avatar
    • Andrei Pavel's avatar
      [#2445] PostgreSQL lease manager tests · b3932390
      Andrei Pavel authored
      b3932390
    • Andrei Pavel's avatar
    • Andrei Pavel's avatar
      [#2445] tests for PostgreSQL lease counting · 91a644d0
      Andrei Pavel authored
      91a644d0
    • Andrei Pavel's avatar
    • Thomas Markwalder's avatar
      [#2436] Added virtual to getCLassLeaseCount · 2ad672f0
      Thomas Markwalder authored
      modified:   memfile_lease_mgr.h
      2ad672f0
    • Thomas Markwalder's avatar
      [#2436] Added ChangeLog entry · 3390bdc2
      Thomas Markwalder authored
      3390bdc2
    • Thomas Markwalder's avatar
      [#2436] Addressed review comments · 6844d204
      Thomas Markwalder authored
      src/lib/dhcpsrv/memfile_lease_limits.cc
          ClassLeaseCounter::getLeaseClientClasses()
          - improved error handling
      
      src/lib/dhcpsrv/memfile_lease_limits.h
          ClassLeaseCounter::getLeaseClientClasses()
          - changed from const to static
      
      src/lib/dhcpsrv/memfile_lease_mgr.cc
          Memfile_LeaseMgr::checkLimits4() fixed count type
          Memfile_LeaseMgr::checkLimits6() fixed exception
      
      dhcpsrv/memfile_lease_mgr.h
          fixed typos
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          GenericLeaseMgrTest::testLeaseLimits4()
          GenericLeaseMgrTest::testLeaseLimits6()
          - removed unecesary CfgMgr logic
      
      src/lib/dhcpsrv/tests/memfile_lease_limits_unittest.cc
          TEST_F(ClassLeaseCounterTest, adjustClassCountsTest4)
          TEST_F(ClassLeaseCounterTest, adjustClassCountsTest6)
          TEST_F(ClassLeaseCounterTest, getLeaseClientClassesTest)
          - new tests
      
      src/lib/dhcpsrv/memfile_lease_mgr.cc
          Memfile_LeaseMgr::getClassLeaseCount() - added mutex
      
      src/lib/dhcpsrv/memfile_lease_mgr.h
          Added thread-safe comments
      6844d204
    • Thomas Markwalder's avatar
      [#2426] Addressed review comments · 76d921a7
      Thomas Markwalder authored
      src/lib/dhcpsrv/memfile_lease_limits.cc
          ClassLeaseCounter::getLeaseClientClasses()
          - improved error handling
      
      src/lib/dhcpsrv/memfile_lease_limits.h
          ClassLeaseCounter::getLeaseClientClasses()
          - changed from const to static
      
      src/lib/dhcpsrv/memfile_lease_mgr.cc
          Memfile_LeaseMgr::checkLimits4() fixed count type
          Memfile_LeaseMgr::checkLimits6() fixed exception
      
      dhcpsrv/memfile_lease_mgr.h
          fixed typos
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          GenericLeaseMgrTest::testLeaseLimits4()
          GenericLeaseMgrTest::testLeaseLimits6()
          - removed unecesary CfgMgr logic
      
      src/lib/dhcpsrv/tests/memfile_lease_limits_unittest.cc
          TEST_F(ClassLeaseCounterTest, adjustClassCountsTest4)
          TEST_F(ClassLeaseCounterTest, adjustClassCountsTest6)
          TEST_F(ClassLeaseCounterTest, getLeaseClientClassesTest)
          - new tests
      76d921a7
    • Thomas Markwalder's avatar
      [#2436] Implemement Memfile_LeaseMgr:checkLimitsX functions · b7633644
      Thomas Markwalder authored
      src/lib/dhcpsrv/lease_mgr.h
          Make LeaseMgr::getClassLeaseCount() const
      
      src/lib/dhcpsrv/memfile_lease_limits.*
          Add ClassLeaseCounter()::getConstCountMap()
          make  size() const
      
      src/lib/dhcpsrv/memfile_lease_mgr.*
          make Memfile_LeaseMgr::getClassLeaseCount() const
          Memfile_LeaseMgr::checkLimits4()
          Memfile_LeaseMgr::checkLimits6()
          Memfile_LeaseMgr::getSubnetStat()
          Memfile_LeaseMgr::getLeaseLimit() - new functions
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          GenericLeaseMgrTest::testLeaseLimits4()
          GenericLeaseMgrTest::testLeaseLimits6()
          - use CfgMgr to update subent stats
      
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
          Enable checkLimits tests
      b7633644
    • Thomas Markwalder's avatar
      [#2436] More review comments · aea23444
      Thomas Markwalder authored
      Use "client-classes" not "classes" in user-context
      
      src/lib/dhcpsrv/memfile_lease_limits.cc
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
      src/lib/dhcpsrv/tests/memfile_lease_limits_unittest.cc
      aea23444
    • Thomas Markwalder's avatar
      [#2436] Fixed broken generic lease mgr test · 34a229f6
      Thomas Markwalder authored
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          GenericLeaseMgrTest::testLeaseLimits6() - fixed error created
          one I originally split testLeaseLimits()
      
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
         split TEST_F(MySqlLeaseMgrTest, checkLimits) into v4 and v6 tests
      34a229f6
    • Thomas Markwalder's avatar
      [#2436] Rebased and added generic tests · 7ef4a5f7
      Thomas Markwalder authored
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.*
          Split GenericLeaseMgrTest::testLeaseLimits() into:
              GenericLeaseMgrTest::testLeaseLimits4()
              GenericLeaseMgrTest::testLeaseLimits6()
      
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
          TEST_F(MemfileLeaseMgrTest, isJsonSupported4)
          TEST_F(MemfileLeaseMgrTest, isJsonSupported6)
          TEST_F(MemfileLeaseMgrTest, DISABLED_checkLimitsNull4)
          TEST_F(MemfileLeaseMgrTest, DISABLED_checkLimitsNull6)
          TEST_F(MemfileLeaseMgrTest, DISABLED_checkLimits4)
          TEST_F(MemfileLeaseMgrTest, DISABLED_checkLimits6) - new tests
      
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
          TEST_F(MySqlLeaseMgrTest, DISABLED_classLeaseCount4)
          TEST_F(MySqlLeaseMgrTest, DISABLED_classLeaseCount6_NA)
          TEST_F(MySqlLeaseMgrTest, DISABLED_classLeaseCount6_PD) - new tests
      7ef4a5f7
    • Thomas Markwalder's avatar
      [#2436] More review comments pre-rebase · 745634df
      Thomas Markwalder authored
      src/lib/dhcpsrv/memfile_lease_limits.h
          Commentary fixes
      
      rc/lib/dhcpsrv/memfile_lease_mgr.cc
          Memfile_LeaseMgr::updateLease4Internal()
          Memfile_LeaseMgr::updateLease6Internal() - adjust counts
          after replacing the lease in store
      
          Memfile_LeaseMgr::recountClassLeases4()
          Memfile_LeaseMgr::recountClassLeases6() - remove use of index
      
      src/lib/dhcpsrv/tests/memfile_lease_limits_unittest.cc
          Fix wrong lease states.
      745634df
    • Thomas Markwalder's avatar
      [#2436] Addressed most review comments prior to rebase · 50d66891
      Thomas Markwalder authored
      src/lib/dhcpsrv/memfile_lease_limits.cc
          ClassLeaseCounter::getLeaseClientClasses() - looks for classes in "ISC"
      
      src/lib/dhcpsrv/memfile_lease_limits.h
          ClassCountMap& getCountMap() - reordered return logic
      
      src/lib/dhcpsrv/memfile_lease_mgr.h
          override and virtual use correction
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.*
          GenericLeaseMgrTest::makeContextWithClasses() - embed in "ISC" element
      
      src/lib/dhcpsrv/tests/memfile_lease_limits_unittest.cc
          makeContextWithClasses() - embed in "ISC" element
      
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
          add using namespace data
      50d66891
    • Andrei Pavel's avatar
      Apply 3 suggestion(s) to 2 file(s) · b58f5c86
      Andrei Pavel authored and Thomas Markwalder's avatar Thomas Markwalder committed
      b58f5c86
    • Andrei Pavel's avatar
      Apply 1 suggestion(s) to 1 file(s) · 7d9a805d
      Andrei Pavel authored and Thomas Markwalder's avatar Thomas Markwalder committed
      7d9a805d
    • Thomas Markwalder's avatar
      [#2436] Removed unecessary added include · 60a74236
      Thomas Markwalder authored
      modified:   memfile_lease_mgr_unittest.cc
      60a74236
    • Thomas Markwalder's avatar
      [#2436] Make class lease count tests generic · 9280ac65
      Thomas Markwalder authored
      Moved tests from memfile_lease_mgr_unittests.* to
      generic_lease_mgr_unitest.*
      9280ac65
    • Thomas Markwalder's avatar
    • Thomas Markwalder's avatar
      [#2436] Memfile_LeaseMgr now counts class leases · 8c59d522
      Thomas Markwalder authored
      src/lib/dhcpsrv/lease_mgr.*
          LeaseMgr - added virtual methods:
          ::recountClassLeases4()
          ::recountClassLeases6()
          ::getClassLeaseCount()
      
      src/lib/dhcpsrv/memfile_lease_mgr.*
          Memfile_LeaseMgr
          ::addLeaseInternal()
          ::updateLeaseXInternal()
          ::deleteLeaseInternal(const Lease4Ptr& lease) {
          - added calls to add/remove leases from count map
      
          ::recountClassLeases4()
          ::recountClassLeases6()
          ::getClassLeaseCount()
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
          Added boolean flag to makeLease4 and makeLease6
      
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
          New tests:
          TEST_F(MemfileLeaseMgrTest, classLeaseCount4)
          TEST_F(MemfileLeaseMgrTest, classLeaseCount6_NA)
          TEST_F(MemfileLeaseMgrTest, classLeaseCount6_PD)
          TEST_F(MemfileLeaseMgrTest, classLeaseRecount4)
          TEST_F(MemfileLeaseMgrTest, classLeaseRecount6)
      8c59d522
    • Thomas Markwalder's avatar
      [#2436] Added ClassLeaseCounter container · 31083943
      Thomas Markwalder authored
      Implemented dhcp::ClassLeaseCounter, a container for
      managing lease counts per class
      
      src/lib/dhcpsrv/memfile_lease_limits.h
      src/lib/dhcpsrv/memfile_lease_limits.cc
          New files that support class lease counting
      
      src/lib/dhcpsrv/Makefile.am
          added memfile_lease_limits.cc, memfile_lease_limits.h
      
      src/lib/dhcpsrv/lease.h
          added Lease::getType() because I am sick of it not existing
      
      src/lib/dhcpsrv/memfile_lease_limits_unittest.cc
          New file
      
      src/lib/dhcpsrv/tests/Makefile.am
          added memfile_lease_limits_unittest.cc
      31083943
  5. 28 Jun, 2022 1 commit
  6. 27 Jun, 2022 4 commits