linux/tools/net/ynl/pyynl
Donald Hunter 362d051c90 tools: ynl: add schema checking
Add a --validate flag to pyynl for explicit schema check with error
reporting and add a schema_check make target to check all YNL specs.

make -C tools/net/ynl schema_check
make: Entering directory '/home/donaldh/net-next/tools/net/ynl'
ok 1 binder.yaml schema validation
not ok 2 conntrack.yaml schema validation
'labels mask' does not match '^[0-9a-z-]+$'

Failed validating 'pattern' in schema['properties']['attribute-sets']['items']['properties']['attributes']['items']['properties']['name']:
    {'type': 'string', 'pattern': '^[0-9a-z-]+$'}

On instance['attribute-sets'][14]['attributes'][22]['name']:
    'labels mask'

ok 3 devlink.yaml schema validation
[...]

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20251127123502.89142-2-donald.hunter@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-28 19:53:19 -08:00
..
lib tools: ynl: Add MAC address parsing support 2025-11-18 18:42:09 -08:00
.gitignore
__init__.py
cli.py tools: ynl: add schema checking 2025-11-28 19:53:19 -08:00
ethtool.py tools: ynl: avoid print_field when there is no reply 2025-10-27 18:16:49 -07:00
ynl_gen_c.py tools: ynl-gen: add regeneration comment 2025-11-25 19:20:42 -08:00
ynl_gen_rst.py tools: ynl_gen_rst.py: drop support for generating index files 2025-08-12 07:47:30 +02:00