Re: [netconf] restconf collections

Martin Björklund <> Tue, 29 September 2020 18:57 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C14223A10DE for <>; Tue, 29 Sep 2020 11:57:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.101
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.997, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key) header.b=VjUDkJSx; dkim=pass (2048-bit key) header.b=saxUjLmm
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 42jnSPrsb44e for <>; Tue, 29 Sep 2020 11:57:16 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 992CD3A10DD for <>; Tue, 29 Sep 2020 11:57:16 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal []) by mailout.nyi.internal (Postfix) with ESMTP id 04F295C00B1; Tue, 29 Sep 2020 14:57:14 -0400 (EDT)
Received: from mailfrontend2 ([]) by compute4.internal (MEProxy); Tue, 29 Sep 2020 14:57:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm2; bh= IEUbirBii9aBvXM1v3VdeI7gH9eeCcTYXD3/WvtizWY=; b=VjUDkJSxJlCv8B0X EgtrNO2dQSleDHL9k41cTgyl5prV/gAa/5R96Jnw1hUQOPkvtbVQykMAs9I6jbtz TjjKOh2eZC48/HmhHSxZJgVNqpCjt8ifMuJnFS9kjOhnQgdzHwiN1zG+brCdtEI4 QpYcPKBdT5IcyL1ospp+H0vfP35Siffei55/+Q8Ae/oj8X0oAUJSyG13Q/TOchdd VHyK5CZ1FhDiZ/AxcjlDDKeNeZ82RlYbFD+vENudYadKEOf73B83cOc9QnWTGooP 7au6lh6lYqHBhMbd5aZ5mNJaBI/3mGuV0TwiyXpjxeiDS0S2TrehZ7aFRvs0wVRs LueIrw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=; 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=fm3; bh=IEUbirBii9aBvXM1v3VdeI7gH9eeCcTYXD3/Wvtiz WY=; b=saxUjLmmNHOUDKWFJro/uO5xeSGD81jfgWFZ9Jx/5ek2CZQTRklTbxXAX r3MKSyFimd+ThQcdHjj/n/t3mEuTS7tcLptDOM27Jd0AYJkDj1wg5fUStauzA+M8 drI3zsbjcXtmlY3IcOJ5BxDcav5NVXNmf50go2Cqpfp2bevjEkSoSgSrQAZxMx4T ZL799Qqn9Nj4LnklQrYi+yNewRVrWgIPitQtoQENsYz6aaKSNZKb22/jroOc+yg4 N2MsA0xz4Jxa/sVxWZmhbPIICqVPnuvscrbQgfTOely3KLn/XcvobTjG7yrdoRVG DwZZYpASZS0shJj8JUVXtiXoGW+Gg==
X-ME-Sender: <xms:iINzXyPiKXNonukJRkiQ2GL6BxmkKnPPVeZRPCBwNwlC0snjQKyBNA> <xme:iINzXw_XOsQcdFsVDY5DxwKDXr1Qo3RDnD3002Q65AYIC08oPQkgrlMKf5ExlWn4d _FYXiaJHvl2vGgDte4>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdekgddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffkffvuffhjghfofggtgfgsehtsg ertdertdejnecuhfhrohhmpeforghrthhinhcuuehjnphrkhhluhhnugcuoehmsghjodhi vghtfhesgeeiieekrdhsvgeqnecuggftrfgrthhtvghrnhepheetgedtfffggeffkedvje ekveelteeuuddttdffhfelgfetvdevhedvgeeutddunecukfhppeduheekrddujeegrdeg rddvudehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgsjhdoihgvthhfseegieeikedrshgv
X-ME-Proxy: <xmx:iINzX5RjeaXLDWa3ToxIfkUjD3kM20sSJCFQyafnRe-RXZJibf0dtg> <xmx:iINzXyvKee1llpU3KX1jN7EoC2hLzh0A9aLP65mrz6anewgfT1qyuA> <xmx:iINzX6d6ZW56Ofwdcuo2_CE1ReRYyjM39N0vcVrFRngbAoYlQY0DSA> <xmx:iYNzX8o8F61Ut8VG5F1oy1tUph_hAOYgqfX-N7ND6nVv8J0e9ZtbWQ>
Received: from localhost (unknown []) by (Postfix) with ESMTPA id 4E97A3064610; Tue, 29 Sep 2020 14:57:12 -0400 (EDT)
Date: Tue, 29 Sep 2020 20:57:10 +0200
Message-Id: <>
From: Martin Björklund <>
In-Reply-To: <>
References: <> <> <>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <>
Subject: Re: [netconf] restconf collections
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 29 Sep 2020 18:57:18 -0000


Kent Watsen <> wrote:
> Firstly, thank you to those that responded showing interest in working
> on these I-Ds.  If anyone else is interested, please send me a PM.
> Regarding solution, I want to take one more stab at a sketch here, as
> a last-chance for comments before the authors dive into producing the
> I-Ds.
> Already it is assumed that there will be an RPC for NC, and query
> params for RC…that not what this email is about.
> Here’s my proposal:
> 	For all lists;
> 		a) “limit” or “count”
> 		b) “offset" or “skip”
> 		c) “direction”  (i.e., forward/backward)
> 	For non “ordered-by user” lists, but only for indexable columns:
> 		d) “sort-by” or “ordered-by” (single column max)
> 		e) “where” or “filter” (compound expression of some sort)

I don't think d) and e) should be restricted to obu lists, and I don't
think they should be restricted to "indexable" columns.

And I think "expression of some sort" should be XPath.

Also, since the main objective is efficient retrieval, "sort-by"
can perhaps be removed.  Consider large lists in operational state
that also change often.

> 	Note: the lowercase “or” is just for the label selected (no semantic
> 	impact).
> The order of operation is “e —> a”.  That is, first the filter is
> applied (if any), then the sort is applied (if any), then the
> direction is applied (if any), then the offset/skip is applied (if
> any), and then the limit/count is applied (if any).
> Now the tricky stuff.
> 	- “key” and “unique” leafs are indexed by default, assuming
> 	  the leaf’s base type is indexable
> 	- a special extension is used to index other nodes
> 	- other indexable nodes must be a “leaf"
> 	- the leaf must be “mandatory true”
> 	- the leaf must not be under a “list” or “choice” node
> 	- the leaf must have an indexable base type
> 		- all built-in types supported except:
> 			- binary
> 			- instance-identifier
> 		- unions are indexable, but assumes all values stored
> 		   as a “string” in the DB.
> 		- “string” types may be coerced into more DB-friendly types
> 			- “yang:date-and-time” mapped to a DB “DateTime” type
> Cons:
> 	- smart (e.g., netmask-based) filter/sorts is unlikely supportable
> 		- at least not without custom (not generic) code

We could define a few more XPath functions for such comparisons.


> Comments?
> K.