Re: [netconf] Question on restconf empty list reply

Martin Björklund <mbj+ietf@4668.se> Tue, 25 February 2020 17:52 UTC

Return-Path: <mbj+ietf@4668.se>
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 3DCC73A1206 for <netconf@ietfa.amsl.com>; Tue, 25 Feb 2020 09:52:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.101
X-Spam-Level:
X-Spam-Status: No, score=-0.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_NAKED_TO_NUMERO=1.999, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=x8duAmR5; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=HNWKqD4d
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 9hozYQCaYys0 for <netconf@ietfa.amsl.com>; Tue, 25 Feb 2020 09:52:54 -0800 (PST)
Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 75F993A11FD for <netconf@ietf.org>; Tue, 25 Feb 2020 09:52:54 -0800 (PST)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id C573E6F6D; Tue, 25 Feb 2020 12:52:53 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 25 Feb 2020 12:52:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= 2n/IBM9xtypWNmg5P9SYHO7kq41cfU4stWctSIZEg0o=; b=x8duAmR5FsO7J4nI Jpaokndr7ryZiqvkHQm8fb7t7sUjdSf6kBmCgf4iDxww1calrIKNkMYN9BRavO2t ppVoVXfuhMxn+v9mMALB36ubIraAgkauZZ6j30I+UOaGx0KPvFqluIq5f+pPdV4d qHtvurShLexjKAOsM6GeeTeEhtcekOoUgJDvr3WfDP+qA9wHyaKSWZydVRwtB6bi pVAhQE36oPD7gU05Qz78pIQZDzocpKP+mYOI7D/ihiWfYBb/bGrRrlud5U8oDkLn 79SW/BA6jIX6+HPaIq1mAii/i0lMoeUnMRuqz5yzwnuMGxEOqx8jZvkBsM2OIS/y XuU05Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=2n/IBM9xtypWNmg5P9SYHO7kq41cfU4stWctSIZEg 0o=; b=HNWKqD4dazIydBaqeVeBRsWSv+GBAHIpwXul3uPjXaBrI2InAkCzY7Haj 1AGJ1iwM+Xe8SFeiBAuNGuzPgd4OvEnS4kGLgo4SszDo9EF1ZNXyn4uPfylCBpzu fm1PdQ1AeuuoDjzje5Kp5iut7CnyKl0k6HtplMSlEZhSpPRfk5UZ16TPBhe2rLVf UT3RtRIax3tq73VIWYmjD9fJNxiKgnbPPqg1TVQdDeyxbHGjWqVBIqth0aszNnr9 RRPojTQRc/Pim4oP0zmO47JknPkI6sAzE39QABHV00KEvUvmyBdK0X+fTuM3fbl9 fYKqbrb5acK4IuWbyiBEoTOQ6Ziww==
X-ME-Sender: <xms:9F5VXmnHgplsTz-AmM1iG7O3v0soSd-JxPBvXHsZyA7F-e8i_h2JQA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrledvgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffkffvuffhjghfofggtgfgsehtsg ertdertdejnecuhfhrohhmpeforghrthhinhcuuehjnphrkhhluhhnugcuoehmsghjodhi vghtfhesgeeiieekrdhsvgeqnecuffhomhgrihhnpehivghtfhdrohhrghenucfkphepud ehkedrudejgedrgedrgeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepmhgsjhdoihgvthhfseegieeikedrshgv
X-ME-Proxy: <xmx:9F5VXj21pZdAF-6cxRhWlwlHE7T9KJnohMoCnjc_E9ThcRluF-t5yA> <xmx:9F5VXvdhXwDLKD6kAg7yMDO4VYz55h2aEelVGI5kA6oRpCJMjkHBTw> <xmx:9F5VXtawxh7T2oVuo5Cn9_AeD3QHxv8vNs5XsxpOJn0SEh4Fir-O5g> <xmx:9V5VXofIR1S99Rt3_d0w4cnJyQgOsYWEgSlEYa5rrEERbQ3fAa0PdQ>
Received: from localhost (unknown [158.174.4.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 5EBCD3060BD1; Tue, 25 Feb 2020 12:52:52 -0500 (EST)
Date: Tue, 25 Feb 2020 18:52:51 +0100
Message-Id: <20200225.185251.2026161013381820378.id@4668.se>
To: jason.sterne@nokia.com
Cc: kent+ietf@watsen.net, mbj+ietf@4668.se, netconf@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <DM5PR08MB263324B403A0646E24484B4F9BEC0@DM5PR08MB2633.namprd08.prod.outlook.com>
References: <20200224.201727.524298611078512416.id@4668.se> <0100017078d1f020-3514ea16-953a-48d7-85f2-ab358f2553c9-000000@email.amazonses.com> <DM5PR08MB263324B403A0646E24484B4F9BEC0@DM5PR08MB2633.namprd08.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/-EzufEO8I0DSTAZChCxJBKqzuiw>
Subject: Re: [netconf] Question on restconf empty list reply
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, 25 Feb 2020 17:52:56 -0000

Hi,

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> wrote:
> Hi guys,
> 
> For NETCONF this should *not* return an error though right? It should just return an empty data set.
> 
> I don't know enough about RESTCONF but I'm surprised it would return
> an error in this case (too bad it would be inconsistent with
> NETCONF).

The protocol operation is different in NETCONF compared to RESTCONF.
In NETCONF, you would do a get-config or get-data with a _filter_.  In
RESTCONF, you ask for a specific _resoource_, and there is no resource
for a complete list.


/martin


> 
> Jason
> 
> > -----Original Message-----
> > From: netconf <netconf-bounces@ietf.org> On Behalf Of Kent Watsen
> > Sent: Monday, February 24, 2020 3:10 PM
> > To: Martin Björklund <mbj+ietf@4668.se>
> > Cc: netconf@ietf.org
> > Subject: Re: [netconf] Question on restconf empty list reply
> > 
> > > It should be 404, even if the list contains some entries.  The reason
> > > for this is that there is no resource for the list itself, only for
> > > list entries.  See section 3.5 of RFC 8040.
> > 
> > Assuming you mean the first paragraph not explicitly listing “list” and “leaf-
> > list”, that conflicts with Section 4.3, Paragraph 5.
> > 
> > 
> > > We used to have "collections" for this use case, but it was never finished.
> > 
> > :sigh:   ;)
> > 
> > 
> > Kent // contributor
> > 
> > _______________________________________________
> > netconf mailing list
> > netconf@ietf.org
> > https://www.ietf.org/mailman/listinfo/netconf