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

Robert Wilton <rwilton@cisco.com> Fri, 01 June 2018 10:48 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A312F1289B0 for <netconf@ietfa.amsl.com>; Fri, 1 Jun 2018 03:48:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
X-Spam-Status: No, score=-14.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xfm9rbrS78op for <netconf@ietfa.amsl.com>; Fri, 1 Jun 2018 03:48:00 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C9FB11276AF for <netconf@ietf.org>; Fri, 1 Jun 2018 03:47:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=18146; q=dns/txt; s=iport; t=1527850080; x=1529059680; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=DdvW/KavtNWwGGPJi2r4eIpGlq3gH7tySQ1b2AO5Eko=; b=Cb6U5ziXClJkWaHxdkaRArosrJYNJli6uclN7nqWPZyYE/aA9gS8ceNl BEZDWK5YxAklTOArk5TzCw1+qB9jMX1Xd0CfxDLbpNit/tfGA1gA/vclh HRpQmrRV6fMZHByb8itR9zElaDpKDId/GYK4CZcJBCBO6p+QDQBpXBv6H Y=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CAAQAQIxFb/xbLJq1cGQEBAQEBAQEBAQEBAQcBAQEBAYJOgVdtEiiMWo1gIZZECxgBCoQDRgKCJjgUAQIBAQEBAQECbBwMhSgBAQEDAQEBK0EQCwsYIA4nMAYBDAYCAQGDHgKBdwgPqA4fhDmDaIFjBYoSP4EzDIJdgxEBAYc0AphrCYhEhhcGgTyDd4JAhSGDTYgWhTSBWCGBUjMaCBsVO4JDixCFPz4wkGYBAQ
X-IronPort-AV: E=Sophos;i="5.49,465,1520899200"; d="scan'208,217";a="4248568"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2018 10:47:58 +0000
Received: from [10.63.23.83] (dhcp-ensft1-uk-vla370-10-63-23-83.cisco.com [10.63.23.83]) by aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id w51Alvhu001441; Fri, 1 Jun 2018 10:47:57 GMT
To: Rohit R Ranade <rohitrranade@huawei.com>, "netconf@ietf.org" <netconf@ietf.org>
References: <991B70D8B4112A4699D5C00DDBBF878A6BBB3AA8@dggeml510-mbx.china.huawei.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <39e13902-aff0-8af7-9770-31d075524fc2@cisco.com>
Date: Fri, 01 Jun 2018 11:47:57 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <991B70D8B4112A4699D5C00DDBBF878A6BBB3AA8@dggeml510-mbx.china.huawei.com>
Content-Type: multipart/alternative; boundary="------------3A37713C59990E38BDB27DF8"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/5RBi9TevQjdFmB22Y0Bn6B-nnXQ>
Subject: Re: [Netconf] [netconf] draft-ietf-netconf-nmda-netconf Filtering order
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Jun 2018 10:48:03 -0000

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
> Netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf