Subject: Re: [Netconf] [netconf] draft-ietf-netconf-nmda-netconf Filtering order

From: Robert Wilton <[email-masked]>
Date: Fri, 1 Jun 2018 11:47:57 +0100

Hi Rohit,

Please see inline ..

On 31/05/2018 09:53, Rohit R Ranade wrote:
>
> Hi All,
>
> Consider a case where user purposefully gave conflicting filters. For eg :
>
> lGive data-store as <operational>
>
> lorigin-filter=default
>
> lwith-defaults=trim
>
> I know this is not a valid use-case for User, but since there are 
> filters which are of type “select X/ select all except X”, I wanted to 
> get the ordering correct.
>
> Now in such case, consider two order of applying filters,
>
> 1)Consider that we apply origin-filter=default first, then all the 
> leaf having default values along with their keys will be selected. 
> Then when with-defaults=trim is applied, all the leaf are trimmed and 
> only the Keys will remain in selection output.
>
> 2)Consider that we apply with-defaults=trim first, then all records 
> without their default values for leaf will remain. Next when apply 
> origin-filter=default, since there are no default-valued leaf, all the 
> records will be filtered out. So nothing selected.
>

For (1) I don't think that origin-filter=default selects the parent 
containers/keys unless they are also origin=default.  Instead, I think 
that there parent containers/lists+keys are effectively 
constructed/returned on demand, i.e. only if one of the selected child 
nodes (with origin=default) are being returned.

Thus I think that for this specific example, no elements should be 
returned regardless of which order the filters are applied.

Thanks,
Rob

> Now in the draft, it is mentioned that filter criteria are logically 
> AND’ed.
>
> First criteria : Select default origin leaf
>
> Second criteria : Donot select default leaf
>
> According to my understanding, If we AND these criteria, we end up 
> getting “DONOT select default leaf”. So we should apply order 2) .. 
> Order 1) is not a valid order in this case then. Your thoughts ?
>
> With Regards,
>
> Rohit R Ranade
>
>
>
> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf