2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

36562 Commits

Author SHA1 Message Date
Andrei Pavel
6b988f8cc8
[#3287] address review 2024-06-20 18:52:09 +03:00
Andrei Pavel
3791bb03b0
[#3287] address review 2024-06-20 18:52:09 +03:00
Andrei Pavel
9c35a4db68
[#3287] fix pylint warnings
- C0115: Missing class docstring (missing-class-docstring)
- C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck)
- C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
- C0206: Consider iterating with .items() (consider-using-dict-items)
- C0411: standard import "..." should be placed before "..." (wrong-import-order)
- C0415: Import outside toplevel (...) (import-outside-toplevel)
- C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
- E0001: Parsing failed: 'invalid syntax (<unknown>, line 2313)' (syntax-error)
- E0401: Unable to import '...' (import-error)
- E0602: Undefined variable 'l' (undefined-variable)
- R0205: Class 'VagrantEnv' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
- E1101: Instance of 'NSECBASE' has no 'dump_fixedpart' member (no-member)
- E1123: Unexpected keyword argument 'capture' in method call (unexpected-keyword-arg)
- R0902: Too many instance attributes (too-many-instance-attributes)
- R0913: Too many arguments (too-many-arguments)
- R0916: Too many boolean expressions in if statement (6/5) (too-many-boolean-expressions)
- R1717: Consider using a dictionary comprehension (consider-using-dict-comprehension)
- R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
- R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
- R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal)
- W0102: Dangerous default value sys.argv[1:] (builtins.list) as argument (dangerous-default-value)
- W0102: Dangerous default value {} as argument (dangerous-default-value)
- W0106: Expression "[f.write('%02x' % x) for x in bin_address]" is assigned to nothing (expression-not-assigned)
- W0107: Unnecessary pass statement (unnecessary-pass)
- W0201: Attribute 'config' defined outside __init__ (attribute-defined-outside-init)
- W0404: Reimport '...' (imported line ...) (reimported)
- W0611: Unused import ... (unused-import)
- W0612: Unused variable '...' (unused-variable)
- W0613: Unused argument '...' (unused-argument)
- W0621: Redefining name '...' from outer scope (line 1471) (redefined-outer-name)
- W0622: Redefining built-in '...' (redefined-builtin)
- W0707: Consider explicitly re-raising using 'raise ... from ...' (raise-missing-from)
- W0718: Catching too general exception Exception (broad-exception-caught)
- W1202: Use lazy % formatting in logging functions (logging-format-interpolation)
- W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
- W1308: Duplicate string formatting argument 'connection_type', consider passing as named argument (duplicate-string-formatting-argument)
- W1401: Anomalous backslash in string: '\/'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
- W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
- W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
- W4901: Deprecated module 'optparse' (deprecated-module)
- W4904: Using deprecated class SafeConfigParser of module configparser (deprecated-class)
2024-06-20 18:52:09 +03:00
Andrei Pavel
8e37580e59
[#3287] fix pycodestyle warnings
- E111 indentation is not a multiple of 4
- E117 over-indented
- E125 continuation line with same indent as next logical line
- E127 continuation line over-indented for visual indent
- E128 continuation line under-indented for visual indent
- E129 visually indented line with same indent as next logical line
- E131 continuation line unaligned for hanging indent
- E201 whitespace after '['
- E201 whitespace after '{'
- E202 whitespace before ')'
- E202 whitespace before ']'
- E202 whitespace before '}'
- E203 whitespace before '
- E203 whitespace before ','
- E222 multiple spaces after operator
- E225 missing whitespace around operator
- E228 missing whitespace around modulo operator
- E231 missing whitespace after ','
- E251 unexpected spaces around keyword / parameter equals
- E261 at least two spaces before inline comment
- E262 inline comment should start with '# '
- E265 block comment should start with '# '
- E301 expected 1 blank line, found 0
- E302 expected 2 blank lines, found 1
- E303 too many blank lines (2)
- E305 expected 2 blank lines after class or function definition, found 1
- E306 expected 1 blank line before a nested definition, found 0
- E401 multiple imports on one line
- E402 module level import not at top of file
- E501 line too long
- E502 the backslash is redundant between brackets
- E703 statement ends with a semicolon
- E713 test for membership should be 'not in'
- E722 do not use bare 'except'
- E741 ambiguous variable name 'l'
- W605 invalid escape sequence '\/'
2024-06-20 18:52:09 +03:00
Andrei Pavel
c0acd781c9
[#3287] fix bandit warnings 2024-06-20 18:52:09 +03:00
Andrei Pavel
4673e38116
[#3287] add bandit, pycodestyle and pylint CI jobs 2024-06-20 18:52:08 +03:00
Andrei Pavel
aa5fab9c9f
[#3287] address review 2024-06-20 18:31:30 +03:00
Andrei Pavel
f11dd59433
[#3287] address review 2024-06-20 18:31:30 +03:00
Andrei Pavel
3efbe09a45
[#3287] fix reported shellcheck warnings 2024-06-20 18:31:30 +03:00
Andrei Pavel
bb2ce014c8
[#3287] automatically determine list of files to shellcheck
To not allow developers to get away with not shellchecking a new script
by omitting to add it to the manual list that existed before.
2024-06-20 18:31:30 +03:00
Razvan Becheriu
6f7d97c654 [#2914] extended documentation with for loops in scripts 2024-06-20 09:38:37 +00:00
Francis Dupont
1b8b3592da [#2878] Updated subnet-id section 2024-06-19 12:19:52 +00:00
Francis Dupont
286b0aeab8 [#2878] Improved note 2024-06-19 12:19:52 +00:00
Francis Dupont
d5dbaa4c07 [#2878] [#2878] Added the implicitly global note 2024-06-19 12:19:52 +00:00
Marcin Siodelski
a743174e37 [#3246] Add released state in ARM 2024-06-19 12:34:18 +02:00
Marcin Siodelski
b1a2027605 [#3246] Mark the change backward incompatible 2024-06-19 12:34:18 +02:00
Marcin Siodelski
039a2a6702 [#3246] Removed unused variable 2024-06-19 12:34:18 +02:00
Marcin Siodelski
9143633c45 [#3246] Change expired to relased in comment 2024-06-19 12:34:18 +02:00
Marcin Siodelski
a14d468596 [#3246] Renamed deleted_lease to released_lease 2024-06-19 12:34:18 +02:00
Marcin Siodelski
3af6a9e7b9 [#3246] Change removal to release in comment 2024-06-19 12:34:18 +02:00
Marcin Siodelski
849813fbdd [#3246] Cleanup in the comments 2024-06-19 12:34:18 +02:00
Marcin Siodelski
a52bf68db9 [#3246] Do not delete soft released leases 2024-06-19 12:34:18 +02:00
Razvan Becheriu
8f76547fc6 [#3436] fixed compilation 2024-06-19 09:40:06 +00:00
Razvan Becheriu
b74b05fdcf [#3450] addressed review and added ChangeLog entry 2024-06-17 16:02:37 +03:00
Razvan Becheriu
a1ba3c6dff [#3450] addressed review comment 2024-06-17 16:02:09 +03:00
Razvan Becheriu
f477e8ebcc [#3450] make kea environment available to lfc 2024-06-17 16:02:09 +03:00
Thomas Markwalder
8c7da65347 [#3328] Added ChangeLog 2024-06-15 09:17:40 +02:00
Thomas Markwalder
5d86419105 [#3328] Addressed review comments
Revampe UTs
Replaced ave and average with mean throughout
2024-06-15 09:17:40 +02:00
Thomas Markwalder
da8046161d [#3328] More doc JSON fixes
And added missing api file

modified:   hooks-perfmon.rst
new file:   ../../../src/share/api/perfmon-get-all-durations.json
2024-06-15 09:17:39 +02:00
Thomas Markwalder
2045651627 [#3328] Corrected JOSN errors in doc
modified:   hooks-perfmon.rst
2024-06-15 09:17:39 +02:00
Thomas Markwalder
0e5b367bea [#3328] New Unit tests
/src/hooks/dhcp/perfmon/tests/monitored_duration_unittests.cc
    TEST(DurationKey, toElement)
    TEST(MonitoredDuration, toElement)
    TEST(MonitoredDuration, toValueRow)

/src/hooks/dhcp/perfmon/tests/perfmon_cmds_unittests.cc
    TEST_F(PerfMonCmdTest4, invalidPerfMonGetAllDurations)
    TEST_F(PerfMonCmdTest6, invalidPerfMonGetAllDurations)
    TEST_F(PerfMonCmdTest4, perfMonGetAllDurationsResultSetFalse)
    TEST_F(PerfMonCmdTest4, perfMonGetAllDurationsResultSetTrue)
    TEST_F(PerfMonCmdTest6, perfMonGetAllDurationsResultSetFalse)
    TEST_F(PerfMonCmdTest6, perfMonGetAllDurationsResultSetTrue)
2024-06-15 09:17:39 +02:00
Thomas Markwalder
6f9989b6d2 [#3328] Doc updates
/doc/sphinx/api-files.txt
/src/share/api/api_files.mk
    Added new command files
        src/share/api/perfmon-control.json
        src/share/api/perfmon-get-all-durations.json

/doc/sphinx/arm/hooks-perfmon.rst
    Updated API section

/src/hooks/dhcp/perfmon/perfmon_mgr.cc
    Added "result-set-format" to get-all-durations results.
2024-06-15 09:17:39 +02:00
Thomas Markwalder
d61188ed8c [#3328] Implemented result set format
/src/hooks/dhcp/perfmon/monitored_duration.*
    MonitoredDuration::toElement()
    - add ave-duration-usecs

    MonitoredDuration::valueRowColumns()
    MonitoredDuration::toValueRow()
    - new funcs

src/hooks/dhcp/perfmon/perfmon_mgr.cc
    PerfMonMgr::formatDurationDataAsResultSet() - implemented
2024-06-15 09:17:39 +02:00
Thomas Markwalder
4889c3f9a3 [#3328] Output usecs; add permon-get-all-durations
Statistics and raw data return durations in microseconds instead
of milliseconds.  Add initial support for perfmon-get-all-durations.

/doc/sphinx/arm/hooks-perfmon.rst
    Updated to microseconds
    Updated perfmon-control command

/src/hooks/dhcp/perfmon/monitored_duration.*
    DurationKey::toElement()
    MonitoredDuration::toElement() - new functions

/src/hooks/dhcp/perfmon/perfmon_callouts.cc
    int perfmon_control()
    int perfmon_get_all_durations() - new functions

    int load() - register commands

/src/hooks/dhcp/perfmon/perfmon_config.cc
    PerfMonConfig::parse() - replace use of copy ctor

    PerfMonConfig::enable_monitoring_
    PerfMonConfig::stats_mgr_reporting_ - made std::atomic

/src/hooks/dhcp/perfmon/perfmon_messages.mes
    PERFMON_CMDS_CONTROL_ERROR
    PERFMON_CMDS_CONTROL_OK
    PERFMON_CMDS_GET_ALL_DURATIONS_ERROR
    PERFMON_CMDS_GET_ALL_DURATIONS_OK - new messages

/src/hooks/dhcp/perfmon/perfmon_mgr.cc
    PerfMonMgr::perfmonControlHandler()
    PerfMonMgr::perfmonGetAllDurationsHandler()
    PerfMonMgr::formatDurationDataAsElements()
    PerfMonMgr::formatDurationDataAsResultSet() - new functions

/src/hooks/dhcp/perfmon/tests/Makefile.am
    Added perfmon_cmds_unittests.cc

/src/hooks/dhcp/perfmon/tests/perfmon_config_unittests.cc
    Replaced use of copy ctor

/src/hooks/dhcp/perfmon/tests/perfmon_mgr_unittests.cc
    Updated tests for microseconds
2024-06-15 09:17:39 +02:00
Francis Dupont
58cc9eb76c [#2755] Code done, doc to update 2024-06-14 22:44:34 +02:00
Thomas Markwalder
e1efb04748 [#3366] Fixed failures in CfgIface UTs
Tests were subject to wide variations in retry intervals
on certain VMs.  Reworked stop when done but allow for
longer overal timeout

src/lib/dhcp/testutils/pkt_filter_test_stub.cc
    PktFilterTestStub::openSocket() - close fd on simulated open error

src/lib/dhcpsrv/tests/cfg_iface_unittest.cc
    CfgIfaceTest::stopWait() - added func to stop io_service_

    CfgIfaceTest::TearDown() - close sockets before clearing ifaces

    TEST_F(CfgIfaceTest, retryOpenServiceSockets4)
    TEST_F(CfgIfaceTest, retryOpenServiceSockets4OmitBound)
    TEST_F(CfgIfaceTest, retryOpenServiceSockets6)
    TEST_F(CfgIfaceTest, retryOpenServiceSockets6OmitBound) - modified
    to use stopWait(), longer timeout, shorter wait
2024-06-14 11:19:20 +00:00
Francis Dupont
a78fa738f0 [#3170] Addressed last comment 2024-06-11 19:42:55 +02:00
Francis Dupont
dce8f0d3f3 [#3170] Addressed comments 2024-06-11 16:35:08 +02:00
Francis Dupont
d51e070042 [#3170] Added missing blank line 2024-06-11 16:34:08 +02:00
Francis Dupont
0c210f551a [#3170] Updated doc and ChangeLog 2024-06-11 16:33:29 +02:00
Francis Dupont
03a5b8df5c [#3170] Checkpoint: finished code 2024-06-11 16:31:51 +02:00
Francis Dupont
ef2aee2b2b [#3170] Regen flex/bison 2024-06-11 16:31:50 +02:00
Francis Dupont
d955eac72f [#3170] Checkpoint: created and added TokenMatch 2024-06-11 16:31:50 +02:00
Francis Dupont
e59a3e80e6 [#3375] Added a ChangeLog entry 2024-06-11 16:15:33 +02:00
Francis Dupont
3e93864b4f [#3375] Addressed comments 2024-06-10 10:38:08 +02:00
Francis Dupont
91378b3ae1 [#3375] Made update atomic and added UT 2024-06-10 09:19:53 +02:00
Francis Dupont
85e05cde3b [#3375] Fixed del bug (new UT?) 2024-06-10 09:19:53 +02:00
Francis Dupont
40827e15c3 [#3375] Made cfg_host MT safe 2024-06-10 09:19:53 +02:00
Andrei Pavel
8dcd1a9453
[#3433] add libasiodns section 2024-06-07 22:07:06 +03:00
Andrei Pavel
eeb1c09a5d
[#3433] add asiodns.dox to tarball 2024-06-07 22:07:06 +03:00