Re: [netmod] [Netconf] Open source filtering code?

Radek Krejčí <rkrejci@cesnet.cz> Wed, 28 February 2018 08:47 UTC

Return-Path: <rkrejci@cesnet.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0A67D126B7E; Wed, 28 Feb 2018 00:47:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.31
X-Spam-Level:
X-Spam-Status: No, score=-4.31 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cesnet.cz
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 MMmpbr00vmdP; Wed, 28 Feb 2018 00:47:22 -0800 (PST)
Received: from office2.cesnet.cz (office2.cesnet.cz [IPv6:2001:718:1:101::144:244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BE7601243F6; Wed, 28 Feb 2018 00:47:22 -0800 (PST)
Received: from pckrejci.nat9.vcit.vutbr.net (unknown [IPv6:2001:67c:1220:80c:d0:552c:73a5:18da]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id A3ABC400067; Wed, 28 Feb 2018 09:47:18 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1519807639; bh=joyVaDSemFL0sKvJMPE6QLsCjYgTevu5z1bs/8Tum7Y=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=cjNX2oKkQtofpl+eZ/ZNQPXP5u+LuioB3GSdGJcwuXZLdHBxNAvNU6dZguJFJRF1G r2pIslDWnGuRzx4sct5/2VuO/vPHDgGyquC5qbbDRiKasrXrHPex2CBuDL4BrbRiCh HSYUyWwM0/71n7Qrvk12ACi55k1QImFEKVuzVkdE=
To: Mikael Abrahamsson <swmike@swm.pp.se>, Christian Hopps <chopps@chopps.org>
Cc: "netconf@ietf.org" <netconf@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
References: <87o9ke9o63.fsf@chopps.org> <87vaemarb5.fsf@chopps.org> <alpine.DEB.2.20.1802260934170.26947@uplift.swm.pp.se>
From: =?UTF-8?B?UmFkZWsgS3JlasSNw60=?= <rkrejci@cesnet.cz>
Message-ID: <ae3cb87c-352e-5d88-2765-1b564154e451@cesnet.cz>
Date: Wed, 28 Feb 2018 09:47:18 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2
MIME-Version: 1.0
In-Reply-To: <alpine.DEB.2.20.1802260934170.26947@uplift.swm.pp.se>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/79_0A61BMy0iInnlHgROa7cZQTY>
Subject: Re: [netmod] [Netconf] Open source filtering code?
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Feb 2018 08:47:25 -0000

Hi,
NETCONF filtering is actually implemented in our Netopeer2 NETCONF server (where we use libyang to represent YANG data). libyang implements XPath on its data structures representing YANG data, so XPath filtering is really straightforward. Subtree filtering is implemented by transforming subtree filter into XPath expressions. libyang has also Python bindings, so you could use it even in Python code.

Regards,
Radek


Dne 26.2.2018 v 09:38 Mikael Abrahamsson napsal(a):
> On Sat, 24 Feb 2018, Christian Hopps wrote:
>
>>
>> Still interested in any answers to this query; however, I thought I would followup..
>
> Have you looked at libyang ?
>
> https://github.com/CESNET/libyang
>
> It's heavily used in Sysrepo/Netopeer2 for all the YANG related functions.
>