| Internet-Draft | NETCONF Pagination Support | October 2026 |
| Watsen, et al. | Expires 12 April 2027 | [Page] |
This document defines a mapping of the list pagination mechanism defined in [I-D.ietf-netconf-list-pagination] to NETCONF [RFC6241].¶
This document updates [RFC6241], to augment the <get> and <get-config> "rpc" statements, and [RFC8526], to augment the <get-data> "rpc" statement, to define input parameters necessary for list pagination.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 12 April 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document defines a mapping of the list pagination mechanism defined in [I-D.ietf-netconf-list-pagination] to NETCONF [RFC6241].¶
This document updates [RFC6241] and [RFC8526], as described in Section 3.¶
While the pagination mechanism defined in this document is designed for the NETCONF protocol [RFC6241], the augmented RPCs MAY be used by the RESTCONF protocol [RFC8040] if the RESTCONF server implements the "ietf-list-pagination-nc" module.¶
The YANG data model in this document conforms to the Network Management Datastore Architecture defined in [RFC8342]¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Various examples in this document use "BASE64VALUE=" as a placeholder value for binary data that has been base64 encoded (per Section 9.8 of [RFC7950]). This placeholder value is used because real base64 encoded structures are often many lines long and hence distracting to the example being presented.¶
The :list-pagination capability indicates that the client supports paging over optionally filtered and/or sorted entries of YANG modeled "list" and "leaf-list" nodes.¶
The :list-pagination capability is identified by the following URN:¶
urn:ietf:params:netconf:capability:list-pagination:1.0¶
The <get> and <get-config> rpc statements are augmented to accept additional input parameters, as described in Section 4.¶
The <get-data> rpc statement is augmented to accept additional input parameters, as described in Section 4.¶
In order for NETCONF to support [I-D.ietf-netconf-list-pagination], this document extends the operations <get>, <get-config> and <get-data> to include additional input parameters and output annotations, as described by the following tree diagram [RFC8340] for the "ietf-netconf-list-pagination" module:¶
module: ietf-list-pagination-nc
augment /nc:get/nc:input:
+---w list-pagination
+---w where? union {where}?
+---w locale? string
+---w sort-by? union {sort-by}?
+---w direction? enumeration
+---w offset? uint32 {offset}?
+---w cursor? string
+---w limit? union
+---w sublist-limit? union
augment /nc:get-config/nc:input:
+---w list-pagination
+---w where? union {where}?
+---w locale? string
+---w sort-by? union {sort-by}?
+---w direction? enumeration
+---w offset? uint32 {offset}?
+---w cursor? string
+---w limit? union
+---w sublist-limit? union
augment /ncds:get-data/ncds:input:
+---w list-pagination
+---w where? union {where}?
+---w locale? string
+---w sort-by? union {sort-by}?
+---w direction? enumeration
+---w offset? uint32 {offset}?
+---w cursor? string
+---w limit? union
+---w sublist-limit? union
¶
Comments:¶
These eight RPC input parameters, corresponding to those defined in Sections 3.1 and 3.2 in [I-D.ietf-netconf-list-pagination] are grouped under a container called "list-pagination", which is only allowed to appear if the "filter" RPC input parameter targets a "list" or "leaf-list" node supporting list pagination.¶
Per the conformance defined in Section 3.1 of [I-D.ietf-netconf-list-pagination], all of these parameters MUST be supported for all "config true" lists and leaf-lists, and SHOULD be supported for "config false" lists and leaf-lists. A server MAY disable the support for some or all "config false" lists, as described in Section 3.3 of [I-D.ietf-netconf-list-pagination].¶
Note that complex pagination with combination of RPC input parameters may cause performance strain on constrained devices due to intensive processing on both the server and the client.¶
The "limit" RPC input parameter corresponds to the "limit" parameter defined in Section 3.1.7 of [I-D.ietf-netconf-list-pagination].¶
The "offset" RPC input parameter corresponds to the "offset" parameter defined in Section 3.1.5 of [I-D.ietf-netconf-list-pagination].¶
The "cursor" RPC input parameter corresponds to the "cursor" parameter defined in Section 3.1.6 of [I-D.ietf-netconf-list-pagination]. As described in Section 3.1.5 of [I-D.ietf-netconf-list-pagination] the server does not keep any stateful information about the "next" and "previous" cursor or the current page. Due to their ephemeral nature, cursor values are never cached.¶
The "direction" RPC input parameter corresponds to the "direction" parameter defined in Section 3.1.4 of [I-D.ietf-netconf-list-pagination].¶
The "sort-by" RPC input parameter corresponds to the "sort-by" parameter defined in Section 3.1.2 of [I-D.ietf-netconf-list-pagination].¶
The "locale" RPC input parameter corresponds to the "locale" parameter defined in Section 3.1.3 of [I-D.ietf-netconf-list-pagination].¶
The "where" RPC input parameter corresponds to the "where" parameter defined in Section 3.1.1 of [I-D.ietf-netconf-list-pagination].¶
The XPath expression in the "where" RPC input parameter is evaluated according to the validation rules defined in Section 8.9.1 of [RFC6241], with the context node being the targeted list or leaf-list node.¶
Prefixes MUST be declared as XML namespace prefixes bound to the namespace URIs of corresponding YANG modules. The prefix SHOULD be the prefix of the associated source module, as described by Section 7.1.4 of [RFC7950].¶
The "sublist-limit" RPC input parameter corresponds to the "sublist-limit" parameter defined in Section 3.2.1 of [I-D.ietf-netconf-list-pagination].¶
The "ietf-netconf-list-pagination-nc" module defines conceptual definitions within groupings, which are not meant to be implemented as datastore contents by a server.¶
This module has normative references to [RFC6241], [RFC6243], [RFC6991], and [RFC8342].¶
<CODE BEGINS> file "ietf-list-pagination-nc@2026-10-09.yang"¶
module ietf-list-pagination-nc {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc";
prefix lpgnc;
import ietf-netconf {
prefix nc;
reference
"RFC 6241: Network Configuration Protocol (NETCONF)";
}
import ietf-netconf-nmda {
prefix ncds;
reference
"RFC 8526: NETCONF Extensions to Support the
Network Management Datastore Architecture";
}
import ietf-list-pagination {
prefix lpg;
reference
"RFC XXXX: List Pagination for YANG-driven Protocols";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
Author: Kent Watsen
<kent+ietf@watsen.net>
Author: Qin Wu
<bill.wu@huawei.com>
Author: Per Andersson
<per.ietf@ionio.se>
Author: Olof Hagsand
<olof@hagsand.se>
Author: Hongwei Li
<flycoolman@gmail.com>";
description
"This module augments the <get>, <get-config>, and <get-data>
'rpc' statements to support list pagination.
Copyright (c) 2026 IETF Trust and the persons identified
as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Revised
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision 2026-10-09 {
description
"Initial revision.";
reference
"RFC XXXX: NETCONF Extensions to Support List Pagination";
}
augment "/nc:get/nc:input" {
description
"Allow the 'get' operation to use content filter
parameter for specifying the YANG list or leaf-list
that is to be retrieved";
uses lpg:pagination-parameters;
}
augment "/nc:get-config/nc:input" {
description
"Allow the 'get-config' operation to use content filter
parameter for specifying the YANG list or leaf-list
that is to be retrieved";
uses lpg:pagination-parameters;
}
augment "/ncds:get-data/ncds:input" {
description
"Allow the 'get-data' operation to use content filter
parameter for specifying the YANG list or leaf-list
that is to be retrieved";
uses lpg:pagination-parameters;
}
}
¶
<CODE ENDS>¶
This document registers one capability identifier URN in the "Network Configuration Protocol (NETCONF) Capability URNs" registry:¶
Index
Capability Identifier
------------------------
:list-pagination
urn:ietf:params:netconf:capability:list-pagination:1.0¶
IANA is requested to register the following URI in the "ns" registry within the "IETF XML Registry" group [RFC3688]:¶
URI: urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace.¶
IANA is requested to register the following YANG module in the "YANG Module Names" registry [RFC6020] within the "YANG Parameters" registry group.¶
name: ietf-list-pagination-nc Maintained by IANA? N namespace: urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc prefix: pgnc Reference: RFCXXXX¶
This section follows the template defined in Section 3.7.1 of [RFC8407].¶
The YANG module specified in this document defines a schema for data that is designed to be accessed via network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC8446].¶
The Network Configuration Access Control Model (NACM) [RFC8341] provides the means to restrict access for particular NETCONF users to a preconfigured subset of all available NETCONF protocol operations and content.¶
The security considerations for the base NETCONF protocol operations (see Section 9 of [RFC6241] and Section 6 of [RFC8526]) apply to the extension of operations <get>, <get-config>, and <get-data> defined in this document.¶
The examples within this document use the "example-social" YANG module defined in Appendix A.1 of [I-D.ietf-netconf-list-pagination].¶
The Example Data Set used by the examples is defined in Appendix A.2 of [I-D.ietf-netconf-list-pagination].¶
This example mimics that Appendix A.3.9 of [I-D.ietf-netconf-list-pagination]. In this XML example, The xmlns:es attribute binds the "es" prefix to the example-social module name. The urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc namespace is used for the list-pagination RPC input parameters.¶
=============== NOTE: '\' line wrapping per RFC 8792 ================
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="42">
<get>
<source>
<running/>
</source>
<filter type="xpath" select="/es:members/es:member"
xmlns:es="https://example.com/ns/example-social"/>
<list-pagination
xmlns="urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc">
<where
xmlns:es="https://example.com/ns/example-social">//es:stats[\
starts-with(joined,'2020')]</where>
<sort-by>joined</sort-by>
<direction>backwards</direction>
<offset>2</offset>
<limit>2</limit>
<sublist-limit>1</sublist-limit>
<locale>sv_US</locale>
</list-pagination>
</get>
</rpc>
¶
Response from the NETCONF server:¶
=============== NOTE: '\' line wrapping per RFC 8792 ================
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<members
xmlns="https://example.com/ns/example-social"
xmlns:lp="urn:ietf:params:xml:ns:yang:ietf-list-pagination">
<member lp:remaining="1" lp:locale="en_US">
<member-id>eric</member-id>
<email-address>eric@example.com</email-address>
<password>$0$1543</password>
<avatar>BASE64VALUE=</avatar>
<tagline>Go to bed with dreams; wake up with purpose.</tagli\
ne>
<following>alice</following>
<posts>
<post>
<timestamp>2020-09-17T18:02:04Z</timestamp>
<title>Son, brother, husband, father</title>
<body>What's your story?</body>
</post>
</posts>
<favorites>
<bits lp:remaining="2" lp:locale="en_US">two</bits>
</favorites>
<stats>
<joined>2020-09-17T19:38:32Z</joined>
<membership-level>pro</membership-level>
<last-activity>2020-09-17T18:02:04Z</last-activity>
</stats>
</member>
<member lp:remaining="1" lp:locale="en_US">
<member-id>bob</member-id>
<email-address>bob@example.com</email-address>
<password>$0$1543</password>
<avatar>BASE64VALUE=</avatar>
<tagline>Here and now, like never before.</tagline>
<posts>
<post lp:remaining="2" lp:locale="en_US">
<timestamp>2020-08-14T03:32:25Z</timestamp>
<body>Just got in.</body>
</post>
</posts>
<favorites>
<decimal64-numbers lp:remaining="1" lp:locale="en_US">3.14\
159</decimal64-numbers>
</favorites>
<stats>
<joined>2020-08-14T03:30:00Z</joined>
<membership-level>standard</membership-level>
<last-activity>2020-08-14T03:34:30Z</last-activity>
</stats>
</member>
</members>
</data>
</rpc-reply>
¶
This work has benefited from the discussions of RESTCONF resource collection over the years, in particular, [I-D.ietf-netconf-restconf-collection] which provides enhanced filtering features for the retrieval of data nodes with the GET method and [I-D.zheng-netconf-fragmentation] which document large size data handling challenge. The authors would like to thank the following for lively discussions on list (ordered by first name): Andy Bierman, Martin Björklund, Robert Varga, and Robert Wilton.¶