summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_system_flow-accounting.py
AgeCommit message (Collapse)Author
2026-07-30flow-accounting: T9122: reject a VRF as a netflow source-interfaceLee Clements
I had initially treated the VRF as just another interface that could be used as a source-interface, but after a bit more research none of the major vendors treat VRFs as interfaces - Cisco and Juniper both source a flow exporter from a routed interface and never from a VRF - and I don't think we should either. Reject a source-interface that names a VRF device with a clear message instead of the misleading "is not a member of VRF" error, and cover the rejection in the smoketest. VRF export continues to be selected through the "system flow-accounting vrf" node.
2026-07-30flow-accounting: T9122: bind NetFlow export to the configured VRFLee Clements
After the migration from pmacct to the ipt_NETFLOW kernel module the "system flow-accounting vrf" node no longer had any effect on the export path. NetFlow is emitted by the kernel module, so there is no daemon left to wrap in "ip vrf exec" and the module socket was never bound to the VRF. A collector reachable only inside a VRF therefore never received any flows when the export was configured with a source-address. Bind the export socket to a device via the ipt_NETFLOW "%device" destination suffix: a per-server source-interface takes precedence, otherwise the global VRF device is used, reproducing the previous "ip vrf exec" behaviour. The module parses "@source-address" before "%device", so the source-address is now rendered first - the previous template emitted them in the opposite order, which only worked because the two options are mutually exclusive per server. Reject a source-interface that is used together with a VRF but is not a member of that VRF: the exported flows would otherwise silently leave via a different routing table. This mirrors the existing OSPF, OSPFv3, IS-IS and BGP checks.
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-03-07T8186: netflow: add test for ver5 + IPv6Kyrylo Yatsenko
ipt_NETFLOW protocol version 5 is incompatible with IPv6. Add simple test for version 5.
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-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-16T75: migrate from pmacct to ipt_NETFLOWKyrylo Yatsenko
* Change nft to iptables in system_flow-accounting.py as ipt_NETFLOW is iptales plugin * Remove specific and non-relevant pmacct options * Add ipt_NETFLOW options * Move 'interfaces' to 'netflow' tree * Support more flexible 'source-address' and 'source-interface' for each server instead of one source * Add migration script * Update op mode command 'show flow-accounting' * Update op mode command 'restart flow-accounting'
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-01-21T6895: Merge the hsflowd-based sFlow and uacctd-based sFlow (#4310)Nataliia S.
2024-04-03T6199: drop unused Python importsChristian Breunig
found using "git ls-files *.py | xargs pylint | grep W0611"
2023-09-16conntrack: T5571: Refactor conntrack to be independent conf script from ↵sarthurdev
firewall, nat, nat66
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-07-15smoketest: T4532: Update smoketest flow-accountingViacheslav Hletenko
2022-05-21smoketest: flow-accounting: T4437: adjust smoketest to new generated config ↵Christian Poessinger
syntax
2022-04-25smoketest: bugfix on proper inheritance levels for classmethodChristian Poessinger
2022-03-01flow-accounting: T4277: support sending flow-data via VRF interfaceChristian Poessinger
It should be possible to send the gathered data via a VRF bound interface to the collector. This is somehow related to T3981 but it's the opposite side of the netflow process. set system flow-accounting vrf <name>
2021-12-31Merge branch 'firewall' of https://github.com/sarthurdev/vyos-1x into currentChristian Poessinger
* 'firewall' of https://github.com/sarthurdev/vyos-1x: zone_policy: T3873: Implement intra-zone-filtering policy: T2199: Migrate policy route op-mode to XML/Python policy: T2199: Migrate policy route to XML/Python zone-policy: T2199: Migrate zone-policy op-mode to XML/Python zone-policy: T2199: Migrate zone-policy to XML/Python firewall: T2199: Migrate firewall op-mode to XML/Python firewall: T2199: Migrate firewall to XML/Python
2021-12-26flow-accounting: T4097: move configuration file to /runChristian Poessinger
2021-12-26smoketest: flow-accounting: adjust to CLI change (source-address)Christian Poessinger
2021-12-25flow-accounting: T4097: move to get_config_dict()Christian Poessinger
2021-12-24smoketest: flow-accounting: add sflow and netflow testcasesChristian Poessinger
2021-12-06firewall: T2199: Migrate firewall to XML/Pythonsarthurdev
2021-11-21smoketest: flow-accounting: add initial - basic - testcaseChristian Poessinger