2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 04:57:52 +00:00

28742 Commits

Author SHA1 Message Date
Francis Dupont
970e625618 [#3683] Added registered lease state 2025-02-21 18:23:22 +01:00
Francis Dupont
a1645331df [#3683] Added addr-reg-enable 2025-02-21 18:23:21 +01:00
Andrei Pavel
8e0783550a
[#3730] Add other meson targets
- add-changelog-entry
- coverage (.lcovrc)
- cppcheck, cppcheck-report
- doc (renamed from docs)
- grammar
- mes-doc
- uml
- update-python-dependencies
- valgrind (add_test_setup instead of custom target)
2025-02-21 18:43:18 +02:00
Andrei Pavel
ac5c781575
[#3730] Replace HAS_KEA_MSG_COMPILER with KEA_MSG_COMPILER.found() 2025-02-21 18:43:17 +02:00
Francis Dupont
78d022805e
[#3730] Fixed message file headers 2025-02-21 18:43:17 +02:00
Andrei Pavel
5c4150041d
[#3730] Update copyright dates 2025-02-21 18:43:17 +02:00
Francis Dupont
9136d0ee7e
[#3730] Moved .libs to @dotlibs@ 2025-02-21 18:43:12 +02:00
Francis Dupont
e46ce7668d
[#3730] Added generate parser 2025-02-21 18:43:12 +02:00
Francis Dupont
60b424b8d1
[#3730] Added generate messages 2025-02-21 18:43:12 +02:00
Francis Dupont
411249c0fd
[#3730] Shell tests, src/bin, doc 2025-02-21 18:42:49 +02:00
Thomas Markwalder
2e3a01edb5 [#3463] Addressed review comments
/src/hooks/dhcp/lease_cmds/lease_cmds.cc
    Add null lease checks

/src/lib/dhcpsrv/lease.cc
    Lease4::decline() - wipe user context

/src/lib/dhcpsrv/tests/lease_unittest.cc
    TEST_F(Lease4Test, decline) - verify user context
    is wiped
2025-02-19 10:12:34 -05:00
Francis Dupont
bd1877ce1f [#3463] Spelling 2025-02-19 11:27:18 +01:00
Francis Dupont
efc6d54bef [#3463] Spelling 2025-02-19 11:24:46 +01:00
Francis Dupont
9d15c36960 [#3463] Updated meson.build files 2025-02-19 11:20:01 +01:00
Thomas Markwalder
ea27531e9d [#3463] Fixed JSON error in ARM 2025-02-18 14:24:17 -05:00
Thomas Markwalder
68484ade70 [#3463] Addressed most of review comments 2025-02-18 18:54:19 +00:00
Thomas Markwalder
8d0f50720a [#3463] V6 UTs working
Finished V6 UTs. Also re-organized tests so those
that rely on loading the library are now in libloadtests:
    tests/lease_cmds4_unittest.cc -> libloadtests/lease_cmds4_unittest.cc
    tests/lease_cmds6_unittest.cc -> libloadtests/lease_cmds6_unittest.cc
    tests/lease_cmds_unittest.cc -> libloadtests/lease_cmds_unittest.cc
    tests/lease_cmds_unittest.h -> libloadtests/lease_cmds_unittest.h

Create new files to house new callout handler tests which rely on
the library being linked in so functions are visible:

new file:   tests/lease_cmds_func4_unittest.cc
new file:   tests/lease_cmds_func6_unittest.cc
new file:   tests/lease_cmds_func_unittest.h

/src/hooks/dhcp/lease_cmds/lease_cmds.cc
    LeaseCmdsImpl::leases6Committed() - track but don't
    throw on leases that fail so all leases are attempted

/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
    Tweaked and reordered

/src/hooks/dhcp/lease_cmds/libloadtests/Makefile.am
    Added lease_cmds_unittest* here since they rely on
    loading the library

/src/hooks/dhcp/lease_cmds/libloadtests/lease_cmds4_unittest.cc
/src/hooks/dhcp/lease_cmds/libloadtests/lease_cmds6_unittest.cc
    removed new code relating to callout handler tests as they
    use lib functions directly

/src/hooks/dhcp/lease_cmds/tests/Makefile.am
    Removed lease_cmds*_unittest.* (now in libloadatests)
    Added lease_cmds_func*_unittest.*

/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
    Moved BindingVariableHandlerTest code into
    lease_cmds_func*_unittest.*
2025-02-18 18:54:19 +00:00
Thomas Markwalder
556de90ac0 [#3463] Added v6 implementation
/src/bin/dhcp6/dhcp6_srv.cc
    Dhcpv6Srv::processLocalizedQuery6() - add response6 to leases6_committed
    callout arguments

/src/bin/dhcp6/tests/hooks_unittest.cc
    Update tests to expect with response6

/src/hooks/dhcp/lease_cmds/lease_cmds.*
    Add leases6Committed() handler

/src/hooks/dhcp/lease_cmds/lease_cmds_callouts.cc
    Add leases6_committed()callout

/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
    LEASE_CMDS_LEASES6_COMMITTED_FAILED - new message

/src/hooks/dhcp/lease_cmds/tests/lease_cmds6_unittest.cc
    TEST_F(Lease6CmdsTest, validLeases6Committed)
    TEST_F(Lease6CmdsTest, validLeases6CommittedMultiThreading)
    TEST_F(Lease6CmdsTest, nopLeases6Committed)
    TEST_F(Lease6CmdsTest, nopLeases6CommittedMultiThreading)
    - new tests
2025-02-18 18:54:19 +00:00
Thomas Markwalder
00dcacbc23 [#3463] Add response4 to V4 callout arguments
/src/bin/dhcp4/dhcp4_srv.cc
    Dhcpv4Srv::processLocalizedQuery4(AllocEngine::ClientContext4Ptr& ctx,
    - Added response4 argument to lease4_offer and leases4_committed callout_handles.

/src/bin/dhcp4/tests/hooks_unittest.cc
    Updated tests

/src/hooks/dhcp/lease_cmds/lease_cmds.*
    lease4_offer() handling

/src/hooks/dhcp/lease_cmds/lease_cmds_callouts.cc
    added lease4_offer callout

/src/hooks/dhcp/lease_cmds/libloadtests/load_unload_unittests.cc
    TEST_F(LeaseCmdsCbLibLoadTest, verifyCallouts4)
    TEST_F(LeaseCmdsCbLibLoadTest, verifyCallouts6) - new tests

/src/hooks/dhcp/lease_cmds/tests/lease_cmds4_unittest.cc
    TEST_F(Lease4CmdsTest, validLease4Offer)
    TEST_F(Lease4CmdsTest, validLease4OfferMultiThreading)
    TEST_F(Lease4CmdsTest, nopLeases4Committed)
    TEST_F(Lease4CmdsTest, nopLeases4CommittedMultiThreading)
    - new tests
2025-02-18 18:54:19 +00:00
Thomas Markwalder
8bd26523b5 [#3463] Implementd leases4_committed callout
/src/hooks/dhcp/lease_cmds/binding_variables.cc
    BindingVariableMgr::evaluateVariables()
    - Add a throw if query,response, or lease are empty

/src/hooks/dhcp/lease_cmds/lease_cmds.*
    LeaseCmdsImpl::leases4Committed()
    LeaseCmds::leases4Committed()
    - implemented callout handler

/src/hooks/dhcp/lease_cmds/lease_cmds_callouts.cc
    leases4_committed(CalloutHandle& handle) - new callout

/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
    LEASE_CMDS_LEASES4_COMMITTED_NOTHING_TO_UPDATE
    LEASE_CMDS_LEASES4_COMMITTED_FAILED processing - new messages

/src/hooks/dhcp/lease_cmds/tests/lease_cmds4_unittest.cc
    void Lease4CmdsTest::testValidLeases4Committed()
    TEST_F(Lease4CmdsTest, validLeases4Committed)
    TEST_F(Lease4CmdsTest, validLeases4CommittedMultiThreading)
    - new tests
2025-02-18 18:54:19 +00:00
Thomas Markwalder
d1c3136fd7 [#3463] Add evaluateVariables UTs
/src/hooks/dhcp/lease_cmds/binding_variables.cc
    BindingVariableMgr::evaluateVariables() - store empty
    evaluated variable values

/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
    TEST(BindingVariableMgrTest, evaluateVariables4)  - new test
    TEST(BindingVariableMgrTest, evaluateVariables6)  - new test

src/lib/dhcpsrv/lease.cc
    fixed spacing
2025-02-18 18:54:19 +00:00
Thomas Markwalder
89f08dd667 [#3463] Add BindingVariableMgr::evaluateVariables
/src/hooks/dhcp/lease_cmds/binding_variables.*
    BindingVariableMgr::evaluateVariables() - initial implementation

/src/lib/dhcpsrv/alloc_engine.cc
    AllocEngine::updateLease4ExtendedInfo()
    AllocEngine::updateLease6ExtendedInfo()
    - use Lease::updateUserContextISC()

/src/lib/dhcpsrv/lease.*
    bool Lease::updateUserContextISC() - new function that
    adds/updates an element in the "ISC" map in the lease's
    user-context.
2025-02-18 18:54:19 +00:00
Thomas Markwalder
6a577ee173 [#3463] Added BindingVariableMgr
Library can now be configured with binding variables.

/src/hooks/dhcp/lease_cmds/binding_variables.*
    Adding BindingVariableMgr class

/src/hooks/dhcp/lease_cmds/lease_cmds_callouts.cc
    Adding manager singleton, created and configured
    in load()

/src/hooks/dhcp/lease_cmds/libloadtests/load_unload_unittests.cc
    Added valid configuration to load tests

/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
    TEST(BindingVariableMgrTest, validConfigure)
    TEST(BindingVariableMgrTest, clearOnConfigure)
    TEST(BindingVariableMgrTest, invalidConfigure) - new tests

/src/lib/dhcpsrv/testutils/lib_load_test_fixture.h
    Added check of load/unload lib functions to catch
    config errors.
2025-02-18 18:54:19 +00:00
Thomas Markwalder
d3bcdef315 [#3463] Added parsing to BindingVariable
/src/hooks/dhcp/lease_cmds/binding_variables.*
    BindingVariable::parse() - added simple parsing
    function

/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
    TEST(BindingVariableTest, validParsing)
    TEST(BindingVariableTest, invalidParsing) - new tests
2025-02-18 18:54:19 +00:00
Thomas Markwalder
dba841c12d [#3463] Added getter UTs and dup behavior
modified:   src/hooks/dhcp/lease_cmds/binding_variables.cc
modified:   src/hooks/dhcp/lease_cmds/binding_variables.h
modified:   src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
2025-02-18 18:54:19 +00:00
Thomas Markwalder
24de4fa534 [#3463] Added BindingVariable classes to lease cmds
/src/hooks/dhcp/lease_cmds/Makefile.am
    added new files

/src/hooks/dhcp/lease_cmds/binding_variables.cc
/src/hooks/dhcp/lease_cmds/binding_variables.h
     new files

/src/hooks/dhcp/lease_cmds/tests/Makefile.am
    added new file

/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
    new file
2025-02-18 18:54:19 +00:00
Thomas Markwalder
16306026e3 [#3712] Addressed review comments
Couple of typos fixed.
2025-02-18 15:04:04 +00:00
Thomas Markwalder
0b98eae16d [#3712] Avoid assert on empty packet
/src/lib/dhcp/pkt_filter_lpf.cc
    PktFilterLPF::receive() - throw if packet has no data

/src/lib/util/buffer.h
    InputBuffer::readVecotr() - avoid peek if read request length is 0

/src/lib/util/tests/buffer_unittest.cc
    Updated test
2025-02-18 15:04:04 +00:00
Andrei Pavel
bf3d5aa37b
[#3729] Add netconf 2025-02-17 15:35:21 +02:00
Andrei Pavel
694a04fbcb
[#3729] Fix yang 2025-02-17 15:34:52 +02:00
Francis Dupont
e41685233c
[#3729] Added share/yang stuff 2025-02-17 15:34:49 +02:00
Francis Dupont
9603f53fd8
[#3729] Fixed Botan build 2025-02-17 15:34:49 +02:00
Francis Dupont
5d6cd0568e
[#3729] Began perfdhcp UTs 2025-02-17 15:34:48 +02:00
Francis Dupont
5198ace9ab
[#3729] Finished agent tests 2025-02-17 15:34:48 +02:00
Francis Dupont
16f7a98e89
[#3729] Chmod 2025-02-17 15:34:48 +02:00
Francis Dupont
b84c3715b0
[#3729] Added dhcp6 tests 2025-02-17 15:34:48 +02:00
Andrei Pavel
1068312e91
[#3729] Add the rest of the meson.build files 2025-02-17 15:34:48 +02:00
Francis Dupont
1e1effef2f
[#3729] Added libyang UTs 2025-02-17 15:34:48 +02:00
Andrei Pavel
0ffc8ad918
[#3729] Add fuzz meson files, fix gss and user_chk 2025-02-13 10:06:32 +02:00
Francis Dupont
dd9e48cacc
[#3729] Finished variable cleanup 2025-02-13 10:06:31 +02:00
Francis Dupont
aedd0ecf58
[#3729] Checkpoint: put local vars in lower 2025-02-13 10:06:31 +02:00
Francis Dupont
6292132346
[#3729] Moved boost and threads to project deps 2025-02-13 10:06:31 +02:00
Andrei Pavel
212af6b8c8
[#3729] Add gtest dependency to all testutils 2025-02-13 10:06:31 +02:00
Andrei Pavel
763d68308d
[#3729] Always check ENVIRON_SHLIB_FLAGS 2025-02-13 10:06:00 +02:00
Francis Dupont
d52df047b8
[#3729] Checking schema upgrade list lengths 2025-02-13 10:05:43 +02:00
Francis Dupont
b295b51f98
[#3729] Finished dhcp4 UTs 2025-02-13 10:05:43 +02:00
Francis Dupont
c3fb6a71e0
[#3729] Checkpoint: almost finished dhcp4 UTs 2025-02-13 10:05:43 +02:00
Francis Dupont
5a9488dc27
[#3729] Checkpoint: doing dhcp4 tests 2025-02-13 10:05:42 +02:00
Francis Dupont
2db392c8fb
[#3729] Removed static_library with_links 2025-02-13 10:05:42 +02:00
Francis Dupont
f2482260ec
[#3729] Checkpoint: lfc UTs 2025-02-13 10:05:42 +02:00