]>
git.ipfire.org Git - thirdparty/kea.git/log
Thomas Markwalder [Fri, 16 Feb 2024 21:18:44 +0000 (16:18 -0500)]
[#3245] Adds fundamental classes to perfmon
src/hooks/dhcp/perfmon/monitored_duration.cc
src/hooks/dhcp/perfmon/monitored_duration.h
New files that add DurationDataInterval, DurationKey, Alarm, and MonitoredDuration classes
src/hooks/dhcp/perfmon/monitored_duration.h
New file of unit tests for new classes
modified: Makefile.am
modified: tests/Makefile.am
Francis Dupont [Thu, 22 Feb 2024 15:17:55 +0000 (16:17 +0100)]
[#2022] Added a comment about yhe unparking race
Francis Dupont [Wed, 21 Feb 2024 21:48:41 +0000 (22:48 +0100)]
[#2022] Added parking points
Francis Dupont [Wed, 21 Feb 2024 16:13:55 +0000 (17:13 +0100)]
[#2022] Checkpoint: added methods
Andrei Pavel [Thu, 22 Feb 2024 11:18:06 +0000 (13:18 +0200)]
[#3025] fix missing include
Andrei Pavel [Fri, 16 Feb 2024 11:34:21 +0000 (13:34 +0200)]
[#3025] add ChangeLog entry
Andrei Pavel [Wed, 21 Feb 2024 13:08:54 +0000 (15:08 +0200)]
[#3025] fix distcheck
Andrei Pavel [Tue, 20 Feb 2024 22:56:10 +0000 (00:56 +0200)]
[#3025] use admin-utils.sh based on location in upgrade scripts
Andrei Pavel [Tue, 20 Feb 2024 22:25:22 +0000 (00:25 +0200)]
[#3025] address review comments
Andrei Pavel [Tue, 20 Feb 2024 18:49:37 +0000 (20:49 +0200)]
[#3025] appease shellcheck
. "${admin_utils}"
^--------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.
version=$(checked_mysql_version)
^-------------------^ SC2119: Use checked_mysql_version "$@" if function's $1 should mean script's $1.
... and others that spiraled afterwards
Andrei Pavel [Tue, 20 Feb 2024 15:39:49 +0000 (17:39 +0200)]
[#3025] simplify logic in ensureSchemaVersion
... and allow kea-admin path to be overridden in tests.
Andrei Pavel [Tue, 20 Feb 2024 15:38:42 +0000 (17:38 +0200)]
[#3025] re-enable ProcessSpawnTest.isRunningSync
Andrei Pavel [Tue, 20 Feb 2024 15:37:09 +0000 (17:37 +0200)]
[#3025] fix location detection in kea-admin
Andrei Pavel [Tue, 20 Feb 2024 15:36:10 +0000 (17:36 +0200)]
[#3025] add isFile
Andrei Pavel [Fri, 16 Feb 2024 11:34:05 +0000 (13:34 +0200)]
[#3025] document automatic db init
Andrei Pavel [Fri, 16 Feb 2024 10:06:45 +0000 (12:06 +0200)]
[#3025] add unit tests
Andrei Pavel [Fri, 16 Feb 2024 07:45:54 +0000 (09:45 +0200)]
[#3025] sync kea-admin in db connection and fix interaction with retry
Andrei Pavel [Fri, 16 Feb 2024 06:33:02 +0000 (08:33 +0200)]
[#3025] add ability to wait sync in ProcessSpawn
Andrei Pavel [Tue, 13 Feb 2024 17:17:57 +0000 (19:17 +0200)]
[#3025] add db init on startup to other managers
Andrei Pavel [Tue, 13 Feb 2024 13:17:06 +0000 (15:17 +0200)]
[#3025] switch io service to DatabaseConnection's
Andrei Pavel [Tue, 13 Feb 2024 13:17:42 +0000 (15:17 +0200)]
[#3025] minor changes to kea-admin
- Reword 'Database version' to 'Schema version'.
- Remove a newline that was present only when running mysql operations
and not for postgresql operations. It was more visible since now it
appeared in the kea logs.
- Remove some extraneous exits. They weren't in the way of anything, but
weren't doing anything either.
Andrei Pavel [Tue, 13 Feb 2024 10:59:44 +0000 (12:59 +0200)]
[#3025] add ability to inherit env in ProcessSpawn
Andrei Pavel [Tue, 13 Feb 2024 08:15:34 +0000 (10:15 +0200)]
[#3025] automatic init of postgresql schema
Andrei Pavel [Mon, 20 Nov 2023 22:06:56 +0000 (00:06 +0200)]
[#3025] convert db access params to kea-admin
Andrei Pavel [Mon, 20 Nov 2023 10:21:45 +0000 (12:21 +0200)]
[#3025] automatic init of mysql schema
Piotrek Zadroga [Tue, 20 Feb 2024 14:52:53 +0000 (15:52 +0100)]
[#3130] trim trailing slash
Razvan Becheriu [Tue, 20 Feb 2024 08:56:43 +0000 (10:56 +0200)]
[#3185] fixed access invalid iterator
Francis Dupont [Wed, 21 Feb 2024 09:02:08 +0000 (10:02 +0100)]
[#2022] Fixed comment
Francis Dupont [Mon, 19 Feb 2024 15:59:06 +0000 (16:59 +0100)]
[#2022] Checkpoint: began reorg
Thomas Markwalder [Tue, 20 Feb 2024 18:15:45 +0000 (13:15 -0500)]
[#3231] Fixed some additional comments.
Minor nits in:
src/bin/dhcp4/tests/dhcp4_test_utils.h
src/bin/dhcp6/tests/dhcp6_test_utils.h
Thomas Markwalder [Tue, 20 Feb 2024 16:31:46 +0000 (11:31 -0500)]
[#3231] Refine conditional log in pkt_filter_bpf.cc
modified: pkt_filter_bpf.cc
Thomas Markwalder [Tue, 20 Feb 2024 14:28:00 +0000 (09:28 -0500)]
[#3231] Fixed build issue under MacOS Sonoma
Added conditional compilation to address MacOS adding
the macro BPF_TIMEVAL to define the structure used
in the bpf header as either "struct timeval" or
"struct timeval32" (64 bit vs 32 bit). CMSG uses
timeval, BPF uses timeval32.
src/lib/dhcp/pkt_filter_bpf.cc
PktFilterBPF::receive()
Thomas Markwalder [Tue, 20 Feb 2024 14:27:08 +0000 (09:27 -0500)]
[#3231] Addressed review comments
Minor cleanups, added a ChangeLog entry
Thomas Markwalder [Fri, 16 Feb 2024 20:17:20 +0000 (15:17 -0500)]
[#3231] Log SOCKET RECEIVED TIME support
src/hooks/dhcp/perfmon/perfmon_callouts.cc
dhcp4_srv_configured()
dhcp6_srv_configured()
- added to log socket received time support
src/hooks/dhcp/perfmon/perfmon_messages.mes
PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT
PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT
- new messages
Thomas Markwalder [Fri, 16 Feb 2024 19:38:00 +0000 (14:38 -0500)]
[#3231] Add log of event stack to Perfmon callouts
src/hooks/dhcp/perfmon/perfmon_callouts.cc
pkt4_send()
pkt6_send()
Added dump off packet event stack as a DEBUG log message
src/hooks/dhcp/perfmon/perfmon_messages.mes
New messages:
PERFMON_DHCP4_PKT_EVENTS
PERFMON_DHCP6_PKT_EVENTS
Thomas Markwalder [Fri, 16 Feb 2024 19:13:29 +0000 (14:13 -0500)]
[#3231] Core task 3 for perfmon
Add packet events and subnet callout argumments
to kea-dhcp4 and kea-dhcp6
src/bin/dhcp4/dhcp4_srv.*
Dhcpv4Srv::runOne() - add mt_queued packet event to query in MT mode
Dhcpv4Srv::processPacket() - add "process_started" event to query upon entry
Dhcpv4Srv::processDhcp4Query() - pass selected subnet (if one) into processPacketPktSend()
Dhcpv4Srv::sendResponseNoThrow() - add subnet parameter, pass it into processPacketPktSend9()
Dhcpv4Srv::processPacketPktSend() - add subnet parameter, add "process_completed" event
to query, add subnet to callout arguments
src/bin/dhcp4/tests/dhcp4_test_utils.cc
src/bin/dhcp4/tests/dhcp4_test_utils.h
src/bin/dhcp4/tests/hooks_unittest.cc
Updates to verify packet events content add subnet4 callout argument
src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::runOne() - add mt_queued packet event to query in MT mode
Dhcpv6Srv::processPacket() - add "process_started" event to query upon entry
Dhcpv6Srv::processDhcp6Query() - pass selected subnet (if one) into processPacketPktSend()
Dhcpv6Srv::sendResponseNoThrow() - add subnet parameter, pass it into processPacketPktSend9()
Dhcpv6Srv::processPacketPktSend() - add subnet parameter, add "process_completed" event
to query, add subnet to callout arguments
src/bin/dhcp6/tests/dhcp6_test_utils.cc
src/bin/dhcp6/tests/dhcp6_test_utils.h
src/bin/dhcp6/tests/hooks_unittest.cc
Updates to verify packet events content add subnet4 callout argument
src/bin/dhcp4/dhcp4_hooks.dox
Updated pkt4_send arguments
src/bin/dhcp6/dhcp6_hooks.dox
Updated pkt6_send arguments
Slawek Figiel [Tue, 20 Feb 2024 08:24:29 +0000 (09:24 +0100)]
[#3207] Format the code
Slawek Figiel [Tue, 20 Feb 2024 08:04:35 +0000 (09:04 +0100)]
[#3207] Change the member names
Slawek Figiel [Tue, 20 Feb 2024 07:59:48 +0000 (08:59 +0100)]
[#3207] Add some comments
Slawek Figiel [Tue, 20 Feb 2024 07:52:05 +0000 (08:52 +0100)]
[#3207] Remove a blank line from Changelog
Slawek Figiel [Tue, 20 Feb 2024 07:51:09 +0000 (08:51 +0100)]
[#3207] Change the letter case
Slawek Figiel [Fri, 9 Feb 2024 12:05:23 +0000 (13:05 +0100)]
[#3207] Trim whitespace
Slawek Figiel [Fri, 9 Feb 2024 12:03:16 +0000 (13:03 +0100)]
[#3207] Update Changelog
Slawek Figiel [Fri, 9 Feb 2024 12:02:12 +0000 (13:02 +0100)]
[#3207] Replace boost radom with std
Slawek Figiel [Fri, 9 Feb 2024 11:49:40 +0000 (12:49 +0100)]
[#3207] Remove old implementation
Slawek Figiel [Fri, 9 Feb 2024 11:41:35 +0000 (12:41 +0100)]
[#3207] Add a wrapper for boost rand generator
Slawek Figiel [Fri, 9 Feb 2024 10:46:23 +0000 (11:46 +0100)]
[#3207] Remove helper class
Slawek Figiel [Fri, 9 Feb 2024 10:39:54 +0000 (11:39 +0100)]
[#3207] Remove helper classes
Slawek Figiel [Fri, 9 Feb 2024 10:31:12 +0000 (11:31 +0100)]
[#3207] Remove weighted random generator
Andrei Pavel [Mon, 19 Feb 2024 15:48:42 +0000 (17:48 +0200)]
[#2022] fix User-Password example in ARM
Andrei Pavel [Mon, 19 Feb 2024 08:52:16 +0000 (10:52 +0200)]
[#2022] fix non-matching quotes and indentation
Francis Dupont [Tue, 13 Feb 2024 15:11:07 +0000 (16:11 +0100)]
[#2022] Added max-pending-requests doc
Francis Dupont [Thu, 8 Feb 2024 20:27:57 +0000 (21:27 +0100)]
[#2022] Checkpoint: last version of parking code
Thomas Markwalder [Fri, 16 Feb 2024 16:02:28 +0000 (11:02 -0500)]
[#3242] Fixed copyright date
Thomas Markwalder [Fri, 16 Feb 2024 15:59:31 +0000 (10:59 -0500)]
[#3242] Addressed comments, added ChangeLog entry
Minor cosmetic fixes.
Thomas Markwalder [Tue, 6 Feb 2024 19:27:30 +0000 (14:27 -0500)]
[#3209] Fixed .gitattributes file
modified: src/hooks/dhcp/perfmon/.gitattributes
Thomas Markwalder [Tue, 6 Feb 2024 15:40:27 +0000 (10:40 -0500)]
[#3242] Added bare-bones perfmon hook library
New files:
arm/hooks-perfmon.rst
src/hooks/dhcp/perfmon/.gitattributes
src/hooks/dhcp/perfmon/.gitignore
src/hooks/dhcp/perfmon/Makefile.am
src/hooks/dhcp/perfmon/libloadtests/.gitignore
src/hooks/dhcp/perfmon/libloadtests/Makefile.am
src/hooks/dhcp/perfmon/libloadtests/load_unload_unittests.cc
src/hooks/dhcp/perfmon/libloadtests/run_unittests.cc
src/hooks/dhcp/perfmon/perfmon.dox
src/hooks/dhcp/perfmon/perfmon_callouts.cc
src/hooks/dhcp/perfmon/perfmon_log.cc
src/hooks/dhcp/perfmon/perfmon_log.h
src/hooks/dhcp/perfmon/perfmon_messages.cc
src/hooks/dhcp/perfmon/perfmon_messages.h
src/hooks/dhcp/perfmon/perfmon_messages.mes
src/hooks/dhcp/perfmon/tests/.gitignore
src/hooks/dhcp/perfmon/tests/Makefile.am
src/hooks/dhcp/perfmon/tests/run_unittests.cc
src/hooks/dhcp/perfmon/version.cc
Modified:
configure.ac
arm/hooks-perfmon.rst
arm/hooks.rst
arm/logging.rst
arm/rst_arm_sources.mk
conf.py
src/hooks/dhcp/Makefile.am
Razvan Becheriu [Fri, 16 Feb 2024 16:30:14 +0000 (18:30 +0200)]
[#3230] addressed review
Thomas Markwalder [Fri, 16 Feb 2024 15:01:31 +0000 (10:01 -0500)]
[#3230] Added UT to BPF filter
modified: tests/pkt_filter_bpf_unittest.cc
Thomas Markwalder [Fri, 16 Feb 2024 14:51:43 +0000 (09:51 -0500)]
[#3230] Added UTs for isSocketReceiveTimeSupported
src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc
src/lib/dhcp/tests/pkt_filter_inet_unittest.cc
src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc
Added test for isSocketReceivedTimeSupported)
Thomas Markwalder [Fri, 16 Feb 2024 14:29:25 +0000 (09:29 -0500)]
[#3230] Move isSocketReceivedSuppported()
Move isSocketReceivedSuppported() impls out of headers and into
cc files so we're sure SO_TIMESTAMP is known.
Thomas Markwalder [Fri, 16 Feb 2024 13:10:38 +0000 (08:10 -0500)]
[#3230] Addressed review comments
src/lib/dhcp/iface_mgr.*
IfaceMgr::isSocketReceviedTimeSupported() - new function
src/lib/dhcp/pkt_filter.*
PktFilter::isSocketReceviedTimeSupported() - new pure virtual function
src/lib/dhcp/pkt_filter6.cc
src/lib/dhcp/pkt_filter_bpf.h
src/lib/dhcp/pkt_filter_inet.h
src/lib/dhcp/pkt_filter_inet6.h
src/lib/dhcp/pkt_filter_lpf.h
Added implementation of isSocketReceivedTimeSupported()
src/lib/dhcp/pkt_filter_lpf.cc
Removed WITH_CMSG and refactored receive() to be a single function
with conditional codde based on SO_TIMESTAMP
Updated UTs accordingly
Razvan Becheriu [Thu, 15 Feb 2024 17:57:19 +0000 (19:57 +0200)]
[#3230] addressed review
Thomas Markwalder [Thu, 1 Feb 2024 20:27:14 +0000 (15:27 -0500)]
[#3230] Initial commit
Adds dhcp::PktEvent, modifies packet filters and tests
src/lib/dhcp/pkt.*
Add PktEvent class, add stack and methods to Pkt
src/lib/dhcp/pkt_filter_bpf.cc
PktFilterBPF::receive() - fetch timestamp from bpfhdr,
add SOCKET_RECEIVED and BUFFER_READ events
PktFilterBPF::send() - add RESPONSE_SENT event
src/lib/dhcp/pkt_filter_inet.cc
PktFilterInet::openSocket() - enable SO_TIMESTAMP socket option
PktFilterInet::receive() - fetch SO_TIMESTAMP via CMSG,
add SOCKET_RECEIVED and BUFFER_READ events
PktFilterInet::send() - add RESPONSE_SENT event
src/lib/dhcp/pkt_filter_inet6.cc
PktFilterInet6::openSocket() - enable SO_TIMESTAMP socket option
PktFilterInet6::receive() - fetch SO_TIMESTAMP via CMSG,
add SOCKET_RECEIVED and BUFFER_READ events
PktFilterInet::send() - add RESPONSE_SENT event
src/lib/dhcp/pkt_filter_lpf.cc
PktFilterLPF::openSocket() - enable SO_TIMESTAMP socket option
PktFilterLPF::receive() - added conditonal compilation version based
on WITH_CMSG macro that fetches SO_TIMESTAMP and add SOCKET_RECEIVED
and BUFFER_READ events
PktFilterLPF::send() - add RESPONSE_SENT event
src/lib/dhcp/tests/pkt4_unittest.cc
TEST_F(Pkt4Test, PktEvents) - new test
src/lib/dhcp/tests/pkt6_unittest.cc
TEST_F(Pkt6Test, PktEvents) - new test
src/lib/dhcp/tests/pkt_filter6_test_utils.cc
src/lib/dhcp/tests/pkt_filter6_test_utils.h
src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc
src/lib/dhcp/tests/pkt_filter_inet_unittest.cc
src/lib/dhcp/tests/pkt_filter_test_utils.cc
src/lib/dhcp/tests/pkt_filter_test_utils.h
Updated tests to check PktEvent stack contents
src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc
src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc
Updated tests to check PktEvent stack contents,
Changed DISABLED_ tests to use SKIP_IF(notRoot)
Thomas Markwalder [Tue, 6 Feb 2024 20:38:23 +0000 (15:38 -0500)]
[#3209] Further review comments
modified: encode/encode.cc
Thomas Markwalder [Tue, 6 Feb 2024 19:22:14 +0000 (14:22 -0500)]
[#3209] Addressed review comments
Minor clean up, added commentary
Razvan Becheriu [Tue, 6 Feb 2024 16:56:27 +0000 (18:56 +0200)]
[#3209] addressed review
Thomas Markwalder [Wed, 31 Jan 2024 19:32:50 +0000 (14:32 -0500)]
[#3209] Updated copyrights
Thomas Markwalder [Wed, 31 Jan 2024 19:00:37 +0000 (14:00 -0500)]
[#3209] Remove internal bool vectors
src/lib/util/encode/encode.cc
BaseNEncoder::encode()
BaseNEncoder::decode() - eliminate use of bool vectors
as "bit streams"
Thomas Markwalder [Tue, 30 Jan 2024 20:47:54 +0000 (15:47 -0500)]
[#3209] Created new BaseNEncoder class
src/lib/util/encode/encode.h
src/lib/util/encode/encode.cc
Reworked into new BaseNEncoder class and derivatives
src/lib/util/tests/Makefile.am
Removed obsolete test files
added new file encode_unittest.cc
new file: src/lib/util/tests/encode_unittest.cc
deleted: src/lib/util/tests/base32hex_unittest.cc
deleted: src/lib/util/tests/base64_unittest.cc
deleted: src/lib/util/tests/hex_unittest.cc
Thomas Markwalder [Mon, 29 Jan 2024 16:00:41 +0000 (11:00 -0500)]
[#3209] Initial commit
Rewrote encoding/decoding.
src/lib/util/Makefile.am
Removed old files, added encode.cc, encode.h
src/lib/util/encode/encode.*
New implemenentation encoding and decoding not based
on boost.
Francis Dupont [Fri, 19 Jan 2024 13:44:26 +0000 (14:44 +0100)]
[#2022] Added PARK status handle
Francis Dupont [Wed, 17 Jan 2024 08:47:47 +0000 (09:47 +0100)]
[#2022] Finished RADIUS v6 server code
Francis Dupont [Tue, 16 Jan 2024 13:35:52 +0000 (14:35 +0100)]
[#2022] Reorganized v6 code
Wlodek Wencel [Wed, 31 Jan 2024 11:34:04 +0000 (12:34 +0100)]
[#3240] version in configure.ac changed to 2.5.6-git
Wlodek Wencel [Mon, 29 Jan 2024 12:23:00 +0000 (13:23 +0100)]
[#3237] release changes
Wlodek Wencel [Mon, 29 Jan 2024 12:11:19 +0000 (13:11 +0100)]
[#3237] release changes
Wlodek Wencel [Mon, 29 Jan 2024 09:17:26 +0000 (10:17 +0100)]
[#3237] release changes
Andrei Pavel [Fri, 26 Jan 2024 17:47:27 +0000 (19:47 +0200)]
[#2788] add RAII struct for exhausting options
Andrei Pavel [Fri, 15 Dec 2023 10:36:24 +0000 (12:36 +0200)]
[#2788] reset optarg
optarg is not reset in musl's getopt and it leaks values to other flags.
Reset it for all systems because it cannot hurt. If you remove the
optarg reset, you should see the bug in action on alpine systems in
DstubControllerTest.commandLineArgs when parsing argv2:
```
[ RUN ] DStubControllerTest.commandLineArgs
d_controller_unittests.cc:102: Failure
Expected equality of these values:
std::string(ex.what())
Which is: "unsupported option: -b cfgName"
"unsupported option: -b"
[ FAILED ] DStubControllerTest.commandLineArgs (14 ms)
```
Andrei Pavel [Fri, 15 Dec 2023 10:07:30 +0000 (12:07 +0200)]
[#2788] exhaust options before throwing error
Prior to this change, if parseArgs() was called twice during the same
program lifetime and it stumbled on an unsupported option and throwed an
exception on the first call, the previous set of arguments lived on to
be parsed by the second call. This is a situation that likely arises
only in unit tests, but let us fix it properly to at least silence the unit
test failure on alpine, which was happening because of different
implementation of getopt from musl, and which motivated looking into how
getopt behaves. To make the bug evident even in a non-alpine environment, add an
EXPECT_THROW_MSG in DStubControllerTest.commandLineArgs when parsing argv3, and
see that it outputs "unsupported option: [s]" instead of
"extraneous command line information".
Andrei Pavel [Fri, 15 Dec 2023 08:53:19 +0000 (10:53 +0200)]
[#2788] make all commandLineArgs tests more strict
Razvan Becheriu [Fri, 26 Jan 2024 12:59:07 +0000 (14:59 +0200)]
[#3235] bump up library versions for 2.5.5 release
Razvan Becheriu [Fri, 26 Jan 2024 12:33:14 +0000 (14:33 +0200)]
[#1790] updated list of CB parameters
Razvan Becheriu [Fri, 26 Jan 2024 12:25:58 +0000 (14:25 +0200)]
[#1790] added ChangeLog entry
Razvan Becheriu [Thu, 25 Jan 2024 23:22:46 +0000 (01:22 +0200)]
[#1790] added parameters to ARM
Razvan Becheriu [Thu, 25 Jan 2024 22:16:11 +0000 (00:16 +0200)]
[#1790] addressed review comments
Razvan Becheriu [Thu, 25 Jan 2024 11:35:39 +0000 (13:35 +0200)]
[#1790] added UTs
Razvan Becheriu [Wed, 24 Jan 2024 19:55:20 +0000 (21:55 +0200)]
[#1790] add tool to parse CB parameters
Razvan Becheriu [Wed, 17 Jan 2024 16:52:05 +0000 (18:52 +0200)]
[#1790] add support for top level maps in global CB parameters
Andrei Pavel [Thu, 25 Jan 2024 16:02:29 +0000 (18:02 +0200)]
[#3198] add ChangeLog entry
Andrei Pavel [Fri, 26 Jan 2024 09:25:14 +0000 (11:25 +0200)]
[#3198] add tests for empty yang option data
Andrei Pavel [Fri, 26 Jan 2024 09:24:51 +0000 (11:24 +0200)]
[#3198] add expectEqWithDiff to testutils
Andrei Pavel [Thu, 25 Jan 2024 19:05:27 +0000 (21:05 +0200)]
[#3198] fix reinstall.sh for YANG modules
Andrei Pavel [Thu, 25 Jan 2024 15:20:54 +0000 (17:20 +0200)]
[#3198] change --edit to --import in docs
to avoid ambiguities caused by the merge operation in sysrepocfg --edit
Andrei Pavel [Wed, 10 Jan 2024 09:46:00 +0000 (11:46 +0200)]
[#3198] ignore errors when regenerating hashes
The script complains about hashes missing, but that is only temporary until they
are regenerated. A second call to check-hashes.sh will now properly check them
at the end.
Andrei Pavel [Wed, 10 Jan 2024 09:43:58 +0000 (11:43 +0200)]
[#3198] bump up revisions for YANG modules
Andrei Pavel [Wed, 10 Jan 2024 09:20:26 +0000 (11:20 +0200)]
[#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.
Andrei Pavel [Wed, 10 Jan 2024 09:17:32 +0000 (11:17 +0200)]
[#3198] add data as key for option-data in YANG modules
Setting mandatory for keys is redundant as mentioned in RFC 7950 section
7.8.2: Any "mandatory" statements in the key leafs are ignored.
So they were removed. This now makes it consistent with how data is
declared in option-data as well.
Andrei Pavel [Tue, 23 Jan 2024 12:57:08 +0000 (14:57 +0200)]
[#3229] hammer.py prepare-system --just-configure