summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
45 hoursT6353: Add password strength check and user warningoniko94
2025-03-04T5400: add local build of libvyosconfig to MakefileJohn Estabrook
libvyosconfig is both a build and a run dependency of vyos-1x. Satisfying the build dependency within the Docker image requires coordination of updates to vyos-build/libvyosconfig/vyos-1x on any changes to the library; simplify this process by moving the build to a step of the vyos-1x Makefile.
2025-03-01Revert "wireguard: T4930: remove pylint W0611: unused import"James Roberts
This reverts commit bb70ea569f4548b103c54bbb7c393221a6da0a23.
2025-02-27Merge pull request #4237 from indrajitr/hostd-updateViacheslav Hletenko
T6948: Keep DHCP server leases in sync with hostd records
2025-02-25Merge pull request #4364 from natali-rs1985/T7171Daniil Baturin
T7171: Add dstport option to GENEVE tunnels
2025-02-25T7171: Add dstport option to GENEVE tunnelsNataliia Solomko
2025-02-20firewall: T7148: Bridge state-policy uses drop in place of rejectsarthurdev
2025-02-19Revert "wireguard: T4930: drop unused ↵Christian Breunig
WireGuardOperational().show_interface() method" This reverts commit 98414a69f0018915ac999f51975618dd5fbe817d.
2025-02-17dhcp: T6948: kea: Add kea helpers and enrich leases with domain nameIndrajit Raychaudhuri
Add helpers: - `kea_add_lease` to add a lease to the running kea server - `kea_get_domain_from_subnet_id` to get the domain name from subnet id Also, enrich leases with domain name from subnet id
2025-02-13wlb: T4470: Migrate WAN load balancer to Python/XMLsarthurdev
2025-02-08vyos.ifconfig: T5103: always stop the DHCP client process bevore changing VRFChristian Breunig
Always stop the DHCP client process to clean up routes within the VRF where the process was originally started. There is no need to add a condition to only call the method if "address dhcp" was defined, as this is handled inside set_dhcp(v6) by only stopping if the daemon is running. DHCP client process restart will be handled later on once the interface is moved to the new VRF.
2025-02-07Merge pull request #4333 from HollyGurza/T6058Daniil Baturin
T6058: Fix popen command wrapper handling
2025-02-07T6058: Fix popen command wrapper handlingkhramshinr
Ensure `wrapper` is only prepended to `command` when it is non-empty
2025-02-06Merge pull request #4335 from c-po/T5103Christian Breunig
vyos.ifconfig: T5103: force dhclient restart on VRF change
2025-02-06T7069: Add function to get available cpus (#4334)Nataliia S.
2025-02-05vyos.ifconfig: T5103: revert change to del_addr() signatureChristian Breunig
An optional argument vrf_changed was added to the function signature but it was not put to use. We only need to restart DHCP client on add_addr().
2025-02-05vyos.ifconfig: T7135: only restart DHCPv6 client if neededChristian Breunig
Previously the DHCPv6 client was restarted on any change to the interface, including changes only to the interface description. Re-use pattern from IPv4 DHCP to only restart the DHCP client if necessary.
2025-02-05wireguard: T4930: remove pylint W0611: unused importChristian Breunig
2025-02-05vyos.ifconfig: T5103: force dhclient restart on VRF changeChristian Breunig
Moving an interface in, out or between VRFs will not re-install the received default route. This is because the dhclient binary is not restarted in the new VRF. Dhclient itself will report an error like: "receive_packet failed on eth0.10: Network is down". Take the return value of vyos.ifconfig.Interface().set_vrf() into account to forcefully restart the DHCP client process and optain a proper lease.
2025-02-05Merge pull request #4305 from c-po/syslog-T6989Christian Breunig
syslog: T6989: convert old configuration format to "advanced"
2025-02-04defaults: T6989: provide single source of systemd servicesChristian Breunig
Some systemd services are re-used over multiple configuration files. Keep a single source of the real systemd names and only reference them by dictionary keys.
2025-02-01vyconf: T6718: drop hybrid set/delete functionsJohn Estabrook
The 'hybrid' mode of vyconfd validation and Cstore commit is no longer needed, in preparation for full vyconfd support. Revert "vyconf: T6718: use vy_set/delete in configsession and util" This reverts commit 6999f85b2fc1c6e2421242e30e3810bd19250f3e.
2025-01-27opmode: T7084: reorganize the op mode cache format for ease of search (#4313)Daniil Baturin
* opmode: T7084: reorganize the op mode cache format for ease of search * opmode: T7084: normalize formatting
2025-01-27Merge pull request #4320 from indrajitr/vyos-t7052-2Daniil Baturin
dhcp: T7052: Fix remaining time evaluation and formatting errors
2025-01-26dhcp: T7052: Fix remaining time evaluation and formatting errorsIndrajit Raychaudhuri
The remaining time for a lease was not being correctly evaluated and formatted. As a result, expired leases show up with `show dhcp server leases`. Also, the empty hostname should be replaced by '-'.
2025-01-26T6998: Remove vestigial helper and reformatIndrajit Raychaudhuri
2025-01-26T6998: dhcpy.py - fix datetime to be timezone awaremetron2
2025-01-24Merge pull request #4200 from sskaje/T4930-1Daniil Baturin
T4930: Allow WireGuard peers via DNS hostname
2025-01-24Merge pull request #4216 from HollyGurza/T6641Daniil Baturin
T6641: Add vyos-network-event-logger Service
2025-01-21T6641: Add vyos-network-event-logger Servicekhramshinr
The service parses and logs network events for improved monitoring and diagnostics. Supported event types include: - `RTM_NEWROUTE`, `RTM_DELROUTE` - `RTM_NEWLINK`, `RTM_DELLINK` - `RTM_NEWADDR`, `RTM_DELADDR` - `RTM_NEWNEIGH`, `RTM_DELNEIGH`, `RTM_GETNEIGH` - `RTM_NEWRULE`, `RTM_DELRULE` Added operational mode commands for filtered log retrieval: - `show log network-event <event-type> <interface>`: Retrieve logs filtered by event type and interface. - `show interfaces <type> <name> event-log <event-type>`: Display interface-specific logs filtered by event type.
2025-01-21Merge pull request #4306 from jestabro/modular-reference-treeDaniil Baturin
T7046: add wrappers for reference tree utilities
2025-01-20Merge pull request #4307 from indrajitr/kea-refactorChristian Breunig
dhcp: T7052: Refactor kea dhcp op-mode functions to vyos.kea
2025-01-20Merge pull request #4302 from HollyGurza/T681Daniil Baturin
T681: Fix QoS DSCP filter
2025-01-19wireguard: T4930: drop unused WireGuardOperational().show_interface() methodChristian Breunig
Method is not referenced in the code base, remove dead code.
2025-01-19wireguard: T4930: use get_config_dict() rather then individual config queriesChristian Breunig
Extend ConfigTreeQuery().get_config_dict() with arguments to read in default CLI values, too. This removes the need for hardcoded default values at multiple places like: if max_dns_retry is None: max_dns_retry = 3 in this case.
2025-01-19wireguard: T4930: add mnemonic for WIREGUARD_REKEY_AFTER_TIMEChristian Breunig
WireGuard performs a handshake every WIREGUARD_REKEY_AFTER_TIME if data is being transmitted between the peers. If no data is transmitted, the handshake will not be initiated unless new data begins to flow. Each handshake generates a new session key, and the key is rotated at least every 120 seconds or upon data transmission after a prolonged silence.
2025-01-19wireguard: T4930: allow peers via FQDNsskaje
* set interfaces wireguard wgXX peer YY hostname <fqdn>
2025-01-16ruff: T6583: Reformat to comply with code styleIndrajit Raychaudhuri
2025-01-16dhcp: T7052: Refactor kea dhcp op-mode functions to vyos.keaIndrajit Raychaudhuri
Relocate the kea dhcp op-mode functions to kea helper functions in vyos.kea. This allows the functions to be reused by other scripts, not just op-mode wrappers. This moves the source of truth for the op-mode commands to the actual running kea instance, rather than VyOS config path. Also, apply some minor code cleanup and make some of the mappings consistent across the functions.
2025-01-15T7046: add wrappers for reference tree cache utilsJohn Estabrook
2025-01-15T7046: normalize formattingJohn Estabrook
2025-01-15remote: T7048: merge git environment with the os environmentRobert Gingras
allows utilizing ssh-agent and other environment-variable-based behavior customizations
2025-01-13T681: Fix QoS DSCP filterkhramshinr
The left shift operation aligns the DSCP/TOS value with its bit position in the IP header. TC expects a DSCP value with this shift
2025-01-09nhrp: T2326: NHRP migration to FRRaapostoliuk
NHRP migration to FRR
2025-01-08Merge pull request #4284 from indrajitr/simplify-T7016Daniil Baturin
T7016: Simplify logic for force deleting dynamic IPv4 address from interface
2025-01-07vyos.ifconfig: T7018: drop 'iftype' class attribute (#4280)Christian Breunig
Under very rare cases we can run into a race condition where interfaces are still in creation phase but are already referenced.. This can trigger: File "/usr/libexec/vyos/conf_mode/system_conntrack.py", line 270, in <module> apply(c) File "/usr/libexec/vyos/conf_mode/system_conntrack.py", line 249, in apply call_dependents() File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 147, in call_dependents f() File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 118, in func_impl run_config_mode_script(script, config) File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 106, in run_config_mode_script mod.verify(c) File "/usr/libexec/vyos//conf_mode/service_conntrack-sync.py", line 72, in verify if len(get_ipv4(interface)) < 1: ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/vyos/template.py", line 458, in get_ipv4 return Interface(interface).get_addr_v4() ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 334, in __init__ if not self.iftype: ^^^^^^^^^^^ AttributeError: 'Interface' object has no attribute 'iftype' This commit removes the code path in question and the class attribute check. The reason for the iftype attribute in the past was a common _create() method serving for all interface types. As we already have a lot of derived implementations and not all honor the classes iftype/type member - or even worse honor it only in 50% of the occurrences it's time to drop it.
2025-01-07Merge pull request #4253 from natali-rs1985/T6975Daniil Baturin
utils: T6975: Add 'vrf' and 'netns' arguments to functions in 'vyos.utils.process'
2025-01-06T7016: Simplify logic for force deleting dynamic IPv4 address from interfaceIndrajit Raychaudhuri
2025-01-06utils: T6975: Add 'vrf' and 'netns' arguments to functions in ↵Nataliia Solomko
'vyos.utils.process'
2025-01-06T6841: firewall: improve config parsing for ZBF when using VRFs and ↵Nicolas Fort
interfaces attached to VRFs