[Netconf] Clarification about subtree filtering
Shiva Kumar Pathori <pathori@gmail.com> Thu, 17 May 2018 18:24 UTC
Return-Path: <pathori@gmail.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 BFE7412D947 for <netconf@ietfa.amsl.com>; Thu, 17 May 2018 11:24:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 bWShMP6214ig for <netconf@ietfa.amsl.com>; Thu, 17 May 2018 11:24:05 -0700 (PDT)
Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 721A112D945 for <netconf@ietf.org>; Thu, 17 May 2018 11:24:05 -0700 (PDT)
Received: by mail-oi0-x22c.google.com with SMTP id y15-v6so4838414oia.13 for <netconf@ietf.org>; Thu, 17 May 2018 11:24:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1cS3sXqbiBCIV6dqhERFVWwhfxD+pUQqciCwAENkCdI=; b=HurgGFh6P1N1igGmsr+LDckY4Y19khj7pNVWDg9/oW10/4CAJqHtW7qNjVfdFHcOZ9 bjQSgIiQzWBEcXbKMCK9Ky2ruIF4gf4JruTsSnVMK8LROX0XoSQL8luTLw5XqNC1RhcT 7a0SNq3lwpHVk8WdvF3stIhIyk4mQ33kmgjCmyaHB/3NRL2/yr/aSESlMI6+FibOI4W5 WPdnuaSMz7V21Z8zvIO7ATtVTVVWso4OTLAkzQz7KZEItHmaTjnWCBamB4nhEyhVGJub 4/oPdRmZaKK4bplrIPT38UVyUDAPYqktLkPqM/rGk9dsP00qvI2UUnlDspLLAh4lVYOo lTXQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1cS3sXqbiBCIV6dqhERFVWwhfxD+pUQqciCwAENkCdI=; b=mzSmN7pwJhI00L6fdx1CzYCu7rgPvovIuI3NrONdK5SmiYg31sZb+EOzsK4EHP/E/l eLJsKtfe+Hi0sls6kHtI2Kugui7nf6/H7WuD7qjJZX/U7jP2NQhm6tIx+uD4GTNM2uJl hTGzgUvgW8Oj6ypVLWmOjYVON1IRu6Uafa8NDiaYh1OKE/S9vHFGTEteMVQu+DmmcwO8 OaQgl46PbmN5D4BUYSQ5xdY2Unx/RbUi7YXgcV0KIWA1qmShpGxthnpn4+8lIreU80JR 2DDPcmMbsyuqiPslKapwnmpt6DDV9rk4zbL4jB6+LFjKxeCAETlZAMqDENIp475YS1Nm JXkw==
X-Gm-Message-State: ALKqPwc37Fc5Csd9Pnw3WVd5YEK8ZLbr240DiTp6hzNEDWr0YzffyN3h VRc2WlPufdCItqnyg5TTsM/0HXX/kUFvulGGdVfRCA==
X-Google-Smtp-Source: AB8JxZq8ADZI4uAemZ9+knHAmrAbBpuRj2jmcnOn4Rw0Owuns1CKRIsxtQ38two2wqFS554RDE5/Hcz6sicI8BqYDgs=
X-Received: by 2002:aca:1b11:: with SMTP id b17-v6mr3951989oib.173.1526581444630; Thu, 17 May 2018 11:24:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9d:424:0:0:0:0:0 with HTTP; Thu, 17 May 2018 11:24:04 -0700 (PDT)
From: Shiva Kumar Pathori <pathori@gmail.com>
Date: Thu, 17 May 2018 23:54:04 +0530
Message-ID: <CAJtYN8+WZjtjrhmGcNWTcpqFCcmwLNjT0LtRU_U8+x-EZhSwCA@mail.gmail.com>
To: netconf@ietf.org
Content-Type: multipart/alternative; boundary="000000000000ba5f55056c6af01c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/g-5dV8RGEqAytoCb5E1dnZaw_rM>
Subject: [Netconf] Clarification about subtree filtering
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: Thu, 17 May 2018 18:24:08 -0000
Hi, Can somebody clarify what could be the response for the <get-config> operation provided below. Following is the user information in the datastore that is provided in the RFC 6241 as example. > <rpc message-id="101" > xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > <get-config> > <source> > <running/> > </source> > <filter type="subtree"> > <top xmlns="http://example.com/schema/1.2/config"> > <users/> > </top> > </filter> > </get-config> > </rpc> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > <data> > <top xmlns="http://example.com/schema/1.2/config"> > <users> > <user> > <name>root</name> > <type>superuser</type> > <full-name>Charlie Root</full-name> > <company-info> > <dept>1</dept> > <id>1</id> > </company-info> > </user> > <user> > <name>fred</name> > <type>admin</type> > <full-name>Fred Flintstone</full-name> > <company-info> > <dept>2</dept> > <id>2</id> > </company-info> > </user> > <user> > <name>barney</name> > <type>admin</type> > <full-name>Barney Rubble</full-name> > <company-info> > <dept>2</dept> > <id>3</id> > </company-info> > </user> > </users> > </top> > </data> > </rpc-reply> *The <get-config> operation with content-match at parent and child nodes;* <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > <get-config> > <source> > <running/> > </source> > <filter type="subtree"> > <top xmlns="http://example.com/schema/1.2/config"> > <users> > <user> > <type>admin</name> > <company-info> > <dept>1</dept> > </company-info> > </user> > </users> > </top> > </filter> > </get-config> > </rpc> *The equivalent XPATH expression : * > <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > <get-config> > <source> > <running/> > </source> > <filter xmlns:t="http://example.com/schema/1.2/config" > type="xpath" > > select="/t:top/t:users/t:user[t:type='admin']/t:company-info[t:dept=’1’]"/> > </get-config> > </rpc> For this what could be the response a) The response based on content-match nodes are AND-ed together > <rpc-reply message-id="101" > xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > <data> > </data> > </rpc-reply> OR b) The response based on content-match nodes treated separately > <rpc-reply message-id="101" > xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > <data> > <top xmlns="http://example.com/schema/1.2/config"> > <users> > <user> > <name>fred</name> > <type>admin</type> > <full-name>Fred Flintstone</full-name> > </user> > <user> > <name>barney</name> > <type>admin</type> > <full-name>Barney Rubble</full-name> > </user> > </users> > </top> > </data> > </rpc-reply> Regards, Shiva
- [Netconf] Clarification about subtree filtering Shiva Kumar Pathori