summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_dhcp-server.py
AgeCommit message (Collapse)Author
2026-07-23dhcp-server: T9093: allow option interface-mtu up to 16000Brad Kollmyer
DHCP option 26 (Interface MTU, RFC 2132) is a 16-bit unsigned value and Kea accepts the full range, but the CLI validator capped it at 9000 - below the 9216 used on common jumbo fabrics and below VyOS's own interface MTU maximum of 16000. Relax the constraint to 576-16000 and exercise a jumbo value (9216) in the smoketest. Co-authored-by: Christian Breunig <christian@breunig.cc>
2026-07-17utils: T9008: migrate remaining cmd() callers to cmdl() and remove cmd()Christian Breunig
Complete the safer-subprocess migration started by the cmdl()/ifconfig refactoring and convert every remaining vyos.utils.process.cmd() call site to the list-based cmdl(). Drop the vyos.utils.process.cmd() implementation as it is no longer in use.
2026-06-05dhcp-server: T8524: Validate DDNS key-name references defined tsig-keyNataliia Solomko
When a key-name is set under dynamic-dns-update forward-domain or reverse-domain, validate that the referenced TSIG key is defined under dynamic-dns-update tsig-key. Previously the missing key was only caught at runtime, causing kea-dhcp-ddns to fail to start with a fatal error. Also fix a pre-existing bug in `verify_ddns_domain` (formerly `verify_ddns_domain_servers`) where the function was called with the full tagNode dict but iterated as if it received a single domain config, causing the DNS server address check to never actually run.
2026-05-13dhcp: T8848: Fix timezone pcode data (#5189)Indrajit Raychaudhuri
According to Kea documentation: When a data field is a string and that string contains the comma (`,`; U+002C) character, the comma must be escaped with two backslashes (`\\,`; U+005C) because both the routine splitting of CSV data into fields and JSON use the same escape character. A single escape (`\,`) would make the JSON invalid. Accordingly, the pcode generated for time-zone should have the `,` double escaped. For example, `"GMT0BST,M3.5.0/1,M10.5.0"` should be rendered as `"GMT0BST\\,M3.5.0/1\\,M10.5.0"`. See: https://kea.readthedocs.io/en/stable/arm/dhcp4-srv.html#standard-dhcpv4-options
2026-05-13T8600: Add option to change logging verbosity in Kea (#5178)Nataliia S.
2026-05-06kea: T8763: Fix formatting for ruff validationIndrajit Raychaudhuri
2026-05-06kea: T8763: Smoketest vendor-encapsulated-options spaceIndrajit Raychaudhuri
2026-04-28kea: T8586: Skip static mappings without match criteriasarthurdev
2026-03-30Merge pull request #5083 from fatpelt/currentDaniil Baturin
kea: T8408: Fixes to enable dhcp option 67
2026-03-27T8410: Fix typos and mistakes for comments and messagesViacheslav Hletenko
Fix typos and mistakes No functional changes
2026-03-26kea: T8408: Fixes to enable dhcp option 67Patrick Felt
- convert to the simpler kea4_options dict - add the smoketest
2025-10-28dhcp-server: T3936: Added support for DHCP Option 82 (#4665)cblackburn-igl
* dhcp-server: T3936: Added support for DHCP Option 82 This commit adds support in both the CLI and the underlying code for DHCP Option 82 to be used to filter/route DHCP address assignments. The primary use case for this is to support enterprise switches which can "tag" DHCP requests with physical real world informaiton such as which switch first saw the request and which port it originated from (known in this context as remote-id and circuit-id). Once client-classes have been defined they can be assigned to subnets or ranges so that only certain addresses get assigned to specific requests. There is also a corresponding documentation update which pairs with this code change. (cherry picked from commit 326b5e713cb363a2b9f69e2204c4ee2ccd9939bb) * Update src/conf_mode/service_dhcp-server.py Co-authored-by: Nataliia S. <81954790+natali-rs1985@users.noreply.github.com> * Update src/conf_mode/service_dhcp-server.py Co-authored-by: Nataliia S. <81954790+natali-rs1985@users.noreply.github.com> * Update interface-definitions/include/dhcp/dhcp-server-common-config.xml.i Co-authored-by: Nataliia S. <81954790+natali-rs1985@users.noreply.github.com> --------- Co-authored-by: Daniil Baturin <daniil@baturin.org> Co-authored-by: Nataliia S. <81954790+natali-rs1985@users.noreply.github.com>
2025-10-21T7948: always call setUp() and tearDown() base class methodsChristian Breunig
While working on task T7664 (FRR 10.4 upgrade), I identified the need for additional validation and safeguards around the FRR management daemon. The most appropriate place for this logic is in the setUp() and tearDown() methods of the smoketest base class, VyOSUnitTestSHIM. However, during implementation, it became apparent that test cases do not consistently invoke the base class's setup and teardown methods. This inconsistency complicates the process of capturing the FRR mgmtd PID at the start of a test and verifying that it remains unchanged by the end - a key step in detecting crashes or unexpected terminations (e.g., SIGSEGV) of the FRR management daemon during tests.
2025-10-10dhcp-server: T7723: add DHCP Option 26 (interface MTU)Adam Greene
2025-10-02kea: T7823: DHCP-server lease cannot be clearedcanoziia
* kea: T7823: DHCP-server lease cannot be cleared * Update smoketest/scripts/cli/test_service_dhcp-server.py Co-authored-by: Christian Breunig <christian@breunig.cc> --------- Co-authored-by: Christian Breunig <christian@breunig.cc>
2025-09-30smoketest: T7858: make failfast main argument dynamicChristian Breunig
When smoketest debugging is enabled (by creating the file /tmp/vyos.smoketest.debug), all available smoketests will fail fast instead of running to completion. This helps reduce test time when something is broken or undergoing refactoring, as it avoids waiting for the full test suite to finish.
2025-09-23kea: T7821: Update paths for Kea v2.7.9 security changessarthurdev
2025-09-14kea: T7821: Update Kea to 3.0sarthurdev
2025-08-19Merge pull request #4508 from davi2367/vrf-dhcpDaniil Baturin
kea: T6211: add VRF support for KEA dhcp server
2025-08-15kea: T6211: add VRF support for KEA dhcp serverDavid Vølker
2025-08-02smoketest: T7676: improve dhcp-server smoketest logic reliabilitycblackburn-igl
Improve smoketest reliability by preventing false failures and making errors more informative.
2025-06-28T7591: remove copyright years from source filesChristian Breunig
The legal team says years are not necessary so we can go ahead with it, since it will simplify backporting. Automatically removed using: git ls-files | grep -v libvyosconfig | xargs sed -i -E \ 's/^# Copyright (19|20)[0-9]{2}(-[0-9]{4})? VyOS maintainers.*/# Copyright VyOS maintainers and contributors <maintainers@vyos.io>/g' In addition we will error-out during "make" if someone re-adds a legacy copyright notice
2025-04-22T6773: RFC-2136 support for Kea DHCP4 server (#4153)Alex Bukharov
2025-04-15Merge pull request #4412 from sarthurdev/kea_2.6Daniil Baturin
kea: T7281: Add ping-check, use built-in option for classless static routes
2025-04-14kea: T7310: add support for RFC-5417 (option 138) (#4430)David Vølker
* dhcp-server: T7310: add support for option 138 CAPWAP AC to KEA * kea: T7310: Update data/templates/dhcp-server/kea-dhcp4.conf.j2 Co-authored-by: Simon <965089+sarthurdev@users.noreply.github.com> * kea: T7310: Update python/vyos/kea.py Co-authored-by: Simon <965089+sarthurdev@users.noreply.github.com> * kea: T7310: add smoketest for capwap-ac-v4 * kea: T7310: Update python/vyos/kea.py Co-authored-by: Simon <965089+sarthurdev@users.noreply.github.com> --------- Co-authored-by: David Vølker <davvol@davvol.dk> Co-authored-by: Simon <965089+sarthurdev@users.noreply.github.com>
2025-04-14kea: T7281: Update smoketest service check, return logs on errorsarthurdev
2025-04-14kea: T7281: No longer uses control agent for HAsarthurdev
2025-04-14kea: T7281: Add support for ping-check in Keasarthurdev
2025-04-14kea: T7281: Use Kea internal option for option 121 routes, remove option 249sarthurdev
Remove legacy windows static route on option 249
2025-02-17ruff: T6583: Reformat to comply with code styleIndrajit Raychaudhuri
2025-02-17dhcp: T6948: Smoketest for DHCP server leases sync with hostd recordsIndrajit Raychaudhuri
The test `test_dhcp_hostsd_lease_sync` validates DHCP server leases in sync with hostd records. Since the DHCP server running in smoketest environment might not have actual clients to lease IP addresses, we simulate the lease creation and deletion using kea helper functions (`kea_add_lease` and `kea_delete_lease`).
2024-11-21dhcp: T6692: Fix range options not present when `exclude` is usedsarthurdev
Add smoketest to verify range options are present with `exclude`
2024-04-04Merge pull request #3214 from nicolas-fort/T6068-keaDaniil Baturin
T6068: dhcp-server: add command <set service dhcp-server high-availability mode>
2024-04-03T6068: dhcp-server: add command <set service dhcp-server high-availability ↵Nicolas Fort
mode> so user can define what type of ha use: active-active or active-passive
2024-03-28dhcp-server: T4718: Listen-address is not commit if the ip address is on the ↵khramshinr
interface with vrf
2024-03-25T6171: migrate <set service dhcp-server failover> to <set service ↵Nicolas Fort
dhcp-server high-availability>.
2024-02-25dhcp-server: T6063: Add `ignore-client-id` to relax client identifier checks ↵sarthurdev
for leases
2024-01-22dhcp: T5787: Allow disabled duplicates on static-mappingsarthurdev
2024-01-18dhcp: T5952: validate duplicate DUID in static-mappings incl. smoketestsChristian Breunig
2024-01-11dhcp: dhcpv6: T3316: Add `subnet-id` so leases remain mapped to entries in ↵Simon
the lease file (#2796)
2024-01-10dhcp: T5787: Prevent duplicate IP addresses on static mappingssarthurdev
2024-01-10dhcp: T3316: Fix `listen-address` handling and add `listen-interface` as ↵sarthurdev
supported by Kea
2024-01-10dhcp: T3316: Move options to separate node and extend scopessarthurdev
2023-12-21dhcp: T3316: Update smoketest for hostname, DUID, MAC in reservationIndrajit Raychaudhuri
Also, have the smoketest start with a clean CLI instance.
2023-12-08dhcp: T3316: Add time-zone node for options 100 and 101sarthurdev
2023-12-08dhcp: T3316: Migrate dhcp/dhcpv6 server to Keasarthurdev
2023-07-14T5195: vyos.util -> vyos.utils package refactoring (#2093)Christian Breunig
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process * T5195: use read_file and write_file implementation from vyos.utils.file Changed code automatically using: find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} + find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} + * T5195: move chmod* helpers to vyos.utils.permission * T5195: use colon_separated_to_dict from vyos.utils.dict * T5195: move is_systemd_service_* to vyos.utils.process * T5195: fix boot issues with missing imports * T5195: move dict_search_* helpers to vyos.utils.dict * T5195: move network helpers to vyos.utils.network * T5195: move commit_* helpers to vyos.utils.commit * T5195: move user I/O helpers to vyos.utils.io
2022-12-19dhcp: T4832: fix TypeError in smoketestChristian Poessinger
Commit cca7ec3e ("T4832: dhcp: Add IPv6-only dhcp option support (RFC 8925)") extended the smoketests but used int over str when calilng the CLI wrapper. This led to: TypeError: sequence item 7: expected str instance, int found
2022-11-21T4832: dhcp: Add IPv6-only dhcp option support (RFC 8925)Yuxiang Zhu
Clients supporting this DHCP option (DHCP option 108, RFC 8925) will disable its IPv4 network stack for configured number of seconds and operate in IPv6-only mode. This option is known to work on iOS 15+ and macOS 12.0.1+. Example command: ```sh set service dhcp-server shared-network-name LAN6 subnet 192.168.64.0/24 ipv6-only-preferred 0 ```
2022-04-25smoketest: bugfix on proper inheritance levels for classmethodChristian Poessinger