Re: [Netconf] Clarification on Netconf behavior

"Xavier Pruno, Pratibha (Nokia - IN/Bangalore)" <pratibha.xavier_pruno@nokia.com> Thu, 22 November 2018 09:22 UTC

Return-Path: <pratibha.xavier_pruno@nokia.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 0B41F130E00 for <netconf@ietfa.amsl.com>; Thu, 22 Nov 2018 01:22:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.359
X-Spam-Level:
X-Spam-Status: No, score=-3.359 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.46, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.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 xMuqiUBIY0vk for <netconf@ietfa.amsl.com>; Thu, 22 Nov 2018 01:22:14 -0800 (PST)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20099.outbound.protection.outlook.com [40.107.2.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9BF7C12F1AB for <netconf@ietf.org>; Thu, 22 Nov 2018 01:22:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W/2AwtigKnBBAdSvm9by2wwW+eUb2OhT6hjnEmMZFAw=; b=ds0Mhp415ZjU12ob64ntHfSyMy4Sf+R9w/bB5KKHdm3tirG6lMCY3R/08W6tMmlOl0OE3n6U8SrU/n2VaFoBK2+hsZW7BFqAAhbQujHxMnz48M5jfkZYULpOIcBuGothZFdVcn1vC1J4/U/MN6EWS7ZMSpGIPHoZcy7HZK4GBd8=
Received: from HE1PR07MB4428.eurprd07.prod.outlook.com (20.176.167.145) by HE1PR07MB3081.eurprd07.prod.outlook.com (10.170.244.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.11; Thu, 22 Nov 2018 09:22:10 +0000
Received: from HE1PR07MB4428.eurprd07.prod.outlook.com ([fe80::b47c:c985:93c8:e9a]) by HE1PR07MB4428.eurprd07.prod.outlook.com ([fe80::b47c:c985:93c8:e9a%5]) with mapi id 15.20.1382.007; Thu, 22 Nov 2018 09:22:10 +0000
From: "Xavier Pruno, Pratibha (Nokia - IN/Bangalore)" <pratibha.xavier_pruno@nokia.com>
To: Jan Lindblad <janl@tail-f.com>
CC: Netconf <netconf@ietf.org>
Thread-Topic: [Netconf] Clarification on Netconf behavior
Thread-Index: AQHUgckYYdZMToXDIEKEW1PbeIK3tqVbgAQAgABiSIA=
Date: Thu, 22 Nov 2018 09:22:10 +0000
Message-ID: <590415DB-8068-4E8F-B89D-A68FDEBDA04E@nokia.com>
References: <585C70E3-915D-42C7-AFEF-A3C924E89AC4@nokia.com> <08ECEF54-02CE-4899-8990-BB60FCD1385C@tail-f.com>
In-Reply-To: <08ECEF54-02CE-4899-8990-BB60FCD1385C@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.13.0.181109
x-originating-ip: [135.245.121.6]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; HE1PR07MB3081; 6:HtpZrJ9m3LBZsCzioH5pyuwteh0FCCTwUXduJUJ1fJ2IgzI/02fR9RwWqfQjfuaZ4vZC9m+zSo7+tLMxOxpDWjmoa+JuAvTiMMJDQPh+anp1ea8IBCDzcCsrN37mMLu71lCTVy6JWuPQUM/AvZDRQPtWAU804qO9SZNo8U67LvRRsRaK8T2dINZaLy8aTBz08JA6tNCJz+juDHif7xZ/iyNQv0DKaLHwl5wGtFpPVHIRZFbaOr8vgETcOpisixKj+PFdc9VUZyn/oDMshtYW0VF5rzDq1ccGxDQdR48B6W6HXFMTTMekgq1lqyLwl59cN9Lb5Yj8PoIOdDx2ReGc73Jy6Hfn7b+G8oXt0kaVCJuGdoHd3H5ZxUSkDz7XjTYtPT67ive9sze9SIaXaXr3raSxxfT87A5lfryJptBXi7R8LQaaQKZdkqbW9nHA/5mbGd3BrzEqZ9ON8vkFh+XeNg==; 5:EBiQggicw7pA0EaxM5vJ06TqLGwYu1pXaPg4nRfko/mVtRm5qbuKDxZWj+aGF2kvtph3cxtGGwiX9k4R9toBn70MtM9PDDtRQ0K9piN9EwTPp6hOVj0bfabzlcddVaZyToHOimn4TtEuE3uikwe8I/UAulLfd5UWUg5IX0EuiFY=; 7:ZaTGzMoIceyuzvoGC66p2NzvMr0zR8qOslK6yHcEHXl3BHG1YaoiKb4yTnmOLMlZyoeFLhsPKxc30hmdlj1K3/5KavOlsteuhQoGVG5jfMfybNIWG45tXX+W91f0+BahJ9YDE8s6IH52LDfadLPx6A==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 4c3f2485-01ab-485b-ec8d-08d6505bfb22
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:HE1PR07MB3081;
x-ms-traffictypediagnostic: HE1PR07MB3081:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=pratibha.xavier_pruno@nokia.com;
x-microsoft-antispam-prvs: <HE1PR07MB308152C6A1F73A3D06B84CB3D4DB0@HE1PR07MB3081.eurprd07.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231442)(11241501184)(806099)(944501410)(4982022)(52105112)(3002001)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:HE1PR07MB3081; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB3081;
x-forefront-prvs: 0864A36BBF
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(396003)(366004)(376002)(346002)(39860400002)(189003)(199004)(6916009)(58126008)(11346002)(2900100001)(446003)(316002)(71190400001)(476003)(71200400001)(2616005)(966005)(186003)(14444005)(5024004)(83716004)(99286004)(76176011)(5660300001)(33656002)(486006)(7736002)(53546011)(6506007)(229853002)(256004)(26005)(82746002)(6486002)(86362001)(8936002)(53946003)(606006)(236005)(25786009)(106356001)(68736007)(102836004)(105586002)(6512007)(478600001)(4326008)(6306002)(54896002)(14454004)(9326002)(53936002)(3846002)(2906002)(790700001)(6116002)(53376002)(8676002)(6246003)(6436002)(97736004)(66066001)(81156014)(81166006)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR07MB3081; H:HE1PR07MB4428.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: yB74gZdvl0nLowGgo22YKon/TEOGnMcyyCd/ydrtWYiY0+vXukPKZb4ytNiC0g1ME6NYqSpr1R9SNkUW6f1D4FcDUa57suYZKIWNsF1lqF/zLT5LnOQdeIwww90jmHAy//bFeTvE+qTWaAdV8JGGIJOrqfCG/R1i9Zs7lLzRtTqPwoXapgXC1/51VD0okJbWW8droP5sTK/5srZvQRtbg7RoJ6nuFZNp0fBZydC6AoBTXxQUE1f+9psB8NK+7tHdklZoIqjpyoS9+w5ubzGHvzpocynVEgqdmqUdydWC25El4MFmUEYdtok1Yk1fb1MTjtxFLdDAKZ5vfumPGRJgnWivmcjziW2MrIDRsCvIx88=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_590415DB80684E8FB89DA68FDEBDA04Enokiacom_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4c3f2485-01ab-485b-ec8d-08d6505bfb22
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 09:22:10.4009 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3081
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/4FpdBT60nUTAgwvJWdCCw4sj694>
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:22:17 -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 <janl@tail-f.com>
Date: Thursday, 22 November 2018 at 2:30 PM
To: "Xavier Pruno, Pratibha (Nokia - IN/Bangalore)" <pratibha.xavier_pruno@nokia.com>
Cc: Netconf <netconf@ietf.org>
Subject: Re: [Netconf] Clarification on Netconf behavior

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