Subject: [Netconf] Clarification on Netconf behavior

From: "Xavier Pruno, Pratibha (Nokia - IN/Bangalore)" <[email-masked]>
Date: Wed, 21 Nov 2018 18:36:19 +0000

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">
        <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">
      <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">
        <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

---

From: Jan Lindblad <[email-masked]>
Date: Thu, 22 Nov 2018 10:00:20 +0100

Pratibha,

>              <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) <[email-masked]> wrote:
> 
> Hi Experts,
>  
>       <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:
> =========
>     <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>
>       <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>
> _______________________________________________
> Netconf mailing list
> [email-masked] <mailto:[email-masked]>
> https://www.ietf.org/mailman/listinfo/netconf <https://www.ietf.org/mailman/listinfo/netconf>

---

From: "Xavier Pruno, Pratibha (Nokia - IN/Bangalore)" <[email-masked]>
Date: Thu, 22 Nov 2018 09:22:10 +0000

Hi Jan,

  There is no whitespace in the query (typo in the email).

Yes unfiltered query returns “test_subtree”. While filtered query for any hierarchy that has single element (name) returns empty data (e.g test_subtree,mdc_abc, mdc_test).While for filtered query for “DemoEline” we get the expected output.

RFC doesn’t directly talk about the expected behavior in this case.

Pratibha
From: Jan Lindblad <[email-masked]>
Date: Thursday, 22 November 2018 at 2:30 PM
To: "Xavier Pruno, Pratibha (Nokia - IN/Bangalore)" <[email-masked]>
Cc: Netconf <[email-masked]>
Subject: Re: [Netconf] Clarification on Netconf behavior

Pratibha,

          <xconnect-group>

            <xconnect-group>

/jan

On 21 Nov 2018, at 19:36, Xavier Pruno, Pratibha (Nokia - IN/Bangalore) <[email-masked]<mailto:[email-masked]>> wrote:

Hi Experts,

REQUEST:
=======

RESPONSE:
=========

Response:
========

Pratibha
_______________________________________________
Netconf mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/netconf