<?xml version="1.0" encoding="US-ASCII"?>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-netconf-yang-library-augmentedby-10"
     ipr="trust200902">
  <front>
    <title abbrev="Augmented-by for YANG Library">
    Augmented-by Addition to the YANG Library</title>

    <author fullname="Zhuoyao Lin" initials="Z " surname="Lin">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>Townsend Street, 4th Floor George's Court</street>
          <city>Dublin</city>
          <country>Ireland</country>
        </postal>
        <email>zhuoyao.lin1@huawei-partners.com</email>
      </address>
    </author>

    <author fullname="Benoit Claise" initials="B " surname="Claise">
      <organization>Huawei</organization>
      <address>
        <email>benoit.claise@huawei.com</email>
      </address>
    </author>

    <author fullname="Ignacio Dominguez Martinez-Casanueva" initials="I. D." surname="Martinez-Casanueva">
      <organization>Telefonica</organization>
      <address>
        <postal>
          <street>Ronda de la Comunicacion, S/N</street>
          <city>Madrid 28050</city>
          <country>Spain</country>
        </postal>
        <email>ignacio.dominguezmartinez@telefonica.com</email>
      </address>
    </author>

    <date day="23" month="July" year="2025"/>

    <area>OPS</area>

    <workgroup>NETCONF</workgroup>

    <abstract>
      <t>
      This document augments the ietf-yang-library to provide the augmented-by 
      list. It facilitates the process of obtaining all dependencies 
      between YANG modules, by querying the network management server's YANG library.
      </t>
    </abstract>

    <note title="Discussion Venues" removeInRFC="true" >
      <t>
      Source for this draft and an issue tracker can be found at <eref
      target="https://github.com/Zephyre777/draft-lincla-netconf-yang-library-augmentation" />.
      </t>
    </note>
  </front>

<middle>
  <section anchor="intro" title="Introduction">

    <t>
      The YANG library <xref target="RFC8525" /> provides information about the data model supported by the server. This is presented as an inventory of YANG modules. It helps a client with listing all datastores supported by a network management server and the schema that is used by each of these datastores.</t>
    <t>
    According to Section 4.2.8 and 5.6.3 in <xref target="RFC7950" />, augment defines additional nodes to the module while deviations change (add, modify, delete) properties (sub-statements) to other module's schema nodes. They provide crucial information about the YANG data model composition, and is referred to as reverse dependency in this document: this means the behavior of a schema node depends on external modifications, creating flow backward from the augmenting/deviation module to the base module. </t>
    <t>
    Currently it is difficult to obtain the YANG schema tree (defined in Section 3 in <xref target="RFC7950"/>) without obtaining and parsing all the YANG modules from a management server. The deviation list defined in YANG library 
    enables client to obtain the module reverse dependency without having to 
    get and parse all YANG modules. However, the augmentation list is not defined in it.
    </t><t>
    Since both augmentation and deviation work as YANG module dependencies, 
    it is reasonable to document them the same way in the YANG library. 
    Having both augmentation and deviation directly 
    available in the YANG library provides an easy and light-weight 
    solution for determining the reverse dependencies.
    </t>

    <t>Therefore, this document proposes a YANG module that augments the YANG library to include the YANG module augmentation information.</t>

    <section anchor="terminology" title="Terminology">
      <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" /> <xref target="RFC8174" /> when, and only
      when, they appear in all capitals, as shown here.</t>

      <t>The terminology from <xref target="RFC8525" /> is used in this document</t>

      <t>The term "client" is used as defined in <xref target="RFC6241"/> for NETCONF and <xref target="RFC8040"/> for RESTCONF.</t>

      <t>The term "YANG schema tree" is used as defined in the terminology in <xref target="RFC7950"/></t> 

      <t>The term 'NMDA' which is defined as the title of <xref target="RFC8342"/> is used in this document.</t>

      <t>Tree diagrams in this document use the notation defined in
        <xref target="RFC8340" /> .</t>
      <t>This document defines the following term:</t>
      <t>
        <ul>
          <li>Reverse Dependency: The dependency YANG modules that provide modification to the behavior of a base YANG module's schema node, creating flow backward from the augmenting/deviation module to the base module, while they are not specified in the base module as opposed to the 'import' or 'include'. </li>
        </ul>
      </t>
    </section>
  </section>

    <section anchor="motivation" title="Motivation">

    <t>When using YANG modules, it is necessary to make sure
    that all its dependencies are presented. <xref target="RFC7950" />
    identifies four types of dependencies between YANG modules:</t>

    <t>
    <ul>
      <li>Import: the "import" statement allows a module or
      submodule to reference definitions defined in other modules.</li>

      <li>Include: the "include" statement is used in a module
      to identify each submodule that belongs to it.</li>

      <li>Augment: the augmentation defines the
      location in the data model hierarchy where additional
      nodes are inserted.</li>

      <li>Deviation: the "deviation" statement defines a
      fragment of a module that the server does not
      implement.</li>
    </ul>
    </t>
    <t>The import and include are direct dependencies which can be obtained by parsing the YANG module source code, while the augmentation and deviation are reverse dependencies which are defined in another module.
    </t>
    <t>
      For the reverse dependencies, since they are defined
      externally, it is not possible to discover them by parsing the YANG module.
      The current way to discover the reverse dependencies is to query 
      all YANG modules from the server and parse them. This is a lengthy 
      process, which must be repeated for each client that requires this 
      information.
    </t>
    <t>
      According to the definition of the module ietf-yang-library defined in 
      <xref target="RFC8525"/>, the "deviation" list describes that a module is deviated by which other modules. If the YANG library could directly report all reverse dependencies, 
      it would provide a much easier and light-weight solution to find module 
      all dependencies, compared to obtaining and parsing all modules.
    </t>
    <t>
      The YANG library only provides the deviation 
      list, without augmentations. With augmentations 
      being more widely used and defined, and with use cases to automate network management, augmentations become 
      essential information for clients to better understand the network management server module 
      relationships. Thus, the YANG library should be extended to also provide the augmentation information.
    </t>
    <t>
      From the perspective of the operational efficiency, it is easy to adapt the device implementation to include augmentation, since augmentation and deviation work similarly. 
    </t>
  </section>

  <section anchor="Use Cases" title="Use Cases">
  <t>
  As the demand for
  YANG-based telemetry <xref target="RFC8641"/> arises, there is
  a need for real-time knowledge of a specific YANG module's
  dependency list when a specific YANG-Push notification for a given subscription is
  received. </t>
  <t>The alternative for a YANG-Push receiver is to
  collect and store the entire module set for every single
  server who could be streaming data. This approach is not
  always practical due to the following reasons:
  </t>
  <t>
    <ul>
      <li>A YANG-push receiver will not know which YANG-Push publisher sent the subscribed YANG content until the first notification is received.</li>
      <li>For a YANG-Push receiver =&gt; from which YANG-Push publisher
     the subscribed YANG content is going to be received is not known until the first notification is being received.</li>
      <li>Querying all the YANG modules is time-consuming and add overhead considering that only a subset of the YANG nodes of the management server are subscribed to.</li>
    </ul>
  </t>
  <t>This section introduces two use cases that reflect the motivation
  for extending the YANG library. One targets solving dependency problems in
  a data mesh architecture while the other aims at building a
  data catalog that makes YANG module information easily accessible.
  </t>
    <section anchor="Data Mesh Architecture" title="Data Mesh Architecture">
      <t>
      A network analytics architecture that integrates YANG-Push and
      Kafka is introduced in draft:
      <xref target="I-D.ietf-nmop-yang-message-broker-integration">An
      Architecture for YANG-Push to Apache Kafka Integration</xref>.
      This open-source project encompasses contributions such as
      <xref target="I-D.ietf-netconf-yang-notifications-versioning">
      Support of Versioning in YANG Notifications Subscription</xref> or
      <xref target="I-D.netana-netconf-notif-envelope">
      Support of Network Observation Timestamping in YANG Notifications
      </xref>, among others. </t>

      <t>The purpose of this project is to provide adequate
      information to the YANG-Push notifications so that the module and its dependencies can be parsed and retrieved automatically from the vantage point. The architecture relies on
      the information of YANG dependencies to realize, to solve the problem of missing YANG
      semantics when notifications are transformed or indexed in Time Series Database.
      As a solution to provide the missing YANG semantics, a schema registry is introduced to store YANG modules and all their relationships (Direct and reverse dependencies). The schema is obtained by NETCONF &lt;get-schema&gt; operation (defined in Section 3.1 of <xref target="RFC6022"/>) of the subscribed YANG schema tree, which is obtained by parsing the &lt;subscription-started&gt; message of each YANG-Push subscription.
      </t>
      <t>When obtaining the dependency modules of a YANG module, an independent 
      process containing multiple &lt;get-schema&gt; operations <xref target="RFC6022"/> is launched
      after each new YANG-Push subscription module has been known. 
      However, the complexity remains at:
      </t>
      <t>
        <ul>
          <li>
            How dependencies of YANG modules are found (so that
            the YANG-Push subscription message has the complete set of module
            dependencies for its subscribed YANG schema tree)?
          </li>
          <li>
          How do we conduct &lt;get-schema&gt;? 
          </li>
        </ul>
      </t>

      <t>Currently, the method used for obtaining modules and finding module 
      dependencies is getting the full set of supported YANG modules from the network device.  This process is very heavy because in practice, each device may implement hundreds of YANG modules, requiring up to
      several minutes to complete the YANG modules retrieval. Besides, the need
      for parsing all YANG modules and finding all the dependencies adds an
      extra delay. Obtaining all dependencies through this method makes the operation very costly, since after each subscribed module is learned, the operation of getting the full set of modules needs to be performed again. 
      </t>
      <t>
      Therefore, considering the Network Observability real-time aspects, this extra
      delay in collecting (and processing) the dependencies through the approach of getting the full set of modules is not realistic.
      </t>
      <t>It's more efficient to get dependencies only for the required modules.
      </t>
      <t>
      By using the provided the augmentation information in ietf-yang-library, 
      the YANG-Push receiver can directly obtain the YANG reverse dependencies 
      by obtaining the contents of the YANG library, saving
      collection (and processing time) at the YANG-Push receiver and therefore
      helping with the real-time aspects of Network Observability and enabling closed-loop actions.
      </t>
    </section>
    <section anchor="Data Catalog" title="Data Catalog">

      <t>Finding the YANG modules implemented by a network management server is paramount for
      configuring and monitoring the status of a network. However, since the
      inception of YANG the network industry has experienced a tsunami of
      YANG modules developed by SDOs, open-source communities,
      and network vendors. This heterogeneity of YANG modules, that vary
      from one network device model to another, makes the management of a
      multi-vendor network a big challenge
      for operators. <xref target="Martinez-Casanueva2023"></xref></t>

      <t>In this regard, a data catalog provides a registry of the datasets
      exposed by remote data sources for consumers to discover data
      of interest. Besides the location of the dataset
      (i.e., the data source), the data catalog registers
      additional metadata such as the data model (or schema) followed in the
      dataset or even related terms defined in a business glossary.</t>

      <t>Data catalog solutions typically implement collectors that
      ingest metadata from the data sources themselves and external
      metadata sources. For example, a Kafka Schema Registry is a
      metadata source that provides metadata about the data models
      followed by some data stored in a Kafka topic.</t>

      <t>In this sense, a YANG-enabled network device can be considered
      as another kind of data source, which the Data Catalog can
      pull metadata from. For instance, the data catalog can include a
      connector that fetches metadata about the YANG modules implemented
      by the network device. Combining these metadata with other such as
      the business concept "interface", would enable data consumers to
      discover which datasets related to the concept "interface"
      are exposed by the network device.</t>

      <t>Network devices that implement YANG library expose metadata
      about which YANG modules are implemented, and which are only imported.
      However, what a data consumer needs at the end are the YANG modules
      implemented by the device, hence, the combination of implemented YANG
      modules with other YANG modules that might deviate or augment the formers.</t>

      <t>Coming back to the example of datasets related to the "interface"
      concept, say we have a network device that implements the
      ietf-interfaces module <xref target="RFC8343" />
      and the ietf-ip module <xref target="RFC8344" />,
      where the latter augments the former. For a data catalog to
      collect these metadata, a connector would retrieve YANG library
      data from the target device. However, the current version
      of YANG library would not satisfy the use case as it would
      tell that the device implements both ietf-interfaces and ietf-ip
      modules, but will miss the augment dependency between them.</t>

      <t>The current workaround is in combination with the
      YANG library data to additionally obtain both YANG modules and process them
      to discover that there is an augment dependency. This adds extra burden
      on the connector, which is forced to combine multiple metadata collection
      mechanisms. This process could be softened by extending YANG library
      to also capture augment dependencies, in a similar fashion to
      deviation dependencies.</t>

    </section>
  </section>

  <section anchor="ietf-yang-library-augmentedby-model" title="The &quot;ietf-yang-library-augmentedby&quot; YANG module">
      <t>
      This YANG module augments the ietf-yang-library module by adding the
      augmented-by leaf-list in the "yang-library/module-set" and "yang-library/modules-state". The name of list "augmented-by" indicates by which modules that the current module is being directly augmented.</t>
      <t> The "yang-library/module-state" is augmented despite its "deprecated" state to cope with the situation when container "modules-state" is used for compatibility reason with ietf-yang-library defined in <xref target="RFC7895"/>. Both the NMDA<xref target="RFC8342"/> and non-NMDA compliant additions are defined in the same YANG module for simplicity for users and implementors.
      </t>
      <t>For the scope of "augmented-by", this draft only considers the direct augmentation relationship. The recursive result of augmentation or transitive dependency for module specified along the XPath, is out of the scope of this draft. Section 4.2 has given the implementation instructions.</t>

  <section anchor="data-model-overview" title="Data Model Overview">

  <section anchor="Tree-View" title="Tree View">
       <t>The following is the YANG tree diagram for model ietf-yang-library-augmentedby.</t>
        <t><figure>
              <artwork><![CDATA[
module: ietf-yang-library-augmentedby

  augment /yanglib:yang-library/yanglib:module-set/yanglib:module:
    +--ro augmented-by*   -> ../../yanglib:module/name
  augment /yanglib:modules-state/yanglib:module:
    +--ro augmented-by*   -> ../../yanglib:module/name
]]></artwork>
          </figure></t>
    </section>




   <section anchor="YANG-revision-module" title="YANG Module">
        <t>The YANG module source code of ietf-yang-library-augmentedby
        in which augmentation to the ietf-yang-library of <xref target="RFC8525"/>
        is defined.</t>

        <t><figure>
            <artwork><![CDATA[
<CODE BEGINS> file "ietf-yang-library-augmentedby@2025-05-28.yang"
module ietf-yang-library-augmentedby {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-yang-library-augmentedby";
  prefix yanglib-aug;

  import ietf-yang-library {
    prefix yanglib;
    reference
      "RFC 8525: YANG Library";
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
     WG List:  <mailto:netconf@ietf.org>

     Authors:   Zhuoyao Lin
               <mailto:zhuoyao.lin1@huawei-partners.com>
               Benoit Claise
               <mailto:benoit.claise@huawei.com>
               Ignacio Dominguez Martinez-Casanueva
               <matilto:ignacio.dominguezmartinez@telefonica.com>";
  description
    "This module augments the ietf-yang-library defined in
     [RFC8525] to provide not only the deviation list, but also
     the augmented-by list, in order to give sufficient
     information about the YANG modules reverse dependency. It
     facilitates the process of obtaining the entire
     dependencies of YANG module.

     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.

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

  revision 2025-05-28 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: Augmented-by Addition to the YANG Library";
  }

  grouping augmented-by {
    description
      "Augment the augmented-by leaf-list from module info with the
       module-augmented-by grouping";
    leaf-list augmented-by {
      type leafref {
        path "../../yanglib:module/yanglib:name";
      }
      description
        "Leaf-list of the augmentation used by this server to
         modify the conformance of the module associated with
         this entry.  Note that the same module can be used for
         augmented-by for multiple modules, so the same
         entry MAY appear within multiple 'module' entries.

         This reference MUST NOT (directly or indirectly)
         refer to the module being augmented.

         Robust clients may want to make sure that they handle a
         situation where a module augments itself (directly or
         indirectly) gracefully.";
    }
  }

  augment "/yanglib:yang-library/yanglib:module-set/yanglib:module" {
    description
      "Augments the augmented-by leaf-list from module info with the
       augmented-by grouping.

       The 'augmented-by' leaf-list should only consider those YANG
       modules that directly augment the YANG module associated
       with this entry, and the augmenting and augmented modules
       should be defined in the same module-set.

       The 'directly augment' is identified by the relationship
       between the augment module and the target node's parent
       module that it augments to. Only the direct parent module
       of the target node is augmented, and the rest of the parent
       modules defined in the schema tree are only indirect
       dependencies but not augmented modules. (Refer to
       'Target node' definition in Section 7.17 of RFC7950)
      ";
    uses augmented-by;
  }

  augment "/yanglib:modules-state/yanglib:module" {
    status deprecated;
    description
      "Augments the augmented-by leaf-list from module info with the
       augmented-by grouping.

       The 'augmented-by' leaf-list should only consider those YANG
       modules that directly augment the YANG module associated
       with this entry, and the augmenting and augmented modules
       should be defined in the same module-set.

       The 'directly augment' is identified by the relationship
       between the augment module and the target node's parent
       module that it augments to. Only the direct parent module
       of the target node is augmented, and the rest of the parent
       modules defined in the schema tree are only indirect
       dependencies but not augmented modules. (Refer to
       'Target node' definition in Section 7.17 of RFC7950)
      ";
    uses augmented-by;
  }
}

<CODE ENDS>]]></artwork>
          </figure></t>
    </section>

  </section>

  <section anchor="implementaionInstruction" title="Implementation Instructions">
    <section anchor="scope" title="The scope of augmented-by">
    <t>This section explains the scope of augmented-by.
    </t>
    <t>
    The "augmented-by" leaf-list should only consider those YANG modules that directly augment the YANG module in question in the ietf-yang-library, and the augmenting and augmented modules should be defined in the same module-set. </t>
    <t>The "direct augment" is identified by the relationship between the augment module and the target node's parent module that it augments to. Only the direct parent module of the target node is augmented, and the rest of the parent modules defined in the schema tree are only indirect dependencies but not augmented modules. (Refer to "Target node" definition in Section 7.17 of <xref target="RFC7950"/>)
    </t>

    <t>In the case when a YANG application requires recursive dependency or specific schema tree dependency, the search logic should be implemented by the application itself.</t>

    <t>A YANG example with the expected augmented-by result is provided in Section 4.2.2.</t>

    </section>
    <section anchor="exampleOfAugmentedBy" title="An example of YANG module augmented-by result">
      <t>This section provides a module-set to explain the definition of "direct augment" stated in Section 4.2.1.</t>
      <t>There are Modules A, B, C, which have the following relationships:</t>
      <t>
        <ul>
          <li>Module A is the base module with container "foo-a"</li>
          <li>Module B augments "/a:foo-a" with container "foo-b"</li>
          <li>Module C augments "/a:foo-a/b:foo-b" with leaf "leaf-c"</li>
        </ul>
      </t>
      <t>In this example, while the XPath that Module C augments to contains container "foo-a" defined in Module A, the actual target node it directly augments to is "foo-b" in Module B. Therefore, Module C is not an augmentation for Module A and does not appear in the "augmented-by" leaf-list of Module A. Only Module B, which is directly augmenting to "foo-a", is an "augmented-by" for Module A.</t>
      <t>The augmented-by XML result for Modules A, B and C is the following:</t>

        <t><figure>
            <artwork><![CDATA[
<CODE BEGINS>file "example_augmentedby_result.xml"
<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> 
  <content-id>1</content-id>
  <module-set> 
    <name>module-set1</name>
    <module>
      <name>a-module</name>
      <revision>2025-06-18</revision> 
      <namespace>urn:ietf:params:xml:ns:yang:a-module</namespace>
      <augmented-by 
      xmlns="urn:ietf:params:xml:ns:yang:
      ietf-yang-library-augmentedby">b-module</augmented-by>
    </module>
    <module>
      <name>b-module</name>
      <revision>2025-06-18</revision> 
      <namespace>urn:ietf:params:xml:ns:yang:b-module</namespace>
      <augmented-by 
      xmlns="urn:ietf:params:xml:ns:yang:
      ietf-yang-library-augmentedby">c-module</augmented-by>
    </module>
    <module>
      <name>c-module</name>
      <revision>2025-06-18</revision> 
      <namespace>urn:ietf:params:xml:ns:yang:c-module</namespace>
    </module>
  </module-set>
</yang-library>
<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> 
  <module-set-id>0</module-set-id>
</modules-state>

<CODE ENDS>]]></artwork>
          </figure></t>

    </section>
  </section>
  </section>

  <section anchor="opConsideration" title="Operational Considerations">
    <t>With the implementation of augmented-by, the modules and the augmented-by modules require now to be listed in the same module-set.</t>

  </section>

    <section anchor="Implementation" title="Implementation Status">
      <t>
      Note to the RFC-Editor: Please remove this section before
      publishing (This follows the template in RFC7942).
      </t>
      <section anchor="Netopeer2 IETF119 hackahon" title="Netopeer2 at IETF119 Hackathon">
        <t>Zhuoyao Lin did the prototype implementation of the augmented-by
          list feature of this draft and demonstrated it based on Netopeer2
          in IETF 119 Hackathon. </t>
        <t>
        Netopeer2 is a NETCONF server &amp; client implementation developed by
        CESNET. Source code is here: <xref target="NTP17"/>.
        The actual feature is implemented by extending the libyang
        <xref target="LY16"/> and sysrepo <xref target="SR16"/> which are the
        base libraries for Netopeer2 to support populating the augmented-by
        list.
        </t>
      </section>
      <section anchor="Netopeer2 IETF120 hackahon" title="Netopeer2 at IETF120 Hackathon">
        <t>Zhuoyao Lin did a docker image of netopeer2 that integrates the 
          augmented-by feauture in sysrepo and libyang. The result is presented
          at IETF 120 hackathon.
        </t>
        <t>
          The source code can be obtained here: <xref target="NP24"/> 
        </t>
      </section>
      <section anchor="libyangpush" title="Libyangpush Find-dependency">
        <t>Zhuoyao Lin did an implementation of find-dependency based on the 
          ietf-yang-library with augmented-by feature in the YANG-Push message
          parser library libyangpush. The result is presented in IETF 120
          hackathon.
        </t>
        <t>
          The source code can be obtained here: <xref target="NP24"/> 
        </t>
      </section>
      <section anchor="Device Implementations" title="Device Implementations">
        <t>This section introduced the device implementations status <xref target="NA25"/> of this document from vendors like Huawei, Cisco, 6Wind. </t>
        <t>The list of Router Images supporting (upcoming and already implemented) the ietf-yang-library-augmentedby YANG module proposed in this document is following:</t>
        <t>
          <ul>
            <li>Huawei VRP R025C00 for NE8000 and NE40 (2025-10-15). <eref
      target="https://support.huawei.com/"/></li>
            <li>Cisco IOS XR 25.3.1 (2025-08-31). <eref
      target="https://software.cisco.com/"/></li>
            <li>Huawei VRP R024C10 for MA5800T-X17 (2025-06-30). <eref
      target="https://support.huawei.com/"/></li>
            <li>6WIND VSR 3.10. <eref
      target="https://www.6wind.com/"/></li>
          </ul>
        </t>
      </section>
    </section>

    <section anchor="Changes" title="Changes">
      <section anchor="draft-lincla-netconf-yang-library-augmentation: Changes from 00 to 01"
      title="draft-lincla-netconf-yang-library-augmentation: Changes from 00 to 01">
        <t>
        The list name has been updated from "augmentation" to
        "augmented-by", in order to represent the usage clearly.
        </t>
        <t> The leafref has been changed from absolute path
        "/yanglib:yang-libraray/yanglib:module-set/yanglib:module/yanglib:name"
        to relative path "../../yanglib:module/yanglib:name".
        The YANG validation in the appendix B shows that this path
        can work as expected.
        </t>
        <t>Section 5 Implementation and section 6 Changes has been added.</t>
      </section>
      <section anchor="draft-lincla-netconf-yang-library-augmentedby version 00" 
      title="draft-lincla-netconf-yang-library-augmentedby version 00">
        <t>
          Updated the Use case content in Section 3.1. Add explanation: the 
          scope of use case "Data Mesh Architecture" is limited to configured
          subscription.
        </t>
        <t>
          Updated Implementation status content.
        </t>
      </section>
      <section anchor="draft-lincla-netconf-yang-library-augmentedby: Changes from 00 to 01" 
      title="draft-lincla-netconf-yang-library-augmentedby: Changes from 00 to 01">
        <t>
          Updated affiliations
        </t>
        <t>
          Update content of Section 3.1 Data Mesh use case. Explain the
          limitation of applying get-all-schemas solution under the background 
          of using UDP-notif of configured subscription, and how the feature 
          proposed in the draft can improve the solution. 
        </t>
        <t>
          Full review of document. Nits and refinement of sections.
        </t>
      </section>
      <section anchor="draft-lincla-netconf-yang-library-augmentedby: Changes from 01 to 02" 
      title="draft-lincla-netconf-yang-library-augmentedby: Changes from 01 to 02">
        <t>
          Rewrite Section 2 Motivation.
        </t>
        <t>
          Update Section 6 Changes's subsection title. 
        </t>
        <t>
          Update the Section 7 security consideration and section 8 IANA
          Considerations.
        </t>
        <t>
          Added in the appendix the Impact Analysis of ietf-yang-library and
          proposal for the RFC8525bis draft. 
        </t>
      </section>
      <section anchor="draft-ietf-netconf-yang-library-augmentedby version 00" 
      title="draft-ietf-netconf-yang-library-augmentedby version 00">
        <t>
          Resubmitted the draft name from:
        </t><t>
          draft-lincla-netconf-yang-library-augmentedby-02
        </t><t>
          to: 
        </t><t>
          draft-ietf-netconf-yang-library-augmentedby-00
        </t>
      </section>
      <section anchor="draft-ietf-netconf-yang-library-augmentedby: Changes from 00 to 01" 
      title="draft-ietf-netconf-yang-library-augmentedby: Changes from 00 to 01">
        <t>
          Correct the yanglint validation invalid example. 
        </t>
        <t>
          Updated the explaination to the yanglint validation example 
          principle. 
        </t>
        <t>
          Delete Section "ietf-yang-library Impact Analysis, as an evaluation
          for RFC8525bis". The idea of updating the RFC8525 is paused.
        </t>
      </section>
      <section anchor="Changes from 01 to 02" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 01 to 02">
        <t>Update and rephrase the Introduction section. </t>
        <t>Add Section 4.2 Implementation Instructions. Address in Section 4.2.1 that the definition of "augmented-by" only consider the direct augment. A YANG example for explaining this purpose has been put into Section 4.2.2.</t>
        <t>Draft refinement.</t>
        <t>Reference update.</t>
      </section>
      <section anchor="Changes from 02 to 03" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 02 to 03">
        <t>Merge review comment from Thomas.</t>
      </section>
      <section anchor="Changes from 03 to 04" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 03 to 04">
        <t>Update module content ietf-yang-library-augmentedby: Organise the augmentation content to grouping; Add augmentation to modules-state container. </t>
        <t>Appendix B is deleted.</t>
      </section>
      <section anchor="Changes from 04 to 05" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 04 to 05">
        <t>Update ietf-yang-library-augmentedby module revision.</t>
      </section>
      <section anchor="Changes from 05 to 06" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 05 to 06">
        <t>Merged Jean, Thomas and Alex's editorial feedback.</t>
        <t>Merged Andy's review. </t>
        <t>Changed contents are listed following: </t>
        <t>
          <ul>
            <li>Section 1: Rewrite introduction. Added definition for 'reverse dependency'. Avoid possible misleading  expression about reverse dependency and external dependency.</li>
            <li>Section 2: Editorial Changes.</li>
            <li>Section 3: Merged editorial feedback from Alex, mainly for Section 3.1.</li>
            <li>Section 4: Move the full tree diagram to appendix A; Correct the YANG file date; Update the description statement in YANG module to provide implementation instructions information; Improve the text of implementation instruction and the direct augment example.</li>
            <li>Appendix: For Appendix A: The ietf-yang-library full tree view has been moved to Appendix A. For Appendix B: The yanglint validation example has been moved from Appendix A to Appendix B. The invalid yanglint example has been removed. Set up texted has been added before the validation example.</li>
          </ul>
        </t>
      </section>
      <section anchor="Changes from 06 to 07" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 06 to 07">
        <t>
          Change the reference in IANA Consideration to 'RFC-to-be'.
        </t>
      </section>
      <section anchor="Changes from 07 to 08" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 07 to 08">
        <t>
          Merged Per's review and comments.
        </t>
      </section>
      <section anchor="Changes from 08 to 09" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 08 to 09">
        <t>
          Updated YANG module's line length and spacing. Corrected the "author" to "authors".
        </t>
        <t>Corrected typo.</t>
        <t>Added section 5 Operational Considerations to explain that the base and augmentedby modules should be in the same module-set.</t>
      </section>
      <section anchor="Changes from 09 to 10" title="draft-ietf-netconf-yang-library-augmentedby: Changes from 09 to 10">
        <t>
          Corrected the typo of 'requires'.
        </t>
        <t>Moved RFC8525 reference to Nomative References section.</t>
      </section>
    </section>

    <section anchor="security-considerations" title="Security Considerations">

      <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"/> or RESTCONF 
        <xref target="RFC8040"/>. The lowest NETCONF layer is the secure 
        transport layer, and the mandatory-to-implement secure transport is 
        Secure Shell (SSH) <xref target="RFC6242"/>. The lowest RESTCONF layer 
        is HTTPS, and the mandatory-to-implement secure transport is 
        TLS <xref target="RFC8446"/>.
      </t>
      <t>
        The Network Configuration Access Control Model (NACM) 
        <xref target="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>
        The readable node defined in this YANG module may be considered 
        sensitive or vulnerable in some network environments. It is thus 
        important to control read access (e.g., via get, get-config, or 
        notification) to this data node. The following is the explanation of
        data node's sensitivity/vulnerability:
      </t>
      <t>
        The "augmented-by" list in this YANG module could reveal all modules 
        that are augmenting one module. It could help attacker identify 
        the relationship between modules and server implementations known bugs.
        Server vulnerabilities may include but not restricted to: 1. Too many
        augmented-by records cause buffer overflow. 2. The augmented-by list
        helps identify through the inter-relation of modules how to cause the
        server to crash or significantly degrade device performance.
      </t>
    </section>
    <section anchor="iana-considerations" title="IANA Considerations">
    <t>
      This document registers one URI in the "IETF XML Registry"
      <xref target="RFC3688"/>. Following the format in 
      <xref target="RFC3688"/>, the following registration has been made.
    </t>
    <t>URI: urn:ietf:params:xml:ns:yang:ietf-yang-library-augmentedby</t>
      
    <t>Registration Contact: The NETCONF WG of the IETF.</t>
    <t>XML: N/A, the requested URI is an XML namespace.</t>
    <t>
      This document registers one YANG module in the "YANG Module Names" 
      registry <xref target="RFC6020"/>
    </t>
    <t>name: ietf-yang-library-augmentedby</t>
    <t>namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library-augmentedby</t>
    <t>prefix: yanglib-aug</t>
    <t>reference: RFC-to-be
    </t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>
      <?rfc include='reference.RFC.8174'?>
      <?rfc include='reference.RFC.8340'?>
      <?rfc include='reference.RFC.8343'?>
      <?rfc include='reference.RFC.8344'?>
      <?rfc include='reference.RFC.6241'?>
      <?rfc include='reference.RFC.8040'?>
      <?rfc include='reference.RFC.6242'?>
      <?rfc include='reference.RFC.8446'?>
      <?rfc include='reference.RFC.6020'?>
      <?rfc include='reference.RFC.8341'?>
      <?rfc include='reference.RFC.3688'?>
      <?rfc include='reference.RFC.8525'?>



    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.8641'?>
      <?rfc include='reference.RFC.7950'?>
      <?rfc include='reference.RFC.7895'?>
      <?rfc include='reference.RFC.8342'?>
      <?rfc include='reference.I-D.ietf-netconf-yang-notifications-versioning'?>

      <reference anchor="NP24" target="https://github.com/network-analytics/libyangpush/tree/feature/draft_augmentedby">
        <front>
          <title>Netopeer2-docker-ietf120</title>
          <author fullname="Zhuoyao Lin" initials="Z." surname="Lin"/>
          <date month="July" year="2024"/>
        </front>
      </reference>

      <reference anchor="NA25" target="https://www.network-analytics.org/yp/implementations.html">
        <front>
          <title>IETF YANG-Push - Implementations</title>
          <author/>
        </front>
      </reference>

      <reference anchor="NTP17"
      target="https://github.com/CESNET/netopeer2">
        <front>
          <title>Netopeer2</title>
          <author fullname="Michal Vasko" initials="M." surname="Vasko"/>
          <date month="May" year="2017"/>
        </front>
        <refcontent>BSD-3-Clause license</refcontent>
      </reference>
      <reference anchor="LY16"
      target="https://github.com/CESNET/libyang.git">
        <front>
          <title>libyang</title>
          <author fullname="Michal Vasko" initials="M." surname="Vasko"/>
          <date month="November" year="2016"/>
        </front>

        <refcontent>BSD-3-Clause license</refcontent>
      </reference>

      <reference anchor="SR16"
      target="https://github.com/sysrepo/sysrepo.git">
        <front>
          <title>sysrepo</title>

          <author fullname="Michal Vasko" initials="M." surname="Vasko"/>

          <date month="January" year="2016"/>
        </front>
        <refcontent>BSD-3-Clause license</refcontent>
      </reference>

      <reference anchor="RFC6022" target="https://www.rfc-editor.org/info/rfc6022">
        <front>
          <title>YANG Module for NETCONF Monitoring</title>
          <author fullname="M. Scott" initials="M." surname="Scott" />
          <author fullname="M. Bjorklund" initials="M." surname="Bjorklund" />
          <date month="October" year="2010" />
        </front>
        <seriesInfo name="RFC" value="6022" />
        <seriesInfo name="DOI" value="10.17487/RFC6022" />
      </reference>
      
      <reference anchor="I-D.netana-netconf-notif-envelope" target="https://datatracker.ietf.org/doc/html/draft-netana-netconf-notif-envelope">
        <front>
        <title>Extensible YANG Model for YANG-Push Notifications</title>
        <author initials="A. H." surname="Feng" fullname="Alex Huang Feng">
        <organization>INSA-Lyon</organization>
        </author>
        <author initials="P." surname="Francois" fullname="Pierre Francois">
        <organization>INSA-Lyon</organization>
        </author>
        <author initials="T." surname="Graf" fullname="Thomas Graf">
        <organization>Swisscom</organization>
        </author>
        <author initials="B." surname="Claise" fullname="Benoit Claise">
        <organization>Huawei</organization>
        </author>
      </front>
        <seriesInfo name="Internet-Draft" value="draft-netana-netconf-notif-envelope"/>
      </reference>

      <reference anchor="I-D.ietf-nmop-yang-message-broker-integration" target="https://datatracker.ietf.org/doc/html/draft-ietf-nmop-yang-kafka-integration">
        <front>
          <title>An Architecture for YANG-Push to Apache Kafka Integration</title>
          <author initials="T." surname="Graf" fullname="Thomas Graf">
            <organization>Swisscom</organization>
          </author>
          <date month="July" day="03" year="2024"/>
          <abstract>
            <t> This document describes the motivation and architecture of a 
              native YANG-Push notifications and YANG Schema integration into 
              Apache Kafka Message Broker and YANG Schema Registry. </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-nmop-yang-message-broker-integration"/>
      </reference>

      <reference anchor="Martinez-Casanueva2023" >
        <front>
          <title>Toward Building a Semantic Network Inventory for Model-Driven Telemetry</title>
          <author initials="I. D." surname="Martinez-Casanueva" fullname="Ignacio D. Martinez-Casanueva">
            <organization>Universidad Politecnica de Madrid, Telefonica I+D</organization>
          </author>
          <author initials="D." surname="Gonzalez-Sanchez" fullname="Daniel Gonzalez-Sanchez">
            <organization>Universidad Politecnica de Madrid</organization>
          </author>
          <author initials="L." surname="Bellido" fullname="Luis Bellido">
            <organization>Universidad Politecnica de Madrid</organization>
          </author>
          <author initials="D." surname="Fernandez" fullname="David Fernandez">
            <organization>Universidad Politecnica de Madrid</organization>
          </author>
          <author initials="D. R." surname="Lopez" fullname="Diego R. Lopez">
            <organization>Telefonica I+D</organization>
          </author>
          <date month="March" year="2023"/>
        </front>
      <seriesInfo name="DOI" value="10.1109/MCOM.001.2200222"/>
      <annotation>IEEE Communications Magazine</annotation></reference>

    </references>
  <section anchor="Full-Tree-View" title="Full Tree View of ietf-yang-library">
    <t>
    The following is the YANG tree diagram <xref target="RFC8340" />
    for module ietf-yang-library after adding augmentation from module ietf-yang-library-augmentedby. The RPCs and
    notifications are included as well.
    </t>
    <t><figure>
      <artwork><![CDATA[
module: ietf-yang-library
  +--ro yang-library
  |  +--ro module-set* [name]
  |  |  +--ro name                  string
  |  |  +--ro module* [name]
  |  |  |  +--ro name                        yang:yang-identifier
  |  |  |  +--ro revision?                   revision-identifier
  |  |  |  +--ro namespace                   inet:uri
  |  |  |  +--ro location*                   inet:uri
  |  |  |  +--ro submodule* [name]
  |  |  |  |  +--ro name        yang:yang-identifier
  |  |  |  |  +--ro revision?   revision-identifier
  |  |  |  |  +--ro location*   inet:uri
  |  |  |  +--ro feature*                    yang:yang-identifier
  |  |  |  +--ro deviation*                  -> ../../module/name
  |  |  |  +--ro yanglib-aug:augmented-by*
                                     -> ../../yanglib:module/name
  |  |  +--ro import-only-module* [name revision]
  |  |     +--ro name         yang:yang-identifier
  |  |     +--ro revision     union
  |  |     +--ro namespace    inet:uri
  |  |     +--ro location*    inet:uri
  |  |     +--ro submodule* [name]
  |  |        +--ro name        yang:yang-identifier
  |  |        +--ro revision?   revision-identifier
  |  |        +--ro location*   inet:uri
  |  +--ro schema* [name]
  |  |  +--ro name          string
  |  |  +--ro module-set*   -> ../../module-set/name
  |  +--ro datastore* [name]
  |  |  +--ro name      ds:datastore-ref
  |  |  +--ro schema    -> ../../schema/name


  |  +--ro content-id       string
  x--ro modules-state
     x--ro module-set-id    string
     x--ro module* [name revision]
        x--ro name                yang:yang-identifier
        x--ro revision            union
        +--ro schema?             inet:uri
        x--ro namespace           inet:uri
        x--ro feature*            yang:yang-identifier
        x--ro deviation* [name revision]
        |  x--ro name        yang:yang-identifier
        |  x--ro revision    union
        x--ro conformance-type    enumeration
        x--ro submodule* [name revision]
        |  x--ro name        yang:yang-identifier
        |  x--ro revision    union
        |  +--ro schema?     inet:uri
        +--ro yanglib-aug:augmented-by*   -> ../../yanglib:module/name

  notifications:
    +---n yang-library-update
    |  +--ro content-id    -> /yang-library/content-id
    x---n yang-library-change
       x--ro module-set-id    -> /modules-state/module-set-id
]]></artwork>
          </figure></t>
    </section>

    <section anchor="YANG module validation with yanglint" title="YANG module validation with yanglint">
      <t>This section gives an example of the yang-library content that the user can
      try themselves with yanglint. This is created to demonstrate and validate
      the correct syntax. The example should be compiled with YANG modules
      ietf-yang-library and ietf-yang-library-augmentedby as schemas.</t>
      <t>The examples provided are ietf-yang-library 'yang-library' data XML 
      file containing the augmented-by field. 
      </t>
      <section anchor="A valid ietf-yang-library data example" title="An ietf-yang-library yang-library data XML example">
        <t>The yang-library XML example concerns the following module-set:</t>
        <t>There are module1, module2, module3, which have the following relationships:</t>
        <t>
          <ul>
            <li>Module 1 is the base module with container "foo1"</li>
            <li>Module 2 augments "/module1:foo1" with container "foo2"</li>
            <li>Module 3 augments "/module1:foo1" with leaf "leaf3"</li>
          </ul>
        </t>
        <t>All three YANG modules are defined in the same module-set name 'ms1' to be able to augment or be augmented by the others. Otherwise, the yanglint validation should fail.</t>
        <t>The example is following:</t>

        <t><figure>
          <artwork><![CDATA[
<CODE BEGINS> file "example_valid.xml"
<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
  <content-id>1</content-id>
  <module-set>
    <name>ms1</name>
    <module>
      <name>module1</name>
      <revision>2024-02-29</revision>
      <namespace>urn:ietf:params:xml:ns:yang:module1</namespace>
      <augmented-by
      xmlns="urn:ietf:params:xml:ns:yang:
      ietf-yang-library-augmentedby">module2</augmented-by>
      <augmented-by
      xmlns="urn:ietf:params:xml:ns:yang:
      ietf-yang-library-augmentedby">module3</augmented-by>
    </module>
    <module>
      <name>module2</name>
      <revision>2024-02-29</revision>
      <namespace>urn:ietf:params:xml:ns:yang:module2</namespace>
    </module>
    <module>
      <name>module3</name>
      <revision>2024-02-29</revision>
      <namespace>urn:ietf:params:xml:ns:yang:module3</namespace>
    </module>
  </module-set>
</yang-library>
<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
    <module-set-id>0</module-set-id>
</modules-state>

<CODE ENDS>]]></artwork>
          </figure></t>
    </section>



    </section>
    <?rfc needLines="100"?>

    <section numbered="false" title="Contributors">

      <t>The following people all contributed to creating this document:</t>
    </section>

    <section numbered="false" title="Acknowledgments">

      <t>The author would like to thank Jan Lindblad and Jean Quilbeuf
      for their help during the design of the YANG module, and Thomas Graf, Rob Wilton, Andy Bierman, Jean Quilbeuf, Alex Huang Feng, Per Andersson for their valuable review and comments. </t>
    </section>
  </back>
</rfc>
<!-- Local Variables: -->
<!-- fill-column:72 -->
<!-- End: -->