Re: [PATCH nft 2/4] py: add missing output flags.

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

 



On Thu, Oct 24, 2019 at 11:20:52AM +0200, Phil Sutter wrote:
> Hi,
> 
> On Wed, Oct 23, 2019 at 10:38:33PM +0200, Pablo Neira Ayuso wrote:
> > On Tue, Oct 22, 2019 at 09:58:53PM +0100, Jeremy Sowden wrote:
> > > `terse` and `numeric_time` are missing from the `output_flags` dict.
> > > Add them and getters and setters for them.
> > 
> > LGTM.
> > 
> > @Phil, is this fine with you? I let you decide on this.
> 
> I just pushed it. Could you please update Patchwork? I'm not allowed to.
> 
> > BTW, would it make sense at some point to remove all the getter/setter
> > per option and use the setter/getter flags approach as in libnftables?
> 
> Well, from a compat standpoint we can't remove them. The benefit of
> those setter/getter methods is the clean interface (user's don't have to
> memorize flag names) and the semantics of returning the old value. The
> latter comes in handy when changing flags temporarily.

Probably some transitioning? ie. add the generic set/get flag
interface. Update clients of this (Eric's code) to use. Leave the old
interfaces for a while there to make sure people have time to migrate.
Then remove them.

Anyway, I'm fine if you prefer this more verbose interface for python,
no issue.

> One could change the private __{g,s}et_output_flag() methods though and
> make them similar to {g,s}et_debug() methods which probably resemble the
> syntax you're looking for.

Hm, not sure what you mean.



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

  Powered by Linux