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

380 Commits

Author SHA1 Message Date
Piotrek Zadroga
366d886f5a [#3141] provide RFC in comments 2024-02-23 17:14:06 +01:00
Andrei Pavel
11de31d8ba
[#3198] make data a key for option-data in code
- Add ability to set list element that only has keys in Translator::setItem.
- Explicitly set list elements in case they contain only keys which can
  be more common now that data is a key since it is likely one can have
  entries that only have code, space, and data.
- Handle no data as empty data when setting, and empty data as no data
  when getting. This avoids the need to add an empty "data" element to
  all options that lack it in all-options.json so that the unit tests
  pass. But this goes to show that data-less entries may be encountered
  in production as well, so more importantly this caters to that
  scenario.
- Adjust data in kea4/all-options.json to not contain singlequotes.
  There was only one occurrence of it. This is a limitation related
  to unit testing only. Opened issue 3216 about it.
- Add missing tests that are not strictly related to the data key, but
  they are related to option data:
  - TranslatorOptionDataListTestv6.getEmpty
  - TranslatorOptionDataListTestv4.get
  - TranslatorOptionDataListTestv6.setEmpty
  - TranslatorOptionDataListTestv4.set
- Add unit tests:
  - TranslatorOptionDataListTestv4.optionsSameCodeAndSpace
  - TranslatorOptionDataListTestv6.optionsSameCodeAndSpace
- Add snippet that tests setting of list element with keys only in
  TranslatorTest.setItem.
2024-01-26 12:48:18 +02:00
Piotrek Zadroga
4d4e87b1a3 [#3074] internal opt type refactor 2024-01-15 11:47:41 +01:00
Piotrek Zadroga
4bb524efbe [#3074] option example update 2024-01-09 11:40:04 +01:00
Piotrek Zadroga
bda2a87f0c [#3074] added ChangeLog entry
Also, some other corrections.
2024-01-09 11:39:23 +01:00
Piotrek Zadroga
72225055c2 [#3074] unpack reworked 2024-01-09 11:38:08 +01:00
Piotrek Zadroga
097bfe5fe1 [#3074] adding UTs for option 121 2024-01-09 11:38:08 +01:00
Piotrek Zadroga
92a7cd07f1 [#3074] adding example of option 121 2024-01-09 11:38:08 +01:00
Razvan Becheriu
d781e915cd [#3019] retry db open on startup 2023-12-14 08:01:42 +02:00
Piotrek Zadroga
a975630074 [#3095] update example for v4 option 21 2023-10-20 13:36:06 +00:00
Piotrek Zadroga
ac65b67c35 [#3002] add examples for SZTP redirect options 2023-09-21 07:35:01 +00:00
Razvan Becheriu
150ef07994 [#3003] output_options alias for output-options 2023-09-18 08:08:07 +00:00
Piotrek Zadroga
0af98b4be4 [#2904] revert alias output-options in examples
This reverts commit 12b00c890122313c8a912c4252054aab99bc07ad.
2023-09-18 08:08:07 +00:00
Piotrek Zadroga
8b7a7ea490 [#2904] updating alias output-options in examples 2023-09-18 08:08:07 +00:00
Thomas Markwalder
f1523a6674 [#2276] clean up
/doc/examples/kea4/all-keys.json
/doc/examples/kea6/all-keys.json
    Commented out ddns-use-conflict-resolution
    Added ddns-conflict-resolution-mode

/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp4/dhcp4_parser.yy
/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp6/dhcp6_parser.yy
    Translates ddns-use-conflict-resolution
    to ddns-conflict-resolution-mode

/src/lib/dhcpsrv/cfg_globals.cc
/src/lib/dhcpsrv/cfg_globals.h
    Removed ddns-use-conflict-resolution

/src/lib/dhcpsrv/parsers/simple_parser4.cc
/src/lib/dhcpsrv/parsers/simple_parser6.cc
    removed ddns-use-conflict-resolution
2023-07-06 14:27:25 +00:00
Thomas Markwalder
68e1442012 [#2276] Initial impl ddns-resolution-conflict-mode
New Files:
	src/bin/d2/check_exists_add.cc
	src/bin/d2/check_exists_add.h
	src/bin/d2/check_exists_remove.cc
	src/bin/d2/check_exists_remove.h
	src/bin/d2/simple_add_without_dhcid.cc
	src/bin/d2/simple_add_without_dhcid.h
	src/bin/d2/simple_remove_without_dhcid.cc
	src/bin/d2/simple_remove_without_dhcid.h

	src/bin/d2/tests/check_exists_add_unittests.cc
	src/bin/d2/tests/check_exists_remove_unittests.cc
	src/bin/d2/tests/simple_add_without_dhcid_unittests.cc
	src/bin/d2/tests/simple_remove_without_dhcid_unittests.cc

Modified:
	doc/examples/kea4/all-keys.json
	doc/examples/kea4/with-ddns.json
	doc/examples/kea6/all-keys.json
	doc/examples/kea6/with-ddns.json

	src/bin/d2/Makefile.am
	src/bin/d2/check_exists_add.cc
	src/bin/d2/check_exists_add.h
	src/bin/d2/check_exists_remove.cc
	src/bin/d2/check_exists_remove.h
	src/bin/d2/d2_update_mgr.cc
	src/bin/d2/simple_add_without_dhcid.cc
	src/bin/d2/simple_add_without_dhcid.h
	src/bin/d2/simple_remove_without_dhcid.cc
	src/bin/d2/simple_remove_without_dhcid.h
	src/bin/d2/tests/Makefile.am
	src/bin/d2/tests/check_exists_add_unittests.cc
	src/bin/d2/tests/check_exists_remove_unittests.cc
	src/bin/d2/tests/d2_process_unittests.cc
	src/bin/d2/tests/d2_queue_mgr_unittests.cc
	src/bin/d2/tests/d2_update_mgr_unittests.cc
	src/bin/d2/tests/nc_add_unittests.cc
	src/bin/d2/tests/nc_remove_unittests.cc
	src/bin/d2/tests/simple_add_unittests.cc
	src/bin/d2/tests/simple_add_without_dhcid_unittests.cc
	src/bin/d2/tests/simple_remove_unittests.cc
	src/bin/d2/tests/simple_remove_without_dhcid_unittests.cc

    src/bin/dhcp4/dhcp4_lexer.cc
    src/bin/dhcp4/dhcp4_lexer.ll
	src/bin/dhcp4/dhcp4_parser.cc
	src/bin/dhcp4/dhcp4_parser.h
	src/bin/dhcp4/dhcp4_parser.yy
	src/bin/dhcp4/json_config_parser.cc
	src/bin/dhcp4/location.hh
	src/bin/dhcp4/parser_context.h
	src/bin/dhcp4/tests/config_parser_unittest.cc
	src/bin/dhcp4/tests/d2_unittest.cc
	src/bin/dhcp4/tests/fqdn_unittest.cc
	src/bin/dhcp4/tests/get_config_unittest.cc

	src/bin/dhcp6/dhcp6_lexer.cc
	src/bin/dhcp6/dhcp6_lexer.ll
	src/bin/dhcp6/dhcp6_parser.cc
	src/bin/dhcp6/dhcp6_parser.h
	src/bin/dhcp6/dhcp6_parser.yy
	src/bin/dhcp6/dhcp6_srv.cc
	src/bin/dhcp6/json_config_parser.cc
	src/bin/dhcp6/location.hh
	src/bin/dhcp6/parser_context.h
	src/bin/dhcp6/tests/config_parser_unittest.cc
	src/bin/dhcp6/tests/d2_unittest.cc
	src/bin/dhcp6/tests/fqdn_unittest.cc
	src/bin/dhcp6/tests/get_config_unittest.cc

	src/lib/d2srv/testutils/nc_test_utils.cc
	src/lib/d2srv/testutils/nc_test_utils.h

	src/lib/dhcp_ddns/ncr_msg.cc
	src/lib/dhcp_ddns/ncr_msg.h
	src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
	src/lib/dhcp_ddns/tests/ncr_unittests.cc

	src/lib/dhcpsrv/cfg_globals.cc
	src/lib/dhcpsrv/cfg_globals.h
	src/lib/dhcpsrv/ncr_generator.cc
	src/lib/dhcpsrv/network.cc
	src/lib/dhcpsrv/network.h
	src/lib/dhcpsrv/parsers/base_network_parser.cc
	src/lib/dhcpsrv/parsers/base_network_parser.h
	src/lib/dhcpsrv/parsers/simple_parser4.cc
	src/lib/dhcpsrv/parsers/simple_parser6.cc
	src/lib/dhcpsrv/srv_config.cc
	src/lib/dhcpsrv/srv_config.h
	src/lib/dhcpsrv/tests/d2_udp_unittest.cc
	src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
	src/lib/dhcpsrv/tests/ncr_generator_unittest.cc
	src/lib/dhcpsrv/tests/network_unittest.cc
	src/lib/dhcpsrv/tests/srv_config_unittest.cc
2023-07-06 14:27:25 +00:00
Francis Dupont
823da39a90 [#2866] Checkpoint: updated examples and arm 2023-06-26 14:24:42 +02:00
Razvan Becheriu
db4de1acae [#2898] addressed comments 2023-06-22 14:52:48 +00:00
Razvan Becheriu
be6c201a93 [#2898] reverted mt19937_64 to mt19937 2023-06-22 14:52:48 +00:00
Razvan Becheriu
3d61bdde3e [#2898] fixed merge of stats for same pool IDs 2023-06-22 14:52:48 +00:00
Razvan Becheriu
6acc17aa10 [#2898] add pool-id to yang models 2023-06-22 14:52:48 +00:00
Andrei Pavel
2181cef68d
[#2832] add missing YANG nodes
- allocator
- ddns-ttl-percent
- exclude-first-last-24,
- ignore-dhcp-server-Identifier
- offer-lifetime
- pd-allocator
- read-timeout
- tcp-user-timeout
- write-timeout

Removed obsolete YANG nodes: contact-points, keyspace.
2023-05-16 15:38:17 +03:00
Razvan Becheriu
50abca6f3f [#2827] fixed all json examples in arm 2023-05-11 11:30:02 +03:00
Piotrek Zadroga
f624ab14c4 [#2536] Moving detailed examples to separate files 2023-05-10 09:06:31 +00:00
Piotrek Zadroga
db5ee838cc [#2536] addressed review comments 2023-05-04 23:18:04 +02:00
Andrei Pavel
c86d074590
[#2749] document default HA+MT 2023-04-19 18:13:41 +03:00
Andrei Pavel
ab23887672
[#2804] make text edits consistent across the ARM 2023-04-19 17:58:06 +03:00
Suzanne Goldlust
2af80cc559 [#2804] Text edits in comments 2023-04-19 17:57:59 +03:00
Thomas Markwalder
0364a28a9b [#225] Fixed typo in v4 with-ddns.json 2023-03-24 12:50:00 -04:00
Thomas Markwalder
bd17628504 [#225] updated with-ddns.json examples 2023-03-24 12:50:00 -04:00
Thomas Markwalder
1880494948 [#225] Updated arm
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp4-srv.rst
    updated DDNS parameter doc

Added a ChangeLog entry
2023-03-24 12:50:00 -04:00
Thomas Markwalder
904f4d2611 [#225] Added ddsn-ttl-percent parameter
kea-dhcp4/6 both now support ddns-ttl-percent
at the global, shared-network, and subnet scopes.
If specified it is the percentage of the lease
lifetime to send to D2.

Not yet supported by CB.

modified:
doc/examples/kea4/all-keys.json
doc/examples/kea6/all-keys.json
src/bin/dhcp4/dhcp4_lexer.cc
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.cc
src/bin/dhcp4/dhcp4_parser.h
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp4/location.hh
src/bin/dhcp6/dhcp6_lexer.cc
src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_parser.cc
src/bin/dhcp6/dhcp6_parser.h
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/json_config_parser.cc
src/bin/dhcp6/location.hh
src/bin/dhcp6/tests/fqdn_unittest.cc
src/lib/dhcpsrv/cfg_globals.cc
src/lib/dhcpsrv/cfg_globals.h
src/lib/dhcpsrv/dhcpsrv_messages.cc
src/lib/dhcpsrv/dhcpsrv_messages.h
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/ncr_generator.cc
src/lib/dhcpsrv/ncr_generator.h
src/lib/dhcpsrv/network.cc
src/lib/dhcpsrv/network.h
src/lib/dhcpsrv/parsers/base_network_parser.cc
src/lib/dhcpsrv/parsers/base_network_parser.h
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
src/lib/dhcpsrv/srv_config.cc
src/lib/dhcpsrv/srv_config.h
src/lib/dhcpsrv/tests/ncr_generator_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/srv_config_unittest.cc
2023-03-24 12:50:00 -04:00
Francis Dupont
39f01f50eb [#2785] Almost done 2023-03-24 09:55:52 +01:00
Thomas Markwalder
650775171f [#2719] Addressed remaining comments
modified:
    doc/examples/kea4/all-keys.json
    src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
2023-03-23 07:18:26 -04:00
Thomas Markwalder
ef3281460d [#2719] Renamed parameter and added it to classes
Renamed offer-lft to offer-lifetime to match other
lifetime parameters.
2023-03-23 07:17:48 -04:00
Thomas Markwalder
1ea70ecc43 [#2719] Adds offer_lft to globali and network scopes
offer-lft added to global, shared-network4, and subnet4
Can be set/fetched/parsed but does nothing yet.

src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/cfg_globals.*
    Add offer-lft to global, shared-network4, and subnet4 values

src/lib/dhcpsrv/network.*
    Add offer_lft_ to Network4

src/lib/dhcpsrv/parsers/base_network_parser.*
    BaseNetworkParser::parseOfferLft() - new function

src/lib/dhcpsrv/parsers/dhcp_parsers.cc
    Subnet4ConfigParser::initSubnet()

src/lib/dhcpsrv/parsers/shared_network_parser.cc
    SharedNetwork4Parser::parse() - add call to parseOfferLft()

src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
    TEST_F(AllocEngine4Test, discoverOfferLft) - new test, currently
    fails because impl is missing.

src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc
    Updated tests to account for offer-lft

src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
    Added offer-lft

src/bin/dhcp4/tests/get_config_unittest.cc
    Regenerated tests.
2023-03-23 07:17:48 -04:00
Francis Dupont
cb432a3c6a [#719] Updated doc & co 2023-03-15 13:49:21 +01:00
Francis Dupont
7efe36286c [#719] Reapplied patch 2023-03-15 13:49:21 +01:00
Francis Dupont
5b8e4c6da6 [#720] Moved to compatibility flag 2023-03-13 14:52:20 +01:00
Marcin Siodelski
73ce04f973 [#2688] Add timeout units to example files 2023-01-17 11:28:35 +01:00
Marcin Siodelski
e471cd6086 [#2688] Updated DHCP server parsers 2023-01-17 11:26:51 +01:00
Marcin Siodelski
9571b8f80b [#969] Configure allocator for DHCPv4 2023-01-07 11:45:06 +01:00
Andrei Pavel
03423adcd2
[#2651] release changes 2022-11-26 00:17:08 +02:00
Razvan Becheriu
e145eafb5b
[#2601] addressed review comments 2022-11-25 22:48:36 +02:00
Andrei Pavel
d67f8aca89
[#2601] address review comments
* make all-keys.json loadable by Kea again
* formatting
* EXPECT_NO_THROW -> EXPECT_NO_THROW_LOG
* add missing YANG tests for i64 and ui64
* memmove -> memcpy
* fix doxygen comments
* make checking of empty containers consistent when retrieving YANG data
* remove unnecessary setting of v6 YANG nodes for v4 modules
* fix hash of keatest-module.yang
2022-11-25 22:48:36 +02:00
Andrei Pavel
dd2dbd5be0 [#2601] restore unnecessary changes in all-keys-netconf.json 2022-11-25 18:15:34 +02:00
Andrei Pavel
6437f37711 [#2601] update the YANG modules with three extra nodes
* extended-info-checks
* ignore-rai-link-selection
* template-test
2022-11-25 18:15:33 +02:00
Razvan Becheriu
9b89f0f139 [#2472] updated documentation 2022-11-24 18:38:43 +02:00
Razvan Becheriu
6dc43932e1 [#2548] updated documentation 2022-10-25 10:06:42 +03:00
Razvan Becheriu
80e8c44897 [#248] template classes can add regular classes 2022-10-24 17:49:34 +00:00