Re: [nft PATCH v3 0/2] JSON schema for nftables.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, May 27, 2019 at 12:02:38PM +0200, Pablo Neira Ayuso wrote:
> On Mon, May 27, 2019 at 11:57:20AM +0200, Phil Sutter wrote:
> > Hi Pablo,
> > 
> > On Fri, May 24, 2019 at 10:45:14PM +0200, Pablo Neira Ayuso wrote:
> > > On Wed, May 22, 2019 at 06:14:51PM +0200, Phil Sutter wrote:
> > > > Round three of JSON validation enhancement.
> > > > 
> > > > Changes since v2:
> > > > - Make enhancement to nftables module Python3 compliant.
> > > > - Complain in nft-test.py if --schema was given without --json.
> > > > 
> > > > Changes since v1:
> > > > - Fix patch 2 commit message, thanks to Jones Desougi who reported the
> > > >   inconsistency.
> > > > 
> > > > Changes since RFC:
> > > > - Import builtin traceback module unconditionally.
> > > > 
> > > > Phil Sutter (2):
> > > >   py: Implement JSON validation in nftables module
> > > >   tests/py: Support JSON validation
> > > > 
> > > >  py/Makefile.am       |  2 +-
> > > >  py/nftables.py       | 29 +++++++++++++++++++++++++++++
> > > >  py/schema.json       | 17 +++++++++++++++++
> > > >  py/setup.py          |  1 +
> > > >  tests/py/nft-test.py | 25 ++++++++++++++++++++++++-
> > > 
> > > Where is ruleset-schema.json?
> > > 
> > > +       "id": "http://netfilter.org/nftables/ruleset-schema.json";,
> > > +       "description": "libnftables JSON API schema",
> > 
> > Oh, I forgot about that. There are actually two problems with it: On one
> > hand, current draft version suggests to use "$id" instead of "id" for
> > the property name. On the other, the URL should point to an online
> > location of the document itself, which is obviously not correct.
> 
> We can upload it to exactly the location you specify above, that won't
> be a problem.

It is far from complete, so I guess that would be unnecessary work.
> 
> > Given that it is optional according to the draft, I would just drop it
> > for now. What do you think?
> 
> Drop for now is fine with fine.

If it's fine with fine it's finest with me, too! :D

I'll send a v4.

Thanks, Phil



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux