<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc linkmailto="no" ?>
<?rfc editing="no" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext include-index="no" ?>
<!--<?rfc strict="no"?> -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-awwhl-netconf-list-pagination-snapshot-00" category="std" consensus="true" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.19.4 -->
  <front>
    <title abbrev="List Pagination Snapshots">
        List Pagination Snapshots for YANG-driven Protocols
    </title>
    <seriesInfo name="Internet-Draft" value="draft-awwhl-netconf-list-pagination-snapshot-00"/>
    <author fullname="Per Andersson" initials="P." surname="Andersson">
      <organization>Cisco Systems</organization>
      <address>
        <email>perander@cisco.com</email>
      </address>
    </author>
    <author fullname="Kent Watsen" initials="K." surname="Watsen">
      <organization>Watsen Networks</organization>
      <address>
        <email>kent+ietf@watsen.net</email>
      </address>
    </author>
    <author fullname="Qin Wu" initials="Q." surname="Wu">
      <organization>Huawei Technologies</organization>
      <address>
        <!--
        <postal>
          <street>101 Software Avenue, Yuhua District</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code>210012</code>
          <country>China</country>
        </postal>
        -->
        <email>bill.wu@huawei.com</email>
      </address>
    </author>
    <author fullname="Olof Hagsand" initials="O." surname="Hagsand">
      <organization>SUNET</organization>
      <address>
        <email>olof@hagsand.se</email>
      </address>
    </author>
    <author fullname="Hongwei Li" initials="H." surname="Li">
      <organization>Hewlett Packard Enterprise</organization>
      <address>
        <email>flycoolman@gmail.com</email>
      </address>
    </author>
    <date/>
    <area>OPS Area</area>
    <workgroup>NETCONF Working Group</workgroup>
    <abstract>
      <t>List pagination for YANG-driven protocols are defined in
        <xref target="I-D.ietf-netconf-list-pagination" format="default"/>. Operational data
        can have very large data sets. These data sets can furthermore have
        big churn, a lot of additions or deletions to the data set. In order
        to support a stable pagination of such data sets, snapshots can be
        used.</t>
      <t>This document defines snapshot support for pagination of
        "config false" nodes of type "list" and "leaf-list". The snapshot
        support for individual nodes is signaled via the
        "ietf-system-capabilities" module.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>The following open questions have been identified for
        list-pagination with snapshots.</t>
      <t>The requirements that are necessory to resolve for a complete
        solution:</t>
      <ul>
        <li>What should be in the snapshot? The discussions have touched
          on include entire list content, take a snapshot of list keys
          etc.</li>
        <li>How should a client return to a taken snapshot? I.e. one RESTCONF
          request starts paginating and allocates a snapshot, how does the
          client return to that snapshot for the next page? The snapshot would
          need some id and a method to fetch it later. For instance a new
          query parameter to identify a snapshot, and a snapshot metadata
          id?</li>
        <li>What is the lifecycle of a snapshot for pagination?</li>
        <li>Should the client be able to signal that the snapshot should be
          deallocated?</li>
        <li>Should it the snapshot have some timeout after which it is
          deallocated?</li>
        <li>What happens when a server can't take a snapshot due to resource
          constraints?</li>
        <li>Should snapshots be implicitly deallocated when the pagination
          reaches the last page?</li>
        <li>Security considerations for protecting against DoS when a lot of
          (possibly huge) snapshots can be taken.</li>
      </ul>
      <section numbered="true" toc="default">
        <name>Terminology</name>
        <t>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 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/>
          when, and only when, they appear in all capitals, as shown here.</t>
        <t>The following terms are defined in <xref target="RFC7950" format="default"/>
          and are not redefined here:
            client,
            data model,
            data tree,
            feature,
            extension,
            module,
            leaf,
            leaf-list,
            and server.
        </t>
        <!--
        <t>The following terms are defined in this document as follows:</t>
        -->
      </section>
      <section numbered="true" toc="default">
        <name>Conventions</name>
        <t>Various examples in this document use "BASE64VALUE=" as a
          placeholder value for binary data that has been base64
          encoded (per <xref section="9.8" target="RFC7950" format="default"/>).  This
          placeholder value is used because real base64 encoded structures
          are often many lines long and hence distracting to the example
          being presented.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Adherence to the NMDA</name>
        <t>This document is compliant with the Network Management Datastore
          Architecture (NMDA) <xref target="RFC8342" format="default"/>.  The
          "ietf-list-pagination-snapshot" module only defines a YANG
          identity, grouping, and augments a couple leafs into a "config
          false" node defined by the "ietf-system-capabilities" module.</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Solution Overview</name>
      <t>The solution presented in this document extends the pagination
        functionality in <xref target="I-D.ietf-netconf-list-pagination" format="default"/>.
        The snapshot functionality defined by the document conforms to
        "config false" "list" and "leaf-list" nodes.</t>
      <t>The "snapshot" query parameter (see <xref target="snapshot-param" format="default"/>)
        enables clients to ask create a snapshot. The support for snapshots
        is signaled via <xref target="RFC9196" format="default"/> (see
        <xref target="snapshot-support" format="default"/>).</t>
    </section>
    <section anchor="snapshot-param" toc="exclude" numbered="true">
      <name>The "snapshot" Query Parameter</name>
      <dl newline="true">
        <dt>Description</dt>
        <dd>The "snapshot" query parameter indicates that the client
          requests the server to take a snapshot of a "config false" target
          before starting the pagination.</dd>
        <dt>Default Value</dt>
        <dd>If this query parameter is unspecified, it defaults to false.</dd>
        <dt>Allowed Values</dt>
        <dd>The allowed values are true or false. If snapshots are not
          supported the "snapshot-not-supported" SHOULD be produced in the
          error-app-tag in the error output.</dd>
        <dt>Conformance</dt>
        <dd>The "snapshot" query parameter MAY be supported for
          "config false" lists and leaf-lists.</dd>
      </dl>
      <section anchor="snapshot-param-netconf" numbered="true" toc="default">
        <name>NETCONF</name>
        <t>For the NETCONF protocol, the "snapshot" query parameter is added
        to the protocol by augmenting "lpgsnap:snapshot-param-grouping" to
        the get, get-config, and get-data RPCs.</t>
      </section>
      <section anchor="snapshot-param-restconf" numbered="true" toc="default">
        <name>RESTCONF</name>
        <t>The RESTCONF protocol specific functionality and conformance is
          defined in this section.</t>
        <t>If the target node does not support snapshots, then a "501 Not
          Implemented" status-line MUST be returned with the error-type value
          "application" and error-tag value "invalid-value", and SHOULD
          also include the "snapshot-not-supported" identity as error-app-tag
          value.</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
+----------+---------+--------------------------------------------+
| Name     | Methods | Description                                |
+----------+---------+--------------------------------------------+
| snapshot | GET,    | Indicates that the server should take a    |
|          | HEAD    | snapshot before paginating the result set. |
+----------+---------+--------------------------------------------+
]]></artwork>
        <t>The "snapshot" query parameter is allowed for GET and HEAD methods
          on "list" and "leaf-list" data resources. A "400 Bad Request"
          status-line MUST be returned if used with any other method or
          resource type. The error-tag value "operation-not-supprted" is used
          in this case.</t>
      </section>
    </section>
    <section anchor="snapshot-support" numbered="true" toc="default">
      <name>Snapshot support</name>
      <t>A server MAY support snapshots when paginating a "config false"
        list or leaf-list. In order to enable servers to identify which
        nodes may be used to take snapshots when paginating the
        "ietf-list-pagination-snapshot" module (see <xref target="yang-module" format="default"/>) augments an empty leaf node called "snapshot"
        into the "per-node-capabilities" node defined in the
        "ietf-system-capabilities" module (see
        <xref target="RFC9196" format="default"/>).</t>
      <t>Note that it is possible for a client to request the server to
        take a snapshot when paginating with the "snapshot" query parameter
        (see <xref target="snapshot-param" format="default"/>.</t>
    </section>
    <section anchor="yang-module" numbered="true" toc="default">
      <name>The "ietf-list-pagination-snapshot" Module</name>
      <t>The "ietf-list-pagination-snapshot" module is used by servers to
        indicate that they support pagination on YANG "list" and "leaf-list"
        nodes, and to provide an ability to indicate which "config false" list
        and/or "leaf-list" nodes are constrained and, if so, which nodes may be
        used in "where" and "sort-by" expressions.</t>
      <section numbered="true" toc="default">
        <name>Data Model Overview</name>
        <t>The following tree diagram <xref target="RFC8340" format="default"/> illustrates
          the "ietf-list-pagination-snapshot" module:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-list-pagination-snapshot

  augment /nc:get/nc:input:
    +---w snapshot?   boolean
  augment /nc:get-config/nc:input:
    +---w snapshot?   boolean
  augment /ncds:get-data/ncds:input:
    +---w snapshot?   boolean
  augment /sysc:system-capabilities/sysc:datastore-capabilities
            /sysc:per-node-capabilities:
    +--ro snapshot?   empty
]]></artwork>
        <t>Comments:</t>
        <t>As shown, this module augments an optional leaf into the
          "per-node-capabilities" list node of the "ietf-system-capabilities"
          module.</t>
      </section>
      <section numbered="true" toc="default">
        <name>YANG Module</name>
        <t>This YANG module has normative references to <xref target="RFC7952" format="default"/>
            and <xref target="RFC9196" format="default"/>.</t>
        <t keepWithNext="true">&lt;CODE BEGINS&gt; file "ietf-list-pagination-snapshot@2024-03-01.yang"</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
module ietf-list-pagination-snapshot {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-list-pagination-snapshot";
  prefix lpgsnap;

  import ietf-datastores {
    prefix ds;
    reference
      "RFC 8342: Network Management Datastore Architecture (NMDA)";
  }

  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-system-capabilities  {
    prefix sysc;
    reference
      "RFC 9691: YANG Modules Describing Capabilities for Systems and
                 Datastore Update Notifications";
  }

  import ietf-list-pagination {
    prefix lpg;
    reference
      "draft-ietf-list-pagination: List Pagination for YANG-driven
                                   Protocols";
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";

  contact
    "WG Web:   https://datatracker.ietf.org/wg/netconf
     WG List:  NETCONF WG list <mailto:netconf@ietf.org>";

  description
    "This module is used by servers to indicate they support
     snapshot pagination on 'config false' nodes of type 'list'
     and 'leaf-list'. It also defines a grouping for the snapshot
     parameter.

     Copyright (c) 2024 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 2024-03-01 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: List Pagination Snapshots for YANG-driven
                 Protocols";
  }


  // Identities

  identity snapshot-not-supported {
    base lpg:list-pagination-error;
    description
      "Snapshot is not supported for the target. Either it is not a
       'config false' list or leaf-list, or it is disabled.";
  }

  // Groupings

  grouping snapshot-param-grouping {
    description
      "This grouping may be used by protocol-specific YANG modules
       to define a protocol-specific query parameter.";
    leaf snapshot {
      type boolean;
      description
        "The 'snapshot' parameter indicates that the client requests
         the server to take a snapshot of the 'config false' list or
         leaf-list target before paginating.";
    }
  }

  // Protocol-accessible nodes

  augment "/nc:get/nc:input" {
    description
      "Allow the 'get' operation to use the 'snapshot' query
       parameter for YANG list or leaf-list that is to be
       retrieved.";
    uses snapshot-param-grouping;
  }

  augment "/nc:get-config/nc:input" {
    description
      "Allow the 'get-config' operation to use the 'snapshot' query
       parameter for YANG list or leaf-list that is to be
       retrieved.";
    uses snapshot-param-grouping;
  }

  augment "/ncds:get-data/ncds:input" {
    description
      "Allow the 'get-data' operation to use the 'snapshot' query
       parameter for YANG list or leaf-list that is to be
       retrieved.";
    uses snapshot-param-grouping;
  }

  augment
    "/sysc:system-capabilities/sysc:datastore-capabilities"
    + "/sysc:per-node-capabilities" {

    // Ensure the following node is only used for the
    // <operational> datastore.
    when "/sysc:system-capabilities/sysc:datastore-capabilities"
         + "/sysc:datastore = 'ds:operational'";

    description
      "Defines some leafs that MAY be used by the server to
       describe constraints imposed of the 'where' filters and
       'sort-by' parameters used in list pagination queries.";
    leaf snapshot {
      type empty;
      description
        "Indicates that snapshots are supported for the targeted
         'config false' list or leaf-list node.";
    }
  }
}
]]></artwork>
        <t keepWithPrevious="true">&lt;CODE ENDS&gt;</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section numbered="true" toc="default">
        <name>The "IETF XML" Registry</name>
        <t>This document registers one URI in the "ns" subregistry of
            the IETF XML Registry <xref target="RFC3688" format="default"/> maintained at
            <eref target="https://www.iana.org/assignments/xml-registry/xml-registry.xhtml#ns"/>.
            Following the format in <xref target="RFC3688" format="default"/>, the following
            registration is requested:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
URI: urn:ietf:params:xml:ns:yang:ietf-list-pagination-snapshot
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
          ]]></artwork>
      </section>
      <section numbered="true" toc="default">
        <name>The "YANG Module Names" Registry</name>
        <t>This document registers one YANG module in the YANG
          Module Names registry <xref target="RFC6020" format="default"/> maintained at
          <eref target="https://www.iana.org/assignments/yang-parameters/yang-parameters.xhtml"/>.
          Following the format defined in <xref target="RFC6020" format="default"/>,
          the below registration is requested:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
name: ietf-list-pagination-snapshot
namespace: urn:ietf:params:xml:ns:yang:ietf-list-pagination-snapshot
prefix: lpg
RFC: XXXX
          ]]></artwork>
      </section>
      <section numbered="true" toc="default">
        <name>The "RESTCONF Capability URNs" Registry</name>
        <t>This document registers one capability in the RESTCONF
          Capability URNs <xref target="RFC8040" format="default"/> maintained at
          <eref target="https://www.iana.org/assignments/restconf-capability-urns/restconf-capability-urns.xhtml"/>.
          Following the instructions defined in
          <xref section="11.4" target="RFC8040" relative="#FIXME"/>,
          the below registrations are requested:</t>
        <t>All the registrations are to use this document (RFC XXXX)
          for the "Reference" value.</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
Index                Capability Identifier
---------------------------------------------------------------------
:snapshot            urn:ietf:params:restconf:capability:snapshot:1.0
]]></artwork>
      </section>
    </section>
    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <section numbered="true" toc="default">
        <name>Regarding the "ietf-list-pagination-snapshot" YANG Module</name>
        <t>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 <xref target="RFC6241" format="default"/> or RESTCONF
          <xref target="RFC8040" format="default"/>. The lowest NETCONF layer is the secure
          transport layer, and the mandatory-to-implement secure transport is
          Secure Shell (SSH) <xref target="RFC6242" format="default"/>. The lowest RESTCONF layer
          is HTTPS, and the mandatory-to-implement secure transport is TLS
          <xref target="RFC8446" format="default"/>.</t>
        <t>The Network Configuration Access Control Model (NACM)
          <xref target="RFC8341" format="default"/> provides the means to restrict access for
          particular NETCONF or RESTCONF users to a preconfigured subset of all
          available NETCONF or RESTCONF protocol operations and content.</t>
        <t>All protocol-accessible data nodes in the extension to
          "ietf-system-capabilities" module are read-only and cannot be
          modified. Access control may be configured to avoid exposing any
          read-only data that is defined by the augmenting module documentation
          as being security sensitive.</t>
        <t>The security considerations for the base NETCONF protocol operations
          (see Section 9 of <xref target="RFC6241" format="default"/> and Section 6 of
          <xref target="RFC8526" format="default"/>) apply to the extension made to operations
          &lt;get&gt;, &lt;get-config&gt;, and &lt;get-data&gt; defined in this
          document.</t>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <!-- MUSTs, etc. -->
      <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml">
          <front>
            <title>The IETF XML Registry</title>
            <author fullname="M. Mealling" initials="M." surname="Mealling"/>
            <date month="January" year="2004"/>
            <abstract>
              <t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="81"/>
          <seriesInfo name="RFC" value="3688"/>
          <seriesInfo name="DOI" value="10.17487/RFC3688"/>
        </reference>
        <!-- IETF XML Registry -->
      <reference anchor="RFC5646" target="https://www.rfc-editor.org/info/rfc5646" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5646.xml">
          <front>
            <title>Tags for Identifying Languages</title>
            <author fullname="A. Phillips" initials="A." role="editor" surname="Phillips"/>
            <author fullname="M. Davis" initials="M." role="editor" surname="Davis"/>
            <date month="September" year="2009"/>
            <abstract>
              <t>This document describes the structure, content, construction, and semantics of language tags for use in cases where it is desirable to indicate the language used in an information object. It also describes how to register values for use in language tags and the creation of user-defined extensions for private interchange. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="47"/>
          <seriesInfo name="RFC" value="5646"/>
          <seriesInfo name="DOI" value="10.17487/RFC5646"/>
        </reference>
        <!-- Language sub-tags -->
      <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml">
          <front>
            <title>Network Configuration Protocol (NETCONF)</title>
            <author fullname="R. Enns" initials="R." role="editor" surname="Enns"/>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <author fullname="J. Schoenwaelder" initials="J." role="editor" surname="Schoenwaelder"/>
            <author fullname="A. Bierman" initials="A." role="editor" surname="Bierman"/>
            <date month="June" year="2011"/>
            <abstract>
              <t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices. It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages. The NETCONF protocol operations are realized as remote procedure calls (RPCs). This document obsoletes RFC 4741. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6241"/>
          <seriesInfo name="DOI" value="10.17487/RFC6241"/>
        </reference>
        <!-- NETCONF -->
      <reference anchor="RFC6242" target="https://www.rfc-editor.org/info/rfc6242" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml">
          <front>
            <title>Using the NETCONF Protocol over Secure Shell (SSH)</title>
            <author fullname="M. Wasserman" initials="M." surname="Wasserman"/>
            <date month="June" year="2011"/>
            <abstract>
              <t>This document describes a method for invoking and running the Network Configuration Protocol (NETCONF) within a Secure Shell (SSH) session as an SSH subsystem. This document obsoletes RFC 4742. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6242"/>
          <seriesInfo name="DOI" value="10.17487/RFC6242"/>
        </reference>
        <!-- NETCONF over SSH -->
      <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <date month="August" year="2016"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols. This document describes the syntax and semantics of version 1.1 of the YANG language. YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification. There are a small number of backward incompatibilities from YANG version 1. This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7950"/>
          <seriesInfo name="DOI" value="10.17487/RFC7950"/>
        </reference>
        <!-- YANG (curr) -->
      <reference anchor="RFC7952" target="https://www.rfc-editor.org/info/rfc7952" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7952.xml">
          <front>
            <title>Defining and Using Metadata with YANG</title>
            <author fullname="L. Lhotka" initials="L." surname="Lhotka"/>
            <date month="August" year="2016"/>
            <abstract>
              <t>This document defines a YANG extension that allows for defining metadata annotations in YANG modules. The document also specifies XML and JSON encoding of annotations and other rules for annotating instances of YANG data nodes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7952"/>
          <seriesInfo name="DOI" value="10.17487/RFC7952"/>
        </reference>
        <!-- YANG Metadata -->
      <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml">
          <front>
            <title>RESTCONF Protocol</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <date month="January" year="2017"/>
            <abstract>
              <t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8040"/>
          <seriesInfo name="DOI" value="10.17487/RFC8040"/>
        </reference>
        <!-- RESTCONF -->
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <!-- rfc2119 update -->
      <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml">
          <front>
            <title>Network Configuration Access Control Model</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <date month="March" year="2018"/>
            <abstract>
              <t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) or the RESTCONF protocol requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability. There is a need for standard mechanisms to restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content. This document defines such an access control model.</t>
              <t>This document obsoletes RFC 6536.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="91"/>
          <seriesInfo name="RFC" value="8341"/>
          <seriesInfo name="DOI" value="10.17487/RFC8341"/>
        </reference>
        <!-- NACM -->
      <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <!-- TLS 1.3 -->
      <reference anchor="RFC8526" target="https://www.rfc-editor.org/info/rfc8526" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8526.xml">
          <front>
            <title>NETCONF Extensions to Support the Network Management Datastore Architecture</title>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="J. Schoenwaelder" initials="J." surname="Schoenwaelder"/>
            <author fullname="P. Shafer" initials="P." surname="Shafer"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="R. Wilton" initials="R." surname="Wilton"/>
            <date month="March" year="2019"/>
            <abstract>
              <t>This document extends the Network Configuration Protocol (NETCONF) defined in RFC 6241 in order to support the Network Management Datastore Architecture (NMDA) defined in RFC 8342.</t>
              <t>This document updates RFCs 6241 and 7950. The update to RFC 6241 adds new and operations and augments existing,, and operations. The update to RFC 7950 requires the usage of the YANG library (described in RFC 8525) by NETCONF servers implementing the NMDA.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8526"/>
          <seriesInfo name="DOI" value="10.17487/RFC8526"/>
        </reference>
        <!-- NETCONF NMDA extensions -->
      <reference anchor="RFC9196" target="https://www.rfc-editor.org/info/rfc9196" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9196.xml">
          <front>
            <title>YANG Modules Describing Capabilities for Systems and Datastore Update Notifications</title>
            <author fullname="B. Lengyel" initials="B." surname="Lengyel"/>
            <author fullname="A. Clemm" initials="A." surname="Clemm"/>
            <author fullname="B. Claise" initials="B." surname="Claise"/>
            <date month="February" year="2022"/>
            <abstract>
              <t>This document defines two YANG modules, "ietf-system-capabilities" and "ietf-notification-capabilities".</t>
              <t>The module "ietf-system-capabilities" provides a placeholder structure that can be used to discover YANG-related system capabilities for servers. The module can be used to report capability information from the server at runtime or at implementation time by making use of the YANG instance data file format.</t>
              <t>The module "ietf-notification-capabilities" augments "ietf-system-capabilities" to specify capabilities related to "Subscription to YANG Notifications for Datastore Updates" (RFC 8641).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9196"/>
          <seriesInfo name="DOI" value="10.17487/RFC9196"/>
        </reference>
        <!-- ietf-system-capabilities -->
      <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-list-pagination.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <date month="October" year="2010"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6020"/>
          <seriesInfo name="DOI" value="10.17487/RFC6020"/>
        </reference>
        <!-- YANG (orig) -->
      <reference anchor="RFC6365" target="https://www.rfc-editor.org/info/rfc6365" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6365.xml">
          <front>
            <title>Terminology Used in Internationalization in the IETF</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
            <author fullname="J. Klensin" initials="J." surname="Klensin"/>
            <date month="September" year="2011"/>
            <abstract>
              <t>This document provides a list of terms used in the IETF when discussing internationalization. The purpose is to help frame discussions of internationalization in the various areas of the IETF and to help introduce the main concepts to IETF participants. This memo documents an Internet Best Current Practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="166"/>
          <seriesInfo name="RFC" value="6365"/>
          <seriesInfo name="DOI" value="10.17487/RFC6365"/>
        </reference>
        <!-- Internationalization -->
      <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml">
          <front>
            <title>YANG Tree Diagrams</title>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="L. Berger" initials="L." role="editor" surname="Berger"/>
            <date month="March" year="2018"/>
            <abstract>
              <t>This document captures the current syntax used in YANG module tree diagrams. The purpose of this document is to provide a single location for this definition. This syntax may be updated from time to time based on the evolution of the YANG language.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="215"/>
          <seriesInfo name="RFC" value="8340"/>
          <seriesInfo name="DOI" value="10.17487/RFC8340"/>
        </reference>
        <!-- YANG Tree Diagrams -->
      <reference anchor="RFC8342" target="https://www.rfc-editor.org/info/rfc8342" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml">
          <front>
            <title>Network Management Datastore Architecture (NMDA)</title>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="J. Schoenwaelder" initials="J." surname="Schoenwaelder"/>
            <author fullname="P. Shafer" initials="P." surname="Shafer"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="R. Wilton" initials="R." surname="Wilton"/>
            <date month="March" year="2018"/>
            <abstract>
              <t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model. This document updates RFC 7950.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8342"/>
          <seriesInfo name="DOI" value="10.17487/RFC8342"/>
        </reference>
        <!-- NMDA -->
      <reference anchor="RFC8525" target="https://www.rfc-editor.org/info/rfc8525" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8525.xml">
          <front>
            <title>YANG Library</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="J. Schoenwaelder" initials="J." surname="Schoenwaelder"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="R. Wilton" initials="R." surname="Wilton"/>
            <date month="March" year="2019"/>
            <abstract>
              <t>This document describes a YANG library that provides information about the YANG modules, datastores, and datastore schemas used by a network management server. Simple caching mechanisms are provided to allow clients to minimize retrieval of this information. This version of the YANG library supports the Network Management Datastore Architecture (NMDA) by listing all datastores supported by a network management server and the schema that is used by each of these datastores.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8525"/>
          <seriesInfo name="DOI" value="10.17487/RFC8525"/>
        </reference>
        <!-- YANG Library -->
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-list-pagination-nc.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-list-pagination-rc.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-restconf-collection.xml"/>
      </references>
    </references>
    <section numbered="true" toc="default">
      <name>Vector Tests</name>
      <t>This normative appendix section illustrates every notable
        edge condition conceived during this document's production.</t>
      <t>Test inputs and outputs are provided in a manner that is
        both generic and concise.</t>
      <t>Management protocol specific documents need only reproduce
        as many of these tests as necessary to convey pecularities
        presented by the protocol.</t>
      <t>Implementations are RECOMMENDED to implement the tests
        presented in this document, in addition to any tests that
        may be presented in protocol specific documents.</t>
      <t>The vector tests assume the "example-social" YANG module and
        example data set defined
        <xref target="I-D.ietf-netconf-list-pagination" format="default"/>.</t>
      <section numbered="true" toc="default">
        <name>Example Data Set</name>
        <t>The examples assume the server's operational state
          as follows.</t>
        <t>The following data enables snapshot support for the audit-log list
          node.</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
<system-capabilities
  xmlns="urn:ietf:params:xml:ns:yang:ietf-system-capabilities"
  xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"
  xmlns:es="https://example.com/ns/example-social"
  xmlns:lpg="urn:ietf:params:xml:ns:yang:ietf-list-pagination">
  <datastore-capabilities>
    <datastore>ds:operational</datastore>
    <per-node-capabilities>
      <node-selector>/es:audit-logs/es:audit-log</node-selector>
      <lpgsnap:snapshot/>
    </per-node-capabilities>
  </datastore-capabilities>
</system-capabilities>

]]></artwork>
      </section>
      <section numbered="true" toc="default">
        <name>Example Queries</name>
        <t>The following sections present example queries for the the snapshot
          query parameter.</t>
        <t>All the vector tests are presented in a protocol-independent
          manner.  JSON is used only for its conciseness.</t>
        <section anchor="snapshot-param-example" numbered="true" toc="default">
          <name>The "snapshot" Parameter</name>
          <t>The "snapshot" parameter may be used on "config false" target
            nodes.</t>
          <aside>
            <t>If this parameter is omitted, the default value is false.
            </t>
          </aside>
          <t>REQUEST</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
Target: /example-social:audit-logs/audit-log
  Pagination Parameters:
    Where:     -
    Sort-by:   -
    Direction: -
    Offset:    -
    Limit:     -
    Snapshot:  true
]]></artwork>
          <t>RESPONSE</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
{
  "example-social:audit-log": [
    {
      "member-id": "alice",
      ...
    },
    {
      "member-id": "bob",
      ...
    },
    {
      "member-id": "eric",
      ...
    },
    {
      "member-id": "alice",
      ...
    },
    {
      "member-id": "bob",
      ...
    },
    {
      "member-id": "alice",
      ...
    },
    {
      "member-id": "bob",
      ...
    }
  ]
}
]]></artwork>
        </section>
      </section>
      <!-- Example Queries -->
    </section>
    <!-- Vector Tests -->

    <section numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank the following for lively discussions
        on list (ordered by first name):
        Andy Bierman,
        Tom Petch,
        and
        Quifang Ma.
      </t>
    </section>
  </back>
</rfc>
