Re: [netconf] subtree filter any namespace
Martin Bjorklund <mbj@tail-f.com> Tue, 11 February 2020 08:00 UTC
Return-Path: <mbj@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 C718012008F for <netconf@ietfa.amsl.com>; Tue, 11 Feb 2020 00:00:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-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 N1l93prVd8NZ for <netconf@ietfa.amsl.com>; Mon, 10 Feb 2020 23:59:59 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id E5D88120044 for <netconf@ietf.org>; Mon, 10 Feb 2020 23:59:58 -0800 (PST)
Received: from localhost (unknown [173.38.220.37]) by mail.tail-f.com (Postfix) with ESMTPSA id B5C021AE018B; Tue, 11 Feb 2020 08:59:55 +0100 (CET)
Date: Tue, 11 Feb 2020 08:59:17 +0100
Message-Id: <20200211.085917.2142620937359879949.mbj@tail-f.com>
To: chopps@chopps.org
Cc: netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <6131477C-9EE3-499E-966A-A9ADB6FF8CD9@chopps.org>
References: <6131477C-9EE3-499E-966A-A9ADB6FF8CD9@chopps.org>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/CLWCiHMIDEs9h3VFgVQt9bocWj4>
Subject: Re: [netconf] subtree filter any namespace
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG 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: Tue, 11 Feb 2020 08:00:01 -0000
Hi, Christian Hopps <chopps@chopps.org> wrote: > I've been adding subtree to xpath conversion to my netconf python > client/server code (with some help from others), and in trying to get > the "any" namespace stuff working I ran into an issue. > > The client code was setting the default namespace to > 'xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"' on the top XML rpc > message element. This had an unwanted side-effect of placing > everything in a sub-tree filter then into the netconf namespace (if > none were given). As a work-around I created the filter element with a > blank default namespace; however, I'm not sure this is correct, i.e., > > <get> > <filter xmlns=''> > ... users specified filter ... > </filter> > </get> This is not correct since it says that "filter" is in the "" namespace. > The correct thing is probably to not set the default namespace in the > client code; however, I'm not sure I can do this now for backward > compatible reasons. I could do it perhaps if the user specified a > filter, but I'm curious if it's valid to just set it to > blank. Googling produced conflicting answers for me. I don't know how your code works but you need to end up with somthing like: <rpc xmls="urn:ietf:params:xml:ns:netconf:base:1.0"> <get> <filter> <top-node-1 xmlns=""> ... </top-node-1> <top-node-2 xmlns=""> ... </top-node-2> </filter> </get> </rpc> OR <nc:rpc xmls:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <nc:get> <nc:filter> <top-node-1> ... </top-node-1> <top-node-2> ... </top-node-2> </nc:filter> </nc:get> </nc:rpc> /martin > > Thanks, > Chris. > _______________________________________________ > netconf mailing list > netconf@ietf.org > https://www.ietf.org/mailman/listinfo/netconf >
- [netconf] subtree filter any namespace Christian Hopps
- Re: [netconf] subtree filter any namespace Martin Bjorklund
- Re: [netconf] subtree filter any namespace Christian Hopps