<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-netmod-nmda-diff-12" indexInclude="true" ipr="trust200902" number="9144" prepTime="2021-12-10T16:57:53" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="5" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-netmod-nmda-diff-12" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9144" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="NMDA Datastores">Comparison of Network Management Datastore Architecture (NMDA) Datastores</title>
    <seriesInfo name="RFC" value="9144" stream="IETF"/>
    <author fullname="Alexander Clemm" initials="A." surname="Clemm">
      <organization showOnFrontPage="true">Futurewei</organization>
      <address>
        <postal>
          <street>2330 Central Expressway</street>
          <city>Santa Clara</city>
          <region>CA</region>
          <country>United States of America</country>
          <code>95050</code>
        </postal>
        <phone/>
        <email>ludwig@clemm.org</email>
      </address>
    </author>
    <author fullname="Yingzhen Qu" initials="Y." surname="Qu">
      <organization showOnFrontPage="true">Futurewei</organization>
      <address>
        <postal>
          <street>2330 Central Expressway</street>
          <city>Santa Clara</city>
          <region>CA</region>
          <country>United States of America</country>
          <code>95050</code>
        </postal>
        <phone/>
        <email>yqu@futurewei.com</email>
      </address>
    </author>
    <author fullname="Jeff Tantsura" initials="J." surname="Tantsura">
      <organization showOnFrontPage="true">Microsoft</organization>
      <address>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Andy Bierman" initials="A." surname="Bierman">
      <organization showOnFrontPage="true">YumaWorks</organization>
      <address>
        <email>andy@yumaworks.com</email>
      </address>
    </author>
    <date month="12" year="2021"/>
    <keyword>Troubleshooting</keyword>
    <keyword>YANG RPC</keyword>
    <keyword>YANG Data Model</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">    
        This document defines a Remote Procedure Call (RPC) operation to compare management datastores that comply with the Network Management Datastore Architecture (NMDA).   
      </t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9144" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2021 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) 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.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-words">Key Words</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-data-model-overview">Data Model Overview</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-yang-data-model">YANG Data Model</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-example">Example</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-performance-considerations">Performance Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-update-to-the-ietf-xml-regi">Update to the IETF XML Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-update-to-the-yang-module-n">Update to the YANG Module Names Registry</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-possible-future-extensions">Possible Future Extensions</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">
            The revised NMDA <xref target="RFC8342" format="default" sectionFormat="of" derivedContent="RFC8342"/> introduces a set of new datastores that each hold YANG-defined data <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/> and represent a different "viewpoint" on the data that is maintained by a server. New YANG datastores that are introduced include &lt;intended&gt;, which contains validated configuration data that a client application intends to be in effect, and &lt;operational&gt;, which contains operational state data (such as statistics) as well as configuration data that is actually in effect.    
      </t>
      <t indent="0" pn="section-1-2">
            NMDA introduces, in effect, a concept of "lifecycle" for management data, distinguishing between data that is part of a configuration that was supplied by a user, configuration data that has actually been successfully applied and that is part of the operational state, and the overall operational state that includes applied configuration data as well as status and statistics. 
      </t>
      <t indent="0" pn="section-1-3">
            As a result, data from the same management model can be reflected in multiple datastores.  Clients need to specify the target datastore to be specific about 
            which viewpoint of the data they want to access.  For example, a client application can differentiate whether they are interested in the configuration that is supplied to a server and is supposed to be in effect or the configuration that has been applied and is actually in effect on the server.   
      </t>
      <t indent="0" pn="section-1-4">Due to the fact that data can propagate from one datastore to another, it is possible for differences between datastores to occur.  Some of this is entirely expected, as there may be a time lag between when a configuration is given to the device and reflected in &lt;intended&gt; until when it actually takes effect and is reflected in &lt;operational&gt;.  However, there may be cases when a configuration item that was to be applied may not actually take effect at all or needs an unusually long time to do so.  This can be the case due to certain conditions not being met, certain parts of the configuration not propagating because they are considered inactive, resource dependencies not being resolved, or even implementation errors in corner conditions.  
      </t>
      <t indent="0" pn="section-1-5">When the configuration that is in effect is different from the configuration that was applied, many issues can result.  It becomes more difficult to operate the network properly due to limited visibility of the actual operational status, which makes it more difficult to analyze and understand what is going on in the network.  Services may be negatively affected (for example, degrading or breaking a customer service), and network resources may be misallocated.  
      </t>
      <t indent="0" pn="section-1-6">
            Applications can potentially analyze any differences between two datastores by retrieving the contents from both datastores and comparing them.  However, in many cases, this will be both costly and extremely wasteful. 
      </t>
      <t indent="0" pn="section-1-7">
   This document introduces a YANG data model that defines RPCs
   intended to be used in conjunction with NETCONF <xref target="RFC6241" format="default" sectionFormat="of" derivedContent="RFC6241"/> or RESTCONF <xref target="RFC8040" format="default" sectionFormat="of" derivedContent="RFC8040"/>. These RPCs allow a client to request a server to compare two NMDA datastores and report any differences. 
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-key-words">Key Words</name>
      <t indent="0" pn="section-2-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
      </t>
    </section>
    <section anchor="Overview" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-data-model-overview">Data Model Overview</name>
      <t indent="0" pn="section-3-1">
    The core of the solution is a new management operation, &lt;compare&gt;, that compares the data tree contents of two datastores.  The operation checks whether there are any differences in values or in data nodes that are contained in either datastore and returns any differences as output.  The output is returned in the format specified in YANG Patch <xref target="RFC8072" format="default" sectionFormat="of" derivedContent="RFC8072"/>.  
      </t>
      <t indent="0" pn="section-3-2"> 
    The YANG data model defines the &lt;compare&gt; operation as a new RPC.  The operation takes the following input parameters:
      </t>
      <dl spacing="normal" indent="3" newline="false" pn="section-3-3">
        <dt pn="section-3-3.1">source:</dt>
        <dd pn="section-3-3.2"> The source identifies the datastore to serve as the reference for the comparison -- for example, &lt;intended&gt;.</dd>
        <dt pn="section-3-3.3">target:</dt>
        <dd pn="section-3-3.4"> The target identifies the datastore to compare against the source -- for example, &lt;operational&gt;.</dd>
        <dt pn="section-3-3.5">filter-spec:</dt>
        <dd pn="section-3-3.6"> This is a choice between different filter constructs to identify the parts of the datastore to be retrieved.  It acts as a node selector that specifies which data nodes are within the scope of the comparison and which nodes are outside the scope.  This allows a comparison operation to be applied only to a specific part of the datastore that is of interest, such as a particular subtree.  Note that the filter does not allow expressions that match against data node values, since this may incur implementation difficulties and is not required for normal use cases. </dd>
        <dt pn="section-3-3.7">all:</dt>
        <dd pn="section-3-3.8"> When set, this parameter indicates that all differences should be included, including differences pertaining to schema nodes that exist in only one of the datastores.  When this parameter is not included, a prefiltering step is automatically applied to exclude data from the comparison that does not pertain to both datastores: if the same schema node is not present in both datastores, then all instances of that schema node and all its descendants are excluded from the comparison. This allows client applications to focus on the differences that constitute true mismatches of instance data without needing to specify more complex filter constructs.</dd>
        <dt pn="section-3-3.9">report-origin:</dt>
        <dd pn="section-3-3.10"> When set, this parameter indicates that origin metadata should be included as part of RPC output. 
        When this parameter is omitted, origin metadata in comparisons that involve 
        &lt;operational&gt; is by default omitted.
        Note that origin metadata only applies to &lt;operational&gt;; it is therefore also omitted in comparisons that do not involve &lt;operational&gt; regardless of whether or not the parameter is set.  
        </dd>
      </dl>
      <t indent="0" pn="section-3-4">
    The operation provides the following output parameter:
      </t>
      <dl spacing="normal" indent="3" newline="false" pn="section-3-5">
        <dt pn="section-3-5.1">differences:</dt>
        <dd pn="section-3-5.2"> This parameter contains the list of differences.  Those differences are encoded per the YANG Patch data model defined in <xref target="RFC8072" format="default" sectionFormat="of" derivedContent="RFC8072"/>.  When a datastore node in the source of the comparison is not present in the target of the comparison, this can be indicated either as a "delete" or as a "remove" in the patch as there is no differentiation between those operations for the purposes of the comparison.
The YANG Patch data model is augmented to indicate the value of source datastore nodes in addition to the patch itself that would need to be applied to the source to produce the target.   When the target datastore is &lt;operational&gt; and the input parameter "report-origin" is set, origin metadata is included as part of the patch. Including origin metadata can help explain the cause of a difference in some cases -- for example, when a data node is part of &lt;intended&gt; but the origin of the same data node in &lt;operational&gt; is reported as "system".</dd>
      </dl>
      <t indent="0" pn="section-3-6">The data model is defined in the ietf-nmda-compare YANG
        module. Its structure is shown in the following figure. The notation syntax 
        follows <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/>.</t>
      <figure align="left" suppress-title="false" pn="figure-1">
        <name slugifiedName="name-structure-of-ietf-nmda-comp">Structure of ietf-nmda-compare</name>
        <sourcecode name="" type="yangtree" markers="false" pn="section-3-7.1">
module: ietf-nmda-compare
  rpcs:
    +---x compare
       +---w input
       |  +---w source            identityref
       |  +---w target            identityref
       |  +---w all?              empty
       |  +---w report-origin?    empty
       |  +---w (filter-spec)?
       |     +--:(subtree-filter)
       |     |  +---w subtree-filter?
       |     +--:(xpath-filter)
       |        +---w xpath-filter?     yang:xpath1.0 {nc:xpath}?
       +--ro output
          +--ro (compare-response)?
             +--:(no-matches)
             |  +--ro no-matches?    empty
             +--:(differences)
                +--ro differences
                   +--ro yang-patch
                      +--ro patch-id    string
                      +--ro comment?    string
                      +--ro edit* [edit-id]
                         +--ro edit-id         string
                         +--ro operation       enumeration
                         +--ro target          target-resource-offset
                         +--ro point?          target-resource-offset
                         +--ro where?          enumeration
                         +--ro value?
                         +--ro source-value?
</sourcecode>
      </figure>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-yang-data-model">YANG Data Model</name>
      <t indent="0" pn="section-4-1">
This YANG module includes references to <xref target="RFC6991" format="default" sectionFormat="of" derivedContent="RFC6991"/>,  <xref target="RFC8342" format="default" sectionFormat="of" derivedContent="RFC8342"/>,  <xref target="RFC8072" format="default" sectionFormat="of" derivedContent="RFC8072"/>,
and  <xref target="RFC6241" format="default" sectionFormat="of" derivedContent="RFC6241"/>.
</t>
      <sourcecode name="ietf-nmda-compare@2021-12-10.yang" type="yang" markers="true" pn="section-4-2">
module ietf-nmda-compare {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-nmda-compare";
  prefix cmp;

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-datastores {
    prefix ds;
    reference
      "RFC 8342: Network Management Datastore
       Architecture (NMDA)";
  }
  import ietf-yang-patch {
    prefix ypatch;
    reference
      "RFC 8072: YANG Patch Media Type";
  }
  import ietf-netconf {
    prefix nc;
    reference
      "RFC 6241: Network Configuration Protocol (NETCONF)";
  }

  organization
    "IETF NETMOD (Network Modeling) Working Group";
  contact
    "WG Web:   &lt;https://datatracker.ietf.org/wg/netmod/&gt;
     WG List:  &lt;mailto:netmod@ietf.org&gt;

     Author: Alexander Clemm
             &lt;mailto:ludwig@clemm.org&gt;

     Author: Yingzhen Qu
             &lt;mailto:yqu@futurewei.com&gt;

     Author: Jeff Tantsura
             &lt;mailto:jefftant.ietf@gmail.com&gt;

     Author: Andy Bierman
             &lt;mailto:andy@yumaworks.com&gt;";
  description
    "The YANG data model defines a new operation, &lt;compare&gt;, that
     can be used to compare NMDA datastores.

     Copyright (c) 2021 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 9144; see the
     RFC itself for full legal notices.";

  revision 2021-12-10 {
    description
      "Initial revision.";
    reference
      "RFC 9144: Comparison of Network Management Datastore
       Architecture (NMDA) Datastores";
  }

  /* RPC */

  rpc compare {
    description
      "NMDA datastore compare operation.";
    input {
      leaf source {
        type identityref {
          base ds:datastore;
        }
        mandatory true;
        description
          "The source datastore to be compared.";
      }
      leaf target {
        type identityref {
          base ds:datastore;
        }
        mandatory true;
        description
          "The target datastore to be compared.";
      }
      leaf all {
        type empty;
        description
          "When this leaf is provided, all data nodes are compared,
           whether their schema node pertains to both datastores or
           not.  When this leaf is omitted, a prefiltering step is
           automatically applied that excludes data nodes from the
           comparison that can occur in only one datastore but not
           the other.  Specifically, if one of the datastores
           (source or target) contains only configuration data and
           the other datastore is &lt;operational&gt;, data nodes for
           the config that is false are excluded from the
           comparison.";
      }
      leaf report-origin {
        type empty;
        description
          "When this leaf is provided, origin metadata is
           included as part of RPC output.  When this leaf is
           omitted, origin metadata in comparisons that involve
           &lt;operational&gt; is by default omitted.";
      }
      choice filter-spec {
        description
          "Identifies the portions of the datastores to be
               compared.";
        anydata subtree-filter {
          description
            "This parameter identifies the portions of the
             target datastore to retrieve.";
          reference
            "RFC 6241, Section 6.";
        }
        leaf xpath-filter {
          if-feature "nc:xpath";
          type yang:xpath1.0;
          description
            "This parameter contains an XPath expression
             identifying the portions of the target
             datastore to retrieve.";
          reference
            "RFC 6991: Common YANG Data Types";
        }
      }
    }
    output {
      choice compare-response {
        description
          "Comparison results.";
        leaf no-matches {
          type empty;
          description
            "This leaf indicates that the filter did not match
             anything and nothing was compared.";
        }
        container differences {
          description
            "The list of differences, encoded per RFC 8072 with an
             augmentation to include source values where applicable.
             When a datastore node in the source is not present in
             the target, this can be indicated either as a 'delete'
             or as a 'remove' as there is no difference between
             them for the purposes of the comparison.";
          uses ypatch:yang-patch {
            augment "yang-patch/edit" {
              description
                "Provides the value of the source of the patch,
                 respectively of the source of the comparison, in
                 addition to the target value, where applicable.";
              anydata source-value {
                when "../operation = 'delete'"
                   + "or ../operation = 'merge'"
                   + "or ../operation = 'move'"
                   + "or ../operation = 'replace'"
                   + "or ../operation = 'remove'";
                description
                  "The anydata 'value' is only used for 'delete',
                   'move', 'merge', 'replace', and 'remove'
                   operations.";
              }
              reference
                "RFC 8072: YANG Patch Media Type";
            }
          }
        }
      }
    }
  }
}

</sourcecode>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-example">Example</name>
      <t indent="0" pn="section-5-1">
The following example compares the difference between &lt;operational&gt; and &lt;intended&gt; for a subtree under "interfaces". The subtree contains a subset of objects that are defined in a YANG data model for the management of interfaces defined in <xref target="RFC8343" format="default" sectionFormat="of" derivedContent="RFC8343"/>.  For the purposes of understanding the subsequent example, the following excerpt of the data model whose instantiation is the basis of the comparison is provided:
</t>
      <sourcecode name="" type="yang" markers="false" pn="section-5-2">
container interfaces {
  description
    "Interface parameters.";
  list interface {
    key "name";
    leaf name {
      type string;
      description
        "The name of the interface.";
    }
    leaf description {
      type string;
      description
        "A textual description of the interface.";
    }
    leaf enabled {
      type boolean;
      default "true";
      description
        "This leaf contains the configured, desired state of the
         interface.";
    }
  }
}
</sourcecode>
      <t indent="0" pn="section-5-3">
The contents of &lt;intended&gt; and &lt;operational&gt; datastores in XML <xref target="W3C.REC-xml-20081126" format="default" sectionFormat="of" derivedContent="W3C.REC-xml-20081126"/>:
</t>
      <sourcecode name="" type="xml" markers="false" pn="section-5-4">
&lt;!--INTENDED--&gt;
&lt;interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"&gt;
  &lt;interface&gt;
    &lt;name&gt;eth0&lt;/name&gt;
    &lt;enabled&gt;false&lt;/enabled&gt;
    &lt;description&gt;ip interface&lt;/description&gt;
  &lt;/interface&gt;
&lt;/interfaces&gt;
</sourcecode>
      <sourcecode name="" type="xml" markers="false" pn="section-5-5">
&lt;!--OPERATIONAL--&gt;
&lt;interfaces
    xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"
    xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"&gt;
  &lt;interface or:origin="or:learned"&gt;
    &lt;name&gt;eth0&lt;/name&gt;
    &lt;enabled&gt;true&lt;/enabled&gt;
  &lt;/interface&gt;
&lt;/interfaces&gt;
</sourcecode>
      <t indent="0" pn="section-5-6">
&lt;operational&gt; does not contain an instance for leaf "description" that is contained in &lt;intended&gt;.  Another leaf, "enabled", has different values in the two datastores, being "true" in &lt;operational&gt; and "false" in &lt;intended&gt;.  A third leaf, "name", is the same in both cases.  The origin of the leaf instances in &lt;operational&gt; is "learned", which may help explain the discrepancies.  
</t>
      <t indent="0" pn="section-5-7">
RPC request to compare &lt;operational&gt; (source of the comparison) with &lt;intended&gt; (target of the comparison):
</t>
      <sourcecode name="" type="xml" markers="false" pn="section-5-8">
&lt;rpc message-id="101"
    xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
  &lt;compare xmlns="urn:ietf:params:xml:ns:yang:ietf-nmda-compare"
      xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"&gt;
    &lt;source&gt;ds:operational&lt;/source&gt;
    &lt;target&gt;ds:intended&lt;/target&gt;
    &lt;report-origin/&gt;
    &lt;xpath-filter
        xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"&gt;
      /if:interfaces
    &lt;/xpath-filter&gt;
  &lt;/compare&gt;
&lt;/rpc&gt;
</sourcecode>
      <t indent="0" pn="section-5-9">
RPC reply when a difference is detected:
</t>
      <sourcecode name="" type="xml" markers="false" pn="section-5-10">
&lt;rpc-reply
     xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
     message-id="101"&gt;
  &lt;differences
     xmlns="urn:ietf:params:xml:ns:yang:ietf-nmda-compare"
     xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"&gt;
    &lt;yang-patch&gt;
      &lt;patch-id&gt;interface status&lt;/patch-id&gt;
      &lt;comment&gt;
        diff between operational (source) and intended (target)
      &lt;/comment&gt;
      &lt;edit&gt;
        &lt;edit-id&gt;1&lt;/edit-id&gt;
        &lt;operation&gt;replace&lt;/operation&gt;
        &lt;target&gt;/ietf-interfaces:interface=eth0/enabled&lt;/target&gt;
        &lt;value&gt;
          &lt;if:enabled&gt;false&lt;/if:enabled&gt;
        &lt;/value&gt;
        &lt;source-value&gt;
           &lt;if:enabled or:origin="or:learned"&gt;true&lt;/if:enabled&gt;
        &lt;/source-value&gt;
      &lt;/edit&gt;
      &lt;edit&gt;
        &lt;edit-id&gt;2&lt;/edit-id&gt;
        &lt;operation&gt;create&lt;/operation&gt;
        &lt;target&gt;/ietf-interfaces:interface=eth0/description&lt;/target&gt;
        &lt;value&gt;
          &lt;if:description&gt;ip interface&lt;/if:description&gt;
        &lt;/value&gt;
      &lt;/edit&gt;
    &lt;/yang-patch&gt;
  &lt;/differences&gt;
&lt;/rpc-reply&gt;
</sourcecode>
      <t indent="0" pn="section-5-11">
     The same request in RESTCONF (using JSON format <xref target="RFC7951" format="default" sectionFormat="of" derivedContent="RFC7951"/>):
</t>
      <sourcecode name="" type="json" markers="false" pn="section-5-12">
POST /restconf/operations/ietf-nmda-compare:compare HTTP/1.1
Host: example.com
Content-Type: application/yang-data+json
Accept: application/yang-data+json

{ "ietf-nmda-compare:input" : {
   "source" : "ietf-datastores:operational",
   "target" : "ietf-datastores:intended",
   "report-origin" : null,
   "xpath-filter" : "/ietf-interfaces:interfaces"
   }
}
</sourcecode>
      <t indent="0" pn="section-5-13">
   The same response in RESTCONF (using JSON format):
</t>
      <sourcecode name="" type="json" markers="false" pn="section-5-14">
HTTP/1.1 200 OK
Date: Thu, 24 Jan 2019 20:56:30 GMT
Server: example-server
Content-Type: application/yang-data+json

{ "ietf-nmda-compare:output" : {
    "differences" : {
      "ietf-yang-patch:yang-patch" : {
        "patch-id" : "interface status",
        "comment" : "diff between intended (source) and operational",
        "edit" : [
          {
            "edit-id" : "1",
            "operation" : "replace",
            "target" : "/ietf-interfaces:interface=eth0/enabled",
            "value" : {
               "ietf-interfaces:interface/enabled" : "false"
            },
            "source-value" : {
               "ietf-interfaces:interface/enabled" : "true",
               "@ietf-interfaces:interface/enabled" : {
                 "ietf-origin:origin" : "ietf-origin:learned"
               }
             }
          },
          {
            "edit-id" : "2",
            "operation" : "create",
            "target" : "/ietf-interfaces:interface=eth0/description",
            "value" : {
              "ietf-interface:interface/description" : "ip interface"
            }
          }
        ]
      }
    }
  }
}
</sourcecode>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-performance-considerations">Performance Considerations</name>
      <t indent="0" pn="section-6-1">
The &lt;compare&gt; operation can be computationally expensive.  While responsible client applications are expected to use the operation responsibly and sparingly only when warranted, implementations need to be aware of the fact that excessive invocation of this operation will burden system resources and need to ensure that system performance will not be adversely impacted.  One possibility for an implementation to mitigate against this is to limit the number of requests that are served to a client, or to any number of clients, in any one time interval, by rejecting requests made at a higher frequency than the implementation can reasonably sustain.</t>
      <t indent="0" pn="section-6-2">
While useful, tools such as YANG data models that allow for the	monitoring of server resources, system performance, 
and statistics about RPCs and RPC rates are outside the scope of this document. 
When defined, any such model should be general in nature and not limited to the RPC operation defined in this document.
</t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.1">
        <name slugifiedName="name-update-to-the-ietf-xml-regi">Update to the IETF XML Registry</name>
        <t indent="0" pn="section-7.1-1">IANA has registered the following URI in the "IETF XML Registry" <xref target="RFC3688" format="default" sectionFormat="of" derivedContent="RFC3688"/>:
</t>
        <dl spacing="compact" indent="3" newline="false" pn="section-7.1-2">
          <dt pn="section-7.1-2.1">URI:</dt>
          <dd pn="section-7.1-2.2">urn:ietf:params:xml:ns:yang:ietf-nmda-compare</dd>
          <dt pn="section-7.1-2.3">Registrant Contact:</dt>
          <dd pn="section-7.1-2.4">The IESG.</dd>
          <dt pn="section-7.1-2.5">XML:</dt>
          <dd pn="section-7.1-2.6">N/A; the requested URI is an XML namespace.</dd>
        </dl>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.2">
        <name slugifiedName="name-update-to-the-yang-module-n">Update to the YANG Module Names Registry</name>
        <t indent="0" pn="section-7.2-1">
   IANA has registered the following YANG module in the "YANG Module Names"
   registry <xref target="RFC6020" format="default" sectionFormat="of" derivedContent="RFC6020"/>: 
</t>
        <dl spacing="compact" indent="3" newline="false" pn="section-7.2-2">
          <dt pn="section-7.2-2.1">name:</dt>
          <dd pn="section-7.2-2.2">ietf-nmda-compare</dd>
          <dt pn="section-7.2-2.3">namespace:</dt>
          <dd pn="section-7.2-2.4">urn:ietf:params:xml:ns:yang:ietf-nmda-compare</dd>
          <dt pn="section-7.2-2.5">prefix:</dt>
          <dd pn="section-7.2-2.6">cmp</dd>
          <dt pn="section-7.2-2.7">reference:</dt>
          <dd pn="section-7.2-2.8">RFC 9144</dd>
        </dl>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-8">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-8-1">
   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" sectionFormat="of" derivedContent="RFC6241"/> or RESTCONF <xref target="RFC8040" format="default" sectionFormat="of" derivedContent="RFC8040"/>.  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" sectionFormat="of" derivedContent="RFC6242"/>.  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/>.
</t>
      <t indent="0" pn="section-8-2">
   The Network Configuration Access Control Model (NACM) <xref target="RFC8341" format="default" sectionFormat="of" derivedContent="RFC8341"/> 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 indent="0" pn="section-8-3">NACM specifies access for the server in its entirety, and the same access rules apply to all datastores. 
Any subtrees to which a requestor does not have read access are silently 
skipped and not included in the comparison.</t>
      <t indent="0" pn="section-8-4">
   The RPC operation defined in this YANG module, &lt;compare&gt;, may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control access to this operation.  This is the sensitivity/vulnerability of RPC operation &lt;compare&gt;:
      </t>
      <t indent="0" pn="section-8-5">
  Comparing datastores for differences requires a certain amount of processing resources at the server.  An attacker could attempt to attack a server by making a high volume of comparison requests. Server implementations can guard against such scenarios in several ways.  For one, they can implement the NACM in order to require proper authorization for requests to be made.  Second, server implementations can limit the number of requests that they serve to a client in any one time interval, rejecting requests made at a higher frequency than the implementation can reasonably sustain.  
</t>
    </section>
  </middle>
  <back>
    <references pn="section-9">
      <name slugifiedName="name-references">References</name>
      <references pn="section-9.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688" quoteTitle="true" derivedAnchor="RFC3688">
          <front>
            <title>The IETF XML Registry</title>
            <author initials="M." surname="Mealling" fullname="M. Mealling">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2004" month="January"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020" quoteTitle="true" derivedAnchor="RFC6020">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="October"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241" quoteTitle="true" derivedAnchor="RFC6241">
          <front>
            <title>Network Configuration Protocol (NETCONF)</title>
            <author initials="R." surname="Enns" fullname="R. Enns" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Bierman" fullname="A. Bierman" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC6242" target="https://www.rfc-editor.org/info/rfc6242" quoteTitle="true" derivedAnchor="RFC6242">
          <front>
            <title>Using the NETCONF Protocol over Secure Shell (SSH)</title>
            <author initials="M." surname="Wasserman" fullname="M. Wasserman">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC6991" target="https://www.rfc-editor.org/info/rfc6991" quoteTitle="true" derivedAnchor="RFC6991">
          <front>
            <title>Common YANG Data Types</title>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2013" month="July"/>
            <abstract>
              <t indent="0">This document introduces a collection of common data types to be used with the YANG data modeling language.  This document obsoletes RFC 6021.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6991"/>
          <seriesInfo name="DOI" value="10.17487/RFC6991"/>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950" quoteTitle="true" derivedAnchor="RFC7950">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC7951" target="https://www.rfc-editor.org/info/rfc7951" quoteTitle="true" derivedAnchor="RFC7951">
          <front>
            <title>JSON Encoding of Data Modeled with YANG</title>
            <author initials="L." surname="Lhotka" fullname="L. Lhotka">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t indent="0">This document defines encoding rules for representing configuration data, state data, parameters of Remote Procedure Call (RPC) operations or actions, and notifications defined using YANG as JavaScript Object Notation (JSON) text.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7951"/>
          <seriesInfo name="DOI" value="10.17487/RFC7951"/>
        </reference>
        <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040" quoteTitle="true" derivedAnchor="RFC8040">
          <front>
            <title>RESTCONF Protocol</title>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="January"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC8072" target="https://www.rfc-editor.org/info/rfc8072" quoteTitle="true" derivedAnchor="RFC8072">
          <front>
            <title>YANG Patch Media Type</title>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="February"/>
            <abstract>
              <t indent="0">This document describes a method for applying patches to configuration datastores using data defined with the YANG data modeling language.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8072"/>
          <seriesInfo name="DOI" value="10.17487/RFC8072"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340" quoteTitle="true" derivedAnchor="RFC8340">
          <front>
            <title>YANG Tree Diagrams</title>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Berger" fullname="L. Berger" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341" quoteTitle="true" derivedAnchor="RFC8341">
          <front>
            <title>Network Configuration Access Control Model</title>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t indent="0">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 indent="0">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>
        <reference anchor="RFC8342" target="https://www.rfc-editor.org/info/rfc8342" quoteTitle="true" derivedAnchor="RFC8342">
          <front>
            <title>Network Management Datastore Architecture (NMDA)</title>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Shafer" fullname="P. Shafer">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Wilton" fullname="R. Wilton">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="August"/>
            <abstract>
              <t indent="0">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 indent="0">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>
        <reference anchor="W3C.REC-xml-20081126" target="https://www.w3.org/TR/2008/REC-xml-20081126" quoteTitle="true" derivedAnchor="W3C.REC-xml-20081126">
          <front>
            <title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>
            <author initials="T." surname="Bray" fullname="Tim Bray">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Paoli" fullname="Jean Paoli">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Sperberg-McQueen" fullname="Michael Sperberg-McQueen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Maler" fullname="Eve Maler">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="F." surname="Yergeau" fullname="Francois Yergeau">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="November" year="2008"/>
          </front>
          <refcontent>World Wide Web Consortium Recommendation REC-xml-20081126</refcontent>
        </reference>
      </references>
      <references pn="section-9.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="RFC8343" target="https://www.rfc-editor.org/info/rfc8343" quoteTitle="true" derivedAnchor="RFC8343">
          <front>
            <title>A YANG Data Model for Interface Management</title>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t indent="0">This document defines a YANG data model for the management of network interfaces.  It is expected that interface-type-specific data models augment the generic interfaces data model defined in this document. The data model includes definitions for configuration and system state (status information and counters for the collection of statistics).</t>
              <t indent="0">The YANG data model in this document conforms to the Network Management Datastore Architecture (NMDA) defined in RFC 8342.</t>
              <t indent="0">This document obsoletes RFC 7223.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8343"/>
          <seriesInfo name="DOI" value="10.17487/RFC8343"/>
        </reference>
      </references>
    </references>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-possible-future-extensions">Possible Future Extensions</name>
      <t indent="0" pn="section-appendix.a-1">It is conceivable to extend the &lt;compare&gt; operation with a number of possible additional features in the future.  </t>
      <t indent="0" pn="section-appendix.a-2">
    Specifically, it is possible to define an extension with an optional feature for dampening. This will allow clients to specify a minimum time period for which a difference must persist for it to be reported.  This will enable clients to distinguish between differences that are only fleeting from ones that are not and that may represent a real operational issue and inconsistency within the device.  
      </t>
      <t indent="0" pn="section-appendix.a-3">For this purpose, an additional input parameter can be added to specify the dampening period.  Only differences that pertain 
           for at least the dampening time are reported.   
           A value of 0 or omission of the parameter indicates no 
           dampening. 
           Reporting of differences <bcp14>MAY</bcp14> correspondingly be delayed by the dampening period from the time the request is received.
      </t>
      <t indent="0" pn="section-appendix.a-4"> 
    To implement this feature, a server implementation might run a comparison when the RPC is first invoked and temporarily store the result.  Subsequently, it could wait until after the end of the dampening period to check whether the same differences are still observed.  The differences that still persist are then returned. 
      </t>
    </section>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.b-1">We thank <contact fullname="Rob Wilton"/>, <contact fullname="Martin Bjorklund"/>, <contact fullname="Mahesh Jethanandani"/>, <contact fullname="Lou Berger"/>, <contact fullname="Kent Watsen"/>, <contact fullname="Phil Shafer"/>, <contact fullname="Ladislav Lhotka"/>, <contact fullname="Tim Carey"/>, and <contact fullname="Reshad Rahman"/> for their valuable feedback and suggestions. 
</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author fullname="Alexander Clemm" initials="A." surname="Clemm">
        <organization showOnFrontPage="true">Futurewei</organization>
        <address>
          <postal>
            <street>2330 Central Expressway</street>
            <city>Santa Clara</city>
            <region>CA</region>
            <country>United States of America</country>
            <code>95050</code>
          </postal>
          <phone/>
          <email>ludwig@clemm.org</email>
        </address>
      </author>
      <author fullname="Yingzhen Qu" initials="Y." surname="Qu">
        <organization showOnFrontPage="true">Futurewei</organization>
        <address>
          <postal>
            <street>2330 Central Expressway</street>
            <city>Santa Clara</city>
            <region>CA</region>
            <country>United States of America</country>
            <code>95050</code>
          </postal>
          <phone/>
          <email>yqu@futurewei.com</email>
        </address>
      </author>
      <author fullname="Jeff Tantsura" initials="J." surname="Tantsura">
        <organization showOnFrontPage="true">Microsoft</organization>
        <address>
          <email>jefftant.ietf@gmail.com</email>
        </address>
      </author>
      <author fullname="Andy Bierman" initials="A." surname="Bierman">
        <organization showOnFrontPage="true">YumaWorks</organization>
        <address>
          <email>andy@yumaworks.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
