]> git.ipfire.org Git - thirdparty/nftables.git/commit
py: Implement JSON validation in nftables module
authorPhil Sutter <phil@nwl.cc>
Mon, 27 May 2019 11:36:41 +0000 (13:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 31 May 2019 16:17:36 +0000 (18:17 +0200)
commitef2ff133007855707f978f75ac638af3d5c06fbe
tree9e270cf8cf1e82499ce1b782eb1307bcb8570637
parent6d0c815e281c4edc539c535491d6425cf0f8edeb
py: Implement JSON validation in nftables module

Using jsonschema it is possible to validate any JSON input to make sure
it formally conforms with libnftables JSON API requirements.

Implement a simple validator class for use within a new Nftables class
method 'json_validate' and ship a minimal schema definition along with
the package.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
py/Makefile.am
py/nftables.py
py/schema.json [new file with mode: 0644]
py/setup.py