2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 21:18:02 +00:00

34334 Commits

Author SHA1 Message Date
Andrei Pavel
d84c81b799
[#2379] add tools/check-for-missing-api-commands.sh 2022-07-01 18:23:41 +03:00
Razvan Becheriu
8c3710d605 [#2447] added ChangeLog 2022-07-01 15:37:54 +03:00
Razvan Becheriu
ef6b154ee1 [#2447] fixed documentation 2022-06-30 17:37:53 +03:00
Andrei Pavel
9b2442c2ea
[#2445] add the proper data types to function arguments in dhcpdb_drop.pgsql 2022-06-30 15:31:05 +03:00
Andrei Pavel
e605a6dcfc
[#2445] change lease_type to smallint in PostgreSQL trigger functions 2022-06-30 15:31:05 +03:00
Andrei Pavel
ad5cc13b6c
[#2445] trim double quotes from classes in PostgreSQL update triggers 2022-06-30 15:31:05 +03:00
Andrei Pavel
6ca773c9ae
[#2445] add getClassLeaseCount() for MySQL and PostgreSQL 2022-06-30 15:31:05 +03:00
Andrei Pavel
290ae47d6c
[#2445] add ChangeLog entry 2022-06-29 15:52:20 +03:00
Andrei Pavel
839fe6e008
[#2445] use PgSqlExchange::getColumnValue() to fetch limits 2022-06-29 15:51:28 +03:00
Andrei Pavel
e844a8b7c6
[#2445] fix PgSqlLeaseMgr::isJsonSupported() from always returning true 2022-06-29 15:51:28 +03:00
Andrei Pavel
b393239079
[#2445] PostgreSQL lease manager tests 2022-06-29 15:51:28 +03:00
Andrei Pavel
f5419843a1
[#2445] implement PostgreSQL lease manager methods for limit checking 2022-06-29 15:51:27 +03:00
Andrei Pavel
91a644d032
[#2445] tests for PostgreSQL lease counting 2022-06-29 15:51:27 +03:00
Andrei Pavel
acafdf8dfe
[#2445] PostgreSQL schema changes in support of lease limiting 2022-06-29 15:51:27 +03:00
Thomas Markwalder
2ad672f029 [#2436] Added virtual to getCLassLeaseCount
modified:   memfile_lease_mgr.h
2022-06-29 08:21:56 -04:00
Thomas Markwalder
3390bdc2a9 [#2436] Added ChangeLog entry 2022-06-29 08:17:03 -04:00
Thomas Markwalder
6844d20430 [#2436] Addressed review comments
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
2022-06-29 07:07:48 -04:00
Thomas Markwalder
76d921a73d [#2426] Addressed review comments
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
2022-06-29 07:07:48 -04:00
Thomas Markwalder
b7633644c8 [#2436] Implemement Memfile_LeaseMgr:checkLimitsX functions
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
2022-06-29 07:07:48 -04:00
Thomas Markwalder
aea23444dc [#2436] More review comments
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
2022-06-29 07:07:48 -04:00
Thomas Markwalder
34a229f6e8 [#2436] Fixed broken generic lease mgr test
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
2022-06-29 07:07:48 -04:00
Thomas Markwalder
7ef4a5f7c0 [#2436] Rebased and added generic tests
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
2022-06-29 07:07:48 -04:00
Thomas Markwalder
745634dfe5 [#2436] More review comments pre-rebase
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.
2022-06-29 07:07:48 -04:00
Thomas Markwalder
50d66891ff [#2436] Addressed most review comments prior to rebase
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
2022-06-29 07:07:48 -04:00
Andrei Pavel
b58f5c860e Apply 3 suggestion(s) to 2 file(s) 2022-06-29 07:07:48 -04:00
Andrei Pavel
7d9a805d20 Apply 1 suggestion(s) to 1 file(s) 2022-06-29 07:07:48 -04:00
Thomas Markwalder
60a7423699 [#2436] Removed unecessary added include
modified:   memfile_lease_mgr_unittest.cc
2022-06-29 07:07:48 -04:00
Thomas Markwalder
9280ac6537 [#2436] Make class lease count tests generic
Moved tests from memfile_lease_mgr_unittests.* to
generic_lease_mgr_unitest.*
2022-06-29 07:07:47 -04:00
Thomas Markwalder
ad9713ce63 [#2436] Remove class lease recount definitions from LeaseMgr 2022-06-29 07:07:47 -04:00
Thomas Markwalder
8c59d52279 [#2436] Memfile_LeaseMgr now counts class leases
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)
2022-06-29 07:07:47 -04:00
Thomas Markwalder
3108394353 [#2436] Added ClassLeaseCounter container
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
2022-06-29 07:07:47 -04:00
Marcin Godzina
7b1a72cbcb Update configure.ac 2022-06-28 14:22:07 +00:00
Marcin Godzina
f6414d1011 Update platforms.rst Kea-2.1.7 2022-06-27 17:02:30 +00:00
Marcin Godzina
3fb2b31c52 Update platforms.rst 2022-06-27 16:55:13 +00:00
Marcin Godzina
1df6dbdb15 Update platforms.rst 2022-06-27 16:51:17 +00:00
Marcin Godzina
d9ee88c1e6 spell check, sphnx config change for RHEL9 2022-06-27 18:21:06 +02:00
Marcin Godzina
bd7e9d6ef3 Spell check 2022-06-27 18:19:18 +02:00
Marcin Godzina
a760281c9c [#2463] release changes 2022-06-27 18:08:34 +02:00
Andrei Pavel
3df8772094
[#2457] fill vector with zeros in SecBuf without referencing potentially unallocated first element 2022-06-27 17:53:43 +03:00
Wlodek Wencel
3b1011c1c2 [#2458] added missing package for pdf documentation in ubuntu 22 2022-06-27 13:34:41 +02:00
Razvan Becheriu
1057616f5a [#2455] bump lib versions for 2.1.7 2022-06-27 10:46:51 +00:00
Razvan Becheriu
3e59e3e9e5 [#2266] updated doxygen 2022-06-25 12:21:05 +03:00
Razvan Becheriu
f64d765885 [#2266] fixed indentation 2022-06-25 11:37:19 +03:00
Razvan Becheriu
6868955dbd [#2266] addressed comments 2022-06-24 18:15:37 +00:00
Razvan Becheriu
06b640cef1 [#2266] addressed review comments 2022-06-24 18:15:37 +00:00
Razvan Becheriu
21171fcae9 [#2266] added unittests for mergeDiffAdd and mergeDiffDel 2022-06-24 18:15:37 +00:00
Razvan Becheriu
04eea382b7 [#2266] addressed review comments 2022-06-24 18:15:37 +00:00
Razvan Becheriu
bcd7c48a62 [#2266] addressed review comments 2022-06-24 18:15:37 +00:00
Razvan Becheriu
74ee158d36 [#2266] addressed review comments 2022-06-24 18:15:37 +00:00
Razvan Becheriu
37a5823aac [#2266] updated documentation 2022-06-24 18:15:37 +00:00