summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
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-29Use lcp_nl_resync instead of lcp_resync for control_vpp.pyViacheslav Hletenko
Use lcp_nl_resync (available with patch 04) 0004-Improved-lcp-resync.patch It improves sync speed and should fix or smoketest issues related to connecting to VPP API speed
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-27Use common class for none ethernet interfaces stateViacheslav Hletenko
2025-01-27utils: T7095: make wrapper use_shell aware and only utilize if vrf or netns ↵Robert Gingras
are requested
2025-01-27utils: T7095: remove unused `auth` parameterRobert Gingras
2025-01-27Merge pull request #4320 from indrajitr/vyos-t7052-2Daniil Baturin
dhcp: T7052: Fix remaining time evaluation and formatting errors
2025-01-27Add common interface stateViacheslav Hletenko
2025-01-27Bonding: Use common class for the interface stateViacheslav Hletenko
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-24GRE: Add ability to configure multipoint modeViacheslav Hletenko
Add ability to configure multipoint mode. Remote IP address in this case has to be 0.0.0.0 Only one tunnel with the same source IP is allowed in the point-to-multipoint mode set vpp interfaces gre gre0 mode 'point-to-multipoint' set vpp interfaces gre gre0 remote '0.0.0.0' set vpp interfaces gre gre0 source-address '192.0.2.1'
2025-01-24GRE: Add tunnel-type erspan, l3 and tebViacheslav Hletenko
Add tunnel type - erspan - l3 - teb (Transparent Ethernet Bridge) By default L3 GRE interfaces cannot be bridged to a bridge interface. Add the ability to change tunnel type. set vpp interfaces gre gre2 tunnel-type 'teb'
2025-01-21bonding: set interface state up after addingViacheslav Hletenko
By default VPP creates interface via API with the 'down' state. Add methods to set interface state UP/DOWN. It probably should reuse the common Class in the future. We do not have classes for interface (vpp) state settings.
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-14vpp: add example of adding vxlan kernel_addViacheslav Hletenko
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-11Use VPPControl for the show class interfacesViacheslav Hletenko
2025-01-11Move VPPContron to interface initViacheslav Hletenko
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-07Add vyos-vpp CLI and python3 modulesViacheslav Hletenko
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