summaryrefslogtreecommitdiff
path: root/src/services
AgeCommit message (Collapse)Author
2025-07-08T7499: expose destructive merge in http-apiJohn Estabrook
2025-07-03T7588: move blocking function to threadpool to allow asyncJohn Estabrook
Refactor the blocking code in config handlers (endpoints /configure, /config-file) to run in a threadpool; this allows defining the handler as async. Consequently, the handler itself runs in the main thread, avoiding the need for thread registration for libvyosconfig function calls.
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-06-23T7570: add missing list of scripts to be committed, needed for configdepJohn Estabrook
2025-06-10configd: T7488: allow distinction of first-order error verify vs applyJohn Estabrook
Leave hint if vyos-configd encounters an error in the generate/apply stages: this only detects 'first-order' differences, meaning those originating from the called config mode script, and not its dependencies. This is useful for supporting automatic rollback for certain cases of apply stage error.
2025-05-29http-api: T3955: add commit-confirm to endpoints /configure /config-fileJohn Estabrook
2025-05-29Merge pull request #4530 from jestabro/api-extend-load-mergeChristian Breunig
http-api: T7498: allow passing config string in body of 'load' or 'merge' request
2025-05-28http-api: T7498: allow passing config string in body of 'merge' requestJohn Estabrook
2025-05-28http-api: T7498: allow passing config string in body of 'load' requestJohn Estabrook
2025-05-28T7395: Add support for renew in REST ServerIDerr
2025-05-07T7386: firewall: allow mix of IPv4 and IPv6 addresses/prefixes/ranges in ↵Mark Hayes
remote groups
2025-04-14Merge pull request #4440 from sarthurdev/fqdn_cacheSimon
firewall: T7333: Use separate cache keys per inet family
2025-04-13T7355: cleanup unused Python3 importsChristian Breunig
Some unused import statements sneaked into the codebase. This is about cleaning them up
2025-04-08firewall: T7333: Use separate cache keys per inet familysarthurdev
Cache keys were shared by IPv4/IPv6 resolution, causing script to try populate ipv6 sets with ipv4 addresses
2025-04-08T7302: implement commit dry-run for vyconfd/commitdJohn Estabrook
2025-04-03T7272: drop unneeded fieldsJohn Estabrook
2025-03-21firewall: T5493: Implement remote-groupAlex W
2025-03-16T7121: add vyos-commitd service as emergent replacement for vyos-configdJohn Estabrook
vyos-commitd exchanges messages with vyconfd, to replace the shim redirection of legacy commands to vyos-configd.
2025-03-06T4406: Add public API endpoint to display informationoniko94
2025-02-17firewall: T7176: Fix vyos-domain-resolver not respecting interval/cache ↵Alex W
configuration
2025-01-31configd: T7119: fix misleading debug messagesJohn Estabrook
An artifact of T6899 included a report of 'error_code 1' on success: for consistency with shim error codes 1 == SUCCESS, however, the debug message is misleading and is here corrected.
2025-01-31configd: T7119: normalize formattingJohn Estabrook
2025-01-25wireguard: T7087: Fix vyos-domain-resolver failing if no wireguard ↵Alex W
interfaces defined
2025-01-24Merge pull request #4200 from sskaje/T4930-1Daniil Baturin
T4930: Allow WireGuard peers via DNS hostname
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-19wireguard: T4930: fix dict key (-/_) when working with config dictChristian Breunig
Retrieving the config dict sets key_mangling(), thus we need to look for host_name instead of host-name.
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-06configd: T6747: use one long-lived instance of FRRender (#4274)Christian Breunig
* smoketest: T6747: call wait after commit() only for FRR related tests Commit 702a60a8de28 ("smoketest: T6746: wait after commit() until frr-reload is no longer running") added a guard timeout for every commit executed via CLI smoketests. This commit changes the bahavior to only add the guard timeout for FRR related testscases. This improves the overall smoketest time. * configd: T6747: use one long-lived instance of FRRender Previously there was one FRRender() instance per config session. This resulted in re-rendering the FRR configuration every time a new config session was created. Example: vyos@vyos:~$ configure vyos@vyos# set interfaces dummy dum0 description foo vyos@vyos# commit vyos@vyos# exit vyos@vyos:~$ configure vyos@vyos# set interfaces dummy dum0 description bar vyos@vyos# commit vyos@vyos# exit In the past this caused a re-render of the FRR configuration as the delta check added in commit ec80c75d6776 ("frrender: T6746: only re-render FRR config if config_dict did change") evaluated to false, as it operated on a new instance of the FRRender class. With this change there is no FRR re-render, as there is nothing to update in FRR.
2024-12-30frr: T6746: additional improvements after 10.2 upgrade (#4259)Christian Breunig
* smoketest: T6746: add substring search in getFRRconfig() Some daemons (e.g. bgpd) have several nested substrings/sections like router bgp 100 address-family ipv4 unicast .. exit-address-family exit We can now use getFRRconfig() with the substring option to extract only address-family ipv4 unicast .. exit-address-family Making config validation more granular * frrender: T6746: only re-render FRR config if config_dict did change * frrender: T6746: fix naming glitch isis/eigrp * frrender: T6746: add --stdout option when running with debug flags * smoketest: T6746: remove unneeded commit_guard time It was an invalid workarround as the underlaying issue seems to be a race condition in CStore. The commit process is not finished until all pending files from VYATTA_CHANGES_ONLY_DIR are copied to VYATTA_ACTIVE_CONFIGURATION_DIR. This is done inside libvyatta-cfg1 and the FUSE UnionFS part. On large non-interactive commits FUSE UnionFS might not replicate the real state in time, leading to errors when querying the working and effective configuration. TO BE DELETED AFTER SWITCH TO IN MEMORY CONFIG
2024-12-30T6983: treat vyos-domain-resolver as a real service (#4261)Christian Breunig
* op-mode: T6983: add "show log" and "monitor log" commands for vyos-domain-resolver * firewall: T6983: drop unused variable domain_resolver_usage_nat * T6983: introduce Python logging module in vyos-domain-resolver * T6983: treat vyos-domain-resolver as a real service
2024-12-18frrender: T6746: move get_frrender_dict from vyos.configdict to this moduleChristian Breunig
Keep all FRRender stuff in one place.
2024-12-18vyos-configd: T6746: render resulting FRR configuration only onceChristian Breunig
Previously the FRR configuration was rendered via Jinja2 on every call to get_frrendet_dict() - but it was used/applied only once. We save the CPU cycles and render the FRR configuration only once prior to applying it in FRR.
2024-12-16configd: T6746: handle FRR config reload as last step in commitChristian Breunig
2024-12-16frr: T6746: integrate FRRender class into vyos-configdChristian Breunig
When running under vyos-configd only a single apply() is done as last step in the commit algorithm. FRRender class address is provided via an attribute from vyos-configd process.
2024-11-19configd: T6899: use multipart message instead of extra exchangeJohn Estabrook
2024-10-21Merge branch 'current' into T6695Nataliia S.
2024-10-18pki: T4914: Rewrite the PKI op mode in the new styleNataliia Solomko
2024-10-11T6695: Machine-readable operational mode support for tracerouteNataliia Solomko
2024-10-03http-api: T6736: sanitize error message containing user inputJohn Estabrook
2024-09-30http-api: T6736: normalize formattingJohn Estabrook
2024-09-29http-api: T6736: regenerate openapi docsJohn Estabrook
2024-09-29http-api: T6736: remove routes on config deleteJohn Estabrook
Avoid duplicate entries in the list of routes when adding/deleting endpoints.
2024-09-29http-api: T6736: separate REST API and GraphQL API activationJohn Estabrook
The GraphQL API was implemented as an addition to the existing REST API. As there is no necessary dependency, separate the initialization of the respective endpoints. Factor out the REST Pydantic models and FastAPI routes for symmetry and clarity.
2024-09-29http-api: T6736: update for deprecated/renamed in Pydantic V2John Estabrook
2024-09-22configd: T6608: report uncaught config script exceptions as commit errorJohn Estabrook
In the case of config mode script exceptions other than ConfigError, vyos-configd would previously trigger the shim to re-run the script in the CLI context. The use of config dependencies require this case to return a commit error. A traceback is returned as output, consistent with running without vyos-configd support.
2024-09-20http-api: T6326: return full warning/error output through apiJohn Estabrook
Configuration error output is not returned in full to the http-api when running under vyos-configd, due to an early implementation 'workaround' of vyos-configd writing directly to the session tty. This is corrected to return all ambient stdout (notably vyos.base.Warning) and error messages directly to the originating caller, which may be from a session tty or a ConfigSession instance. As the http-api runs in the latter case, the full output is returned.
2024-08-25configd: T6671: track scripts proposed and scripts calledJohn Estabrook
2024-08-20Merge pull request #3977 from natali-rs1985/T5743-currentChristian Breunig
T5743: HTTPS API ability to import PKI certificates
2024-08-13T5743: HTTPS API ability to import PKI certificatesNataliia Solomko