linux/tools/net/ynl/tests
Jakub Kicinski 10c90f1bba tools: ynl: pyynl: pull the --family resolution logic into the lib
When packaging YNL as a system level utility we added a --family
argument which auto-resolves the full spec path from a well known
path in /usr/share. Spelling out full YAML spec files is at this
point only done in-tree, for example in the selftests which need
the very latest YAML. But the selftests have their own wrapping
classes for each family so test authors aren't really bothered
by having to spell the paths out.

Afford the same ease of use to the Python library users.
Move the path resolution from the CLI code to the library.
This simplifies the pyynl use by a lot:

  from pyynl import YnlFamily

  ynl = YnlFamily(family="netdev")

Unless I'm missing a trick, resolving the /usr/share path
is hard enough for most users to lean towards shelling out
to ynl CLI with --output-json, which is sad.

The ethtool script can now use family= instead of
resolving the path (the helpers are removed from cli.py
so this isn't just a cleanup).

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20260701021751.3234681-3-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-03 08:57:15 +02:00
..
.gitignore tools: ynl: add sample for wireguard 2026-04-14 11:48:04 -07:00
config tools: ynl: convert tc and tc-filter-add samples to selftest 2026-03-09 17:02:26 -07:00
devlink.c tools: ynl: convert devlink sample to selftest 2026-03-09 17:02:26 -07:00
devlink.sh tools: ynl: convert devlink sample to selftest 2026-03-09 17:02:26 -07:00
ethtool.c tools: ynl: convert ethtool sample to selftest 2026-03-09 17:02:26 -07:00
ethtool.py tools: ynl: pyynl: pull the --family resolution logic into the lib 2026-07-03 08:57:15 +02:00
ethtool.sh tools: ynl: convert ethtool sample to selftest 2026-03-09 17:02:26 -07:00
Makefile tools: ynl: move ethtool.py to selftest 2026-04-12 11:23:49 -07:00
netdev.c tools: ynl: convert netdev sample to selftest 2026-03-09 17:02:26 -07:00
ovs.c tools: ynl: convert ovs sample to selftest 2026-03-09 17:02:26 -07:00
rt-addr.c tools: ynl: convert rt-addr sample to selftest 2026-03-09 17:02:27 -07:00
rt-addr.sh tools: ynl: convert rt-addr sample to selftest 2026-03-09 17:02:27 -07:00
rt-link.c tools: ynl: convert rt-link sample to selftest 2026-03-09 17:02:26 -07:00
rt-route.c tools: ynl: convert rt-route sample to selftest 2026-03-09 17:02:27 -07:00
rt-route.sh tools: ynl: convert rt-route sample to selftest 2026-03-09 17:02:27 -07:00
tc.c tools: ynl: convert tc and tc-filter-add samples to selftest 2026-03-09 17:02:26 -07:00
test_ynl_cli.sh tools: ynl: add YNL test framework 2025-11-26 17:58:49 -08:00
test_ynl_ethtool.sh tools: ynl: move ethtool.py to selftest 2026-04-12 11:23:49 -07:00
wireguard.c tools: ynl: add sample for wireguard 2026-04-14 11:48:04 -07:00
ynl_nsim_lib.sh tools: ynl: add netdevsim wrapper library for YNL tests 2026-03-09 17:02:26 -07:00