[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
<MN0PR18MB58472AF35605FF6FC96EE6DDD3FBA@MN0PR18MB5847.namprd18.prod.outlook.com>
Date: Thu, 30 Oct 2025 03:58:12 +0000
From: Ratheesh Kannoth <rkannoth@...vell.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "donald.hunter@...il.com" <donald.hunter@...il.com>
Subject: ynl with nftables.yaml
Hi List,
When I get below error, when I execute the example command mentioned in https://lwn.net/Articles/970364/ .
####################
root@...alhost:~/linux# ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/nftables.yaml --multi batch-begin '{"res-id": 10}' --multi newtable '{"name": "test", "nfgen-family": 1}' --multi newchain '{"name": "chain", "table": "test", "nfgen-family": 1}' --multi batch-end '{"res-id": 10}'
Traceback (most recent call last):
File "/root/linux/./tools/net/ynl/pyynl/cli.py", line 163, in <module>
main()
~~~~^^
File "/root/linux/./tools/net/ynl/pyynl/cli.py", line 123, in main
ynl = YnlFamily(spec, args.schema, args.process_unknown,
recv_size=args.dbg_small_recv)
File "/root/linux/tools/net/ynl/pyynl/lib/ynl.py", line 468, in __init__
super().__init__(def_path, schema)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/root/linux/tools/net/ynl/pyynl/lib/nlspec.py", line 462, in __init__
jsonschema.validate(self.yaml, schema)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/jsonschema/validators.py", line 1332, in validate
raise error
jsonschema.exceptions.ValidationError: 'set id' 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'][34]['attributes'][1]['name']:
'set id'
########################
root@...alhost:~/linux# pip show jsonschema
WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Name: jsonschema
Version: 4.25.1
Summary: An implementation of JSON Schema validation for Python
Home-page: https://github.com/python-jsonschema/jsonschema
Author:
Author-email: Julian Berman <Julian+jsonschema@...yVines.com>
License-Expression: MIT
Location: /usr/local/lib/python3.13/site-packages
Requires: attrs, jsonschema-specifications, referencing, rpds-py
Required-by:
root@...alhost:~/linux# python3 -V
Python 3.13.9
Powered by blists - more mailing lists