Re: [Netconf] Clarification on Netconf behavior

Jan Lindblad <janl@tail-f.com> Thu, 22 November 2018 09:00 UTC

Return-Path: <janl@tail-f.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 684E0130ED1 for <netconf@ietfa.amsl.com>; Thu, 22 Nov 2018 01:00:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 bUb6pAimgO2h for <netconf@ietfa.amsl.com>; Thu, 22 Nov 2018 01:00:27 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 02C81130E3A for <netconf@ietf.org>; Thu, 22 Nov 2018 01:00:25 -0800 (PST)
Received: from [10.147.40.181] (unknown [173.38.220.47]) by mail.tail-f.com (Postfix) with ESMTPSA id 090151AE018C; Thu, 22 Nov 2018 10:00:21 +0100 (CET)
From: Jan Lindblad <janl@tail-f.com>
Message-Id: <08ECEF54-02CE-4899-8990-BB60FCD1385C@tail-f.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_073B358C-7EE9-4A07-B748-674170C5B172"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Thu, 22 Nov 2018 10:00:20 +0100
In-Reply-To: <585C70E3-915D-42C7-AFEF-A3C924E89AC4@nokia.com>
Cc: Netconf <netconf@ietf.org>
To: "Xavier Pruno, Pratibha (Nokia - IN/Bangalore)" <pratibha.xavier_pruno@nokia.com>
References: <585C70E3-915D-42C7-AFEF-A3C924E89AC4@nokia.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/0xzwHWye4ghzoYKOAlZ705kwRAQ>
Subject: Re: [Netconf] Clarification on Netconf behavior
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 22 Nov 2018 09:00:31 -0000

Pratibha,

Your unfiltered query returns "test_subtree" as one of the xconnect-group names:

>           <xconnect-group>
>             <name>test_subtree</name>


Your query filter requests " test_subtree " for the xconnect-group name:

>             <xconnect-group>
>              <name> test_subtree </name>

There is no entry by that name in the device, so empty data is returned. Whitespace is significant.

/jan


> On 21 Nov 2018, at 19:36, Xavier Pruno, Pratibha (Nokia - IN/Bangalore) <pratibha.xavier_pruno@nokia.com> wrote:
> 
> Hi Experts,
>  
>   I have a cisco node (Cisco XRv) and when I do the following sub-tree, it gives me an output as below (it correct and expected). When I do a subtree filter with content match and if the content match node is the only element , what is the expected behavior? I am getting an empty data. Is this correct or are we expected to get the content-match tag in the response.
>  
>  
> REQUEST:
> =======
> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>   <get-config>
>     <source>
>       <running/>
>     </source>
>     <filter>
>       <l2vpn xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg <http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg>">
>         <database>
>           <xconnect-groups>
>             <xconnect-group/>
>           </xconnect-groups>
>         </database>
>       </l2vpn>
>     </filter>
>   </get-config>
> </rpc>
>  
> RESPONSE:
> =========
> <nc:rpc-reply message-id="urn:uuid:d32553aa-4474-46a2-b759-ded48c8d9064" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>   <nc:data>
>     <l2vpn xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg <http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg>">
>       <database>
>         <xconnect-groups>
>           <xconnect-group>
>             <name>test_subtree</name>
>           </xconnect-group>
>           <xconnect-group>
>             <name>sdsdsd</name>
>           </xconnect-group>
>           <xconnect-group>
>             <name>mdc_abc</name>
>           </xconnect-group>
>           <xconnect-group>
>             <name>mdc_test</name>
>           </xconnect-group>
>           <xconnect-group>
>             <name>DemoEline</name>
>             <p2p-xconnects>
>               <p2p-xconnect>
>                 <name>DemoEline</name>
>                 <p2p-description>DEMOFORELINE</p2p-description>
>               </p2p-xconnect>
>             </p2p-xconnects>
>           </xconnect-group>
>           <xconnect-group>
>             <name>Uday_test</name>
>           </xconnect-group>
>           <xconnect-group>
>             <name>Eline_GRPC</name>
>             <p2p-xconnects>
>               <p2p-xconnect>
>                 <name>Eline_GRPC</name>
>                 <attachment-circuits>
>                   <attachment-circuit>
>                     <name>GigabitEthernet0/0/0/1.777</name>
>                     <enable/>
>                   </attachment-circuit>
>                 </attachment-circuits>
>                 <pseudowires>
>                   <pseudowire>
>                     <neighbor>
>                       <neighbor>38.120.234.239</neighbor>
>                       <class>tunnel-te777</class>
>                     </neighbor>
>                     <pseudowire-id>999</pseudowire-id>
>                   </pseudowire>
>                 </pseudowires>
>               </p2p-xconnect>
>             </p2p-xconnects>
>           </xconnect-group>
>           <xconnect-group>
>             <name>Xconnect_today</name>
>           </xconnect-group>
>           <xconnect-group>
>             <name>DemoElineSwitching111</name>
>             <p2p-xconnects>
>               <p2p-xconnect>
>                 <name>DemoElineSwitching111</name>
>                 <attachment-circuits>
>                   <attachment-circuit>
>                     <name>GigabitEthernet0/0/0/1.40090051</name>
>                     <enable/>
>                   </attachment-circuit>
>                 </attachment-circuits>
>                 <pseudowires>
>                   <pseudowire>
>                     <neighbor>
>                       <neighbor>38.120.234.236</neighbor>
>                       <class>Tunnel519</class>
>                     </neighbor>
>                     <pseudowire-id>4009</pseudowire-id>
>                   </pseudowire>
>                 </pseudowires>
>               </p2p-xconnect>
>             </p2p-xconnects>
>           </xconnect-group>
>           <xconnect-group>
>             <name>DemoElineSwitching519</name>
>             <p2p-xconnects>
>               <p2p-xconnect>
>                 <name>DemoElineSwitching519</name>
>                 <attachment-circuits>
>                   <attachment-circuit>
>                     <name>GigabitEthernet0/0/0/1.4006</name>
>                     <enable/>
>                   </attachment-circuit>
>                 </attachment-circuits>
>                 <pseudowires>
>                   <pseudowire>
>                     <neighbor>
>                       <neighbor>38.120.234.236</neighbor>
>                       <class>Tunnel519</class>
>                     </neighbor>
>                     <pseudowire-id>4006</pseudowire-id>
>                   </pseudowire>
>                 </pseudowires>
>               </p2p-xconnect>
>             </p2p-xconnects>
>           </xconnect-group>
>         </xconnect-groups>
>       </database>
>     </l2vpn>
>   </nc:data>
> </nc:rpc-reply>
>  
> Subtree filtering (with content match)
> =============================
> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>   <get-config>
>     <source>
>       <running/>
>     </source>
>     <filter>
>       <l2vpn xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg <http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg>">
>         <database>
>           <xconnect-groups>
>             <xconnect-group>
>              <name> test_subtree </name>
>             </xconnect-group>
>                </xconnect-groups>
>         </database>
>       </l2vpn>
>     </filter>
>   </get-config>
> </rpc>
>  
> Response:  
> ========
>  
> <nc:rpc-reply message-id="urn:uuid:bfbf91f3-728e-4766-acff-66ad1e43ec98" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>   <nc:data/>
> </nc:rpc-reply>
>  
> Is this correct as per RFC ??
>  
> Pratibha
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org <mailto:Netconf@ietf.org>
> https://www.ietf.org/mailman/listinfo/netconf <https://www.ietf.org/mailman/listinfo/netconf>