Re: [netconf] restconf collections

Kent Watsen <> Tue, 29 September 2020 17:44 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id DEFD73A0F4F for <>; Tue, 29 Sep 2020 10:44:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.895
X-Spam-Status: No, score=-1.895 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id qJm04KGHFL-u for <>; Tue, 29 Sep 2020 10:44:07 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 712B83A0F4E for <>; Tue, 29 Sep 2020 10:44:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono;; t=1601401446; h=From:Content-Type:Mime-Version:Subject:Date:References:To:In-Reply-To:Message-Id:Feedback-ID; bh=uQbIUe+Fshfng1x9nL0nbvd92LyVkRbsMfZYnB9wg3E=; b=lBUJVb19oGWik1dlMpO8SAXivnBUoc2VvfTPWlx131mA1pLDZMZA2zT74yVqHwdS Pkf6nvp6H0/mOc7CWBAMxjzy/MYJSZKca0xrLEhJWMLQ3yyEuTm4Aj1iO2L5x/kkiR+ AHlJsZeWNw3SgwRadpVLcY95evbMUv6KhjW646lg=
From: Kent Watsen <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_B9D46937-84EE-457D-8649-02B4B8AF5805"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.\))
Date: Tue, 29 Sep 2020 17:44:06 +0000
References: <> <> <> <> <> <>
To: "" <>
In-Reply-To: <>
Message-ID: <>
X-Mailer: Apple Mail (2.3608.
X-SES-Outgoing: 2020.09.29-
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 17:44:09 -0000

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)

	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

	- smart (e.g., netmask-based) filter/sorts is unlikely supportable
		- at least not without custom (not generic) code