<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<rfc number="8525" submissionType="IETF" consensus="yes" ipr="trust200902" obsoletes="7895" category="std" updates="" xml:lang="en" version="3" xmlns:xi="http://www.w3.org/2001/XInclude">
  <front>
    <title abbrev="YANG Library">YANG Library</title>
    <seriesInfo name="RFC" value="8525"/>
    <author initials="A" surname="Bierman" fullname="Andy Bierman">
      <organization>YumaWorks</organization>
      <address>
        <email>andy@yumaworks.com</email>
      </address>
    </author>
    <author initials="M" surname="Bjorklund" fullname="Martin Bjorklund">
      <organization>Tail-f Systems</organization>
      <address>
        <email>mbj@tail-f.com</email>
      </address>
    </author>
    <author initials="J" surname="Schoenwaelder" fullname="Juergen Schoenwaelder">
      <organization>Jacobs University</organization>
      <address>
        <email>j.schoenwaelder@jacobs-university.de</email>
      </address>
    </author>
    <author initials="K" surname="Watsen" fullname="Kent Watsen">
      <organization>Juniper Networks</organization>
      <address>
        <email>kwatsen@juniper.net</email>
      </address>
    </author>
    <author initials="R" surname="Wilton" fullname="Robert Wilton">
      <organization>Cisco Systems</organization>
      <address>
        <email>rwilton@cisco.com</email>
      </address>
    </author>
    <date month="January" year="2019"/>
    <abstract>
      <t>
This document describes a YANG library that provides information about
the YANG modules, datastores, and datastore schemas used by a network
management server. Simple caching mechanisms are provided to allow
clients to minimize retrieval of this information. This version of the
YANG library supports the Network Management Datastore Architecture (NMDA) by
listing all datastores supported by a network management server and
the schema that is used by each of these datastores.
      </t>
      <t>
This document obsoletes RFC 7895.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
There is a need for a standard mechanism to expose which YANG modules
<xref target="RFC7950" format="default"/>, datastores <xref target="RFC8342" format="default"/>, and datastore schemas
<xref target="RFC8342" format="default"/> are in use by a network
management server.
      </t>
      <t>
This document defines the YANG module "ietf‑yang‑library" that
provides this information. This version of the YANG library is
compatible with the Network Management Datastore Architecture (NMDA)
<xref target="RFC8342" format="default"/>. The previous version of the YANG
library, defined in <xref target="RFC7895" format="default"/>, is not compatible with the NMDA since
it assumes that all datastores have exactly the same schema.  This is
not necessarily true in the NMDA since dynamic configuration datastores
may have their own datastore schema.  Furthermore, the operational
state datastore may support non-configurable YANG modules in addition
to the YANG modules supported by conventional configuration
datastores.
      </t>
      <t>
The old YANG library definitions have been retained (for
backwards-compatibility reasons), but the definitions have been marked as
deprecated. For backwards compatibility, an NMDA-supporting server
SHOULD populate the deprecated "/modules‑state" tree in a
backwards-compatible manner.  The new "/yang‑library" tree will be
ignored by legacy clients but will provide all the data needed for
NMDA-aware clients (which will ignore the "/modules‑state"
tree).  

   The recommended approach to populate "/modules-state" is to report
   the YANG modules with "config true" data nodes that are
   configurable via conventional configuration datastores and the
   YANG modules with "config false" data nodes that are returned via a 
Network Configuration Protocol (NETCONF) &lt;get&gt;
operation or equivalent.
      </t>
      <t>
The YANG library information can be different on every server, and it
can change at runtime or across a server reboot. If a server
implements multiple network management protocols to access the
server's datastores, then each such protocol may have its own
conceptual instantiation of the YANG library.
      </t>
      <t>
If a large number of YANG modules are utilized by a server, then the
YANG library contents can be relatively large.  Since the YANG library
contents change very infrequently, it is important that clients be
able to cache the YANG library contents and easily identify whether
their cache is out of date.
      </t>
      <section anchor="terminology" numbered="true" toc="default">
        <name>Terminology</name>
        <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
    "MAY", and "OPTIONAL" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
        <t>
The following terms are defined in <xref target="RFC7950" format="default"/>:
        </t>
        <ul spacing="normal">
          <li>
module
 </li>
          <li>
submodule
 </li>
          <li>
data node
 </li>
        </ul>
        <t>
This document uses the phrase "implement a module" as defined in
Section 5.6.5 of <xref target="RFC7950" format="default"/>.
        </t>
        <t>
The following terms are defined in <xref target="RFC8342" format="default"/>:
        </t>
        <ul spacing="normal">
          <li>
datastore
 </li>
          <li>
datastore schema
 </li>
          <li>
configuration
 </li>
          <li>
conventional configuration datastore
 </li>
          <li>
operational state
 </li>
          <li>
operational state datastore
 </li>
          <li>
dynamic configuration datastore
 </li>
          <li>
client
 </li>
          <li>
server 
</li>
        </ul>
        <t>
The following terms are used within this document:
        </t>
        <ul spacing="normal">
          <li>
YANG library: A collection of YANG modules, submodules, datastores,
and datastore schemas used by a server.
 </li>
          <li>
YANG library content identifier: A server-generated identifier of
the contents of the YANG library.
 </li>
        </ul>
        <t>
Tree diagrams in this document use the notation defined in
<xref target="RFC8340" format="default"/>.
        </t>
      </section>
    </section>
    <section anchor="objectives" numbered="true" toc="default">
      <name>Objectives</name>
      <t>
The following information is needed by a client application (for each
YANG module in the library) to fully utilize the YANG data modeling
language:
      </t>
      <ul spacing="normal">
        <li>
name: The name of the YANG module.
 </li>
        <li>
revision: If defined in the YANG module or submodule, the revision
is derived from the most recent revision statement within the module
or submodule.
 </li>
        <li>
submodule list: The name and (if defined) revision of each submodule
used by the module must be identified.
 </li>
        <li>
feature list: The name of each YANG feature supported by the
server must be identified.
 </li>
        <li>
deviation list: The name of each YANG module with deviation
statements affecting a given YANG module must be identified.
 </li>
      </ul>
      <t>
In addition, the following information is needed by a client
application for each datastore supported by a server:
      </t>
      <ul spacing="normal">
        <li>
identity: The YANG identity for the datastore.
 </li>
        <li>
schema: The schema (i.e., the set of modules) implemented by the
datastore.
 </li>
      </ul>
      <t>
  In order to select one out of several possible designs for the YANG
  library data model, the following criteria were used:
      </t>
      <ol spacing="normal" type="1">
        <li>
The information must be efficient for a client to consume.
Since the size of the YANG library can be quite large, it should
be possible for clients to cache the YANG library information.
 </li>
        <li>
A dynamic configuration datastore must be able to implement a module
or feature that is not implemented in the conventional configuration
datastores.
 </li>
        <li>
It must be possible to not implement a module or feature in
&lt;operational&gt;, even if it is implemented in some other datastore.
This is required for transition purposes; a server that wants to
implement &lt;operational&gt; should not have to implement all modules at
once.
 </li>
        <li>
A given module can only be implemented in one revision in all
datastores.  If a module is implemented in more than one
datastore, the same revision is implemented in all these
datastores.
 </li>
        <li>
Multiple revisions can be used for import, if import-by revision
is used.
 </li>
        <li>
It must be possible to use the YANG library by schema mount
<xref target="RFC8528" format="default"/>.
 </li>
      </ol>
    </section>
    <section anchor="yang-library-data-model" numbered="true" toc="default">
      <name>YANG Library Data Model</name>
      <t>
The "ietf‑yang‑library" YANG module provides information about the
modules, submodules, datastores, and datastore schemas supported by a
server. All data nodes in the "ietf‑yang‑library" module are
"config false" and
thus only accessible in the operational state datastore.
      </t>
      <figure anchor="model">
        <artwork name="" type="" align="left" alt=""><![CDATA[
+-----------+
| datastore |
+-----------+
     |
     | has a
     V
+-----------+            +--------+                +------------+
| datastore |  union of  | module |  consists of   | modules +  |
|  schema   |----------->|  set   |--------------->| submodules |
+-----------+            +--------+                +------------+
]]></artwork>
      </figure>
      <t>
The conceptual model of the YANG library is depicted in
Figure 1. Following the NMDA, every datastore has an associated datastore
schema. A datastore schema is a union of module sets, and every module
set is a collection of modules and submodules, including the modules
and submodules used for imports. Note that multiple datastores may
refer to the same datastore schema. Furthermore, it is possible for
individual datastore schemas to share module sets. A common use case is the
operational state datastore schema, which is a superset of the schema
used by conventional configuration datastores.
      </t>
      <t>
Below is the YANG tree diagram for the "ietf‑yang‑library" module,
excluding the deprecated "/modules‑state" tree:
      </t>
      <artwork name="" type="" align="left" alt=""><![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 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

  notifications:
    +---n yang-library-update
       +--ro content-id    -> /yang-library/content-id
    ]]></artwork>
      <t>
The "/yang‑library" container holds the entire YANG library. The
container has the following child nodes:
      </t>
      <ul spacing="normal">
        <li>
The "/yang‑library/module‑set" contains entries representing module
sets. The list "/yang‑library/module‑set/module" enumerates the
modules that belong to the module set. A module is listed together
with its submodules (if any), a set of features, and any deviation
modules. The list "/yang‑library/module‑set/import‑only‑module"
lists all modules (and their submodules) used only for imports.  The
assignment of a module to a module set is at the server's
discretion.  This revision of the YANG library attaches no semantics
as to which module set a module is listed in.
 </li>
        <li>
The "/yang‑library/schema" list contains an entry for each datastore
schema supported by the server. All conventional configuration
datastores use the same "schema" list entry. A dynamic configuration
datastore may use a different datastore schema from the conventional
configuration datastores and hence may require a separate "schema"
entry. A "schema" entry has a leaf-list of references to entries in
the "module‑set" list.  The schema consists of the union of all
modules in all referenced module sets.
 </li>
        <li>
The "/yang‑library/datastore" list contains one entry for each
datastore supported by the server, and it identifies the datastore
schema associated with a datastore via a reference to an entry in
the "schema" list. Each supported conventional configuration
datastore has a separate entry, pointing to the same "schema" list
element.
 </li>
        <li>
The "/yang‑library/content‑id" leaf contains the YANG library
content identifier, which is an implementation-specific identifier
representing the current information in the YANG library on a
specific server.  The value of this leaf MUST change whenever the
information in the YANG library changes.  There is no requirement
that the same information always result in the same "content‑id"
value.  This leaf allows a client to fetch all schema information
once, cache it, and only refetch it if the value of this leaf has
been changed.  If the value of this leaf changes, the server also
generates a "yang‑library‑update" notification.
 </li>
      </ul>
      <t>
Note that for a NETCONF server implementing the NETCONF extensions to
support the NMDA <xref target="RFC8526" format="default"/>, a change of the YANG
library content identifier results in a new value for the
:yang-library:1.1 capability defined in
<xref target="RFC8526" format="default"/>.  Thus, if such a server implements
NETCONF notifications <xref target="RFC5277" format="default"/> and the 
"netconf‑capability‑change" notification <xref target="RFC6470" format="default"/>, a
"netconf‑capability‑change"
notification is generated whenever the YANG library content identifier
changes.
      </t>
    </section>
    <section anchor="library-module" numbered="true" toc="default">
      <name>YANG Library YANG Module</name>
      <t>
The "ietf‑yang‑library" YANG module imports definitions from
the "ietf‑yang‑types" and
"ietf‑inet‑types" modules defined in <xref target="RFC6991" format="default"/> and
from the
"ietf‑datastores" module defined in <xref target="RFC8342" format="default"/>.
  While
  the YANG module is defined using YANG version 1.1, the YANG library
  supports YANG modules written in any version of YANG.
      </t>
<t>Adding SVG diagram for testing purposes.</t>
<artwork type="svg">
<xi:include href="https://www.rfc-editor.org/v3test/lockbox.key-management-v1.svg"/>
</artwork>

      <t>&lt;CODE BEGINS&gt; file "ietf-yang-library@2019-01-04.yang"</t>
<figure title="" suppress-title="false" align="left" alt="" width="" height="">
<sourcecode type="yang">
<![CDATA[
module ietf-yang-library {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
  prefix yanglib;

  import ietf-yang-types {
    prefix yang;
    reference 
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-inet-types {
    prefix inet;
    reference 
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-datastores {
    prefix ds;
    reference
      "RFC 8342: Network Management Datastore Architecture
                 (NMDA)";
  }

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

     Author:   Andy Bierman
               <mailto:andy@yumaworks.com>

     Author:   Martin Bjorklund
               <mailto:mbj@tail-f.com>

     Author:   Juergen Schoenwaelder
               <mailto:j.schoenwaelder@jacobs-university.de>

     Author:   Kent Watsen
               <mailto:kwatsen@juniper.net>

     Author:   Rob Wilton
               <mailto:rwilton@cisco.com>";
  description
    "This module provides information about the YANG modules,
     datastores, and datastore schemas used by a network
     management server.

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

  revision 2019-01-04 {
    description
      "Added support for multiple datastores according to the
       Network Management Datastore Architecture (NMDA).";
    reference 
      "RFC 8525: YANG Library";
  }
  revision 2016-04-09 {
    description
      "Initial revision.";
    reference 
      "RFC 7895: YANG Module Library";
  }

  /*
   * Typedefs
   */

  typedef revision-identifier {
    type string {
      pattern '\d{4}-\d{2}-\d{2}';
    }
    description
      "Represents a specific date in YYYY-MM-DD format.";
  }

  /*
   * Groupings
   */

  grouping module-identification-leafs {
    description
      "Parameters for identifying YANG modules and submodules.";
    leaf name {
      type yang:yang-identifier;
      mandatory true;
      description
        "The YANG module or submodule name.";
    }
    leaf revision {
      type revision-identifier;
      description
        "The YANG module or submodule revision date.  If no revision
         statement is present in the YANG module or submodule, this
         leaf is not instantiated.";
    }
  }

  grouping location-leaf-list {
    description
      "Common leaf-list parameter for the locations of modules and
       submodules.";
    leaf-list location {
      type inet:uri;
      description
        "Contains a URL that represents the YANG schema
         resource for this module or submodule.

         This leaf will only be present if there is a URL
         available for retrieval of the schema for this entry.";
    }
  }

  grouping module-implementation-parameters {
    description
      "Parameters for describing the implementation of a module.";
    leaf-list feature {
      type yang:yang-identifier;
      description
        "List of all YANG feature names from this module that are
         supported by the server, regardless whether they are defined
         in the module or any included submodule.";
    }
    leaf-list deviation {
      type leafref {
        path "../../module/name";
      }
      description
        "List of all YANG deviation modules used by this server to
         modify the conformance of the module associated with this
         entry.  Note that the same module can be used for deviations
         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 deviated.

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

  grouping module-set-parameters {
    description
      "A set of parameters that describe a module set.";
    leaf name {
      type string;
      description
        "An arbitrary name of the module set.";
    }
    list module {
      key "name";
      description
        "An entry in this list represents a module implemented by the
         server, as per Section 5.6.5 of RFC 7950, with a particular
         set of supported features and deviations.";
      reference 
        "RFC 7950: The YANG 1.1 Data Modeling Language";
      uses module-identification-leafs;
      leaf namespace {
        type inet:uri;
        mandatory true;
        description
          "The XML namespace identifier for this module.";
      }
      uses location-leaf-list;
      list submodule {
        key "name";
        description
          "Each entry represents one submodule within the
           parent module.";
        uses module-identification-leafs;
        uses location-leaf-list;
      }
      uses module-implementation-parameters;
    }
    list import-only-module {
      key "name revision";
      description
        "An entry in this list indicates that the server imports
         reusable definitions from the specified revision of the
         module but does not implement any protocol-accessible
         objects from this revision.

         Multiple entries for the same module name MAY exist.  This
         can occur if multiple modules import the same module but
         specify different revision dates in the import statements.";
      leaf name {
        type yang:yang-identifier;
        description
          "The YANG module name.";
      }
      leaf revision {
        type union {
          type revision-identifier;
          type string {
            length "0";
          }
        }
        description
          "The YANG module revision date.
           A zero-length string is used if no revision statement
           is present in the YANG module.";
      }
      leaf namespace {
        type inet:uri;
        mandatory true;
        description
          "The XML namespace identifier for this module.";
      }
      uses location-leaf-list;
      list submodule {
        key "name";
        description
          "Each entry represents one submodule within the
           parent module.";
        uses module-identification-leafs;
        uses location-leaf-list;
      }
    }
  }

  grouping yang-library-parameters {
    description
      "The YANG library data structure is represented as a grouping
       so it can be reused in configuration or another monitoring
       data structure.";
    list module-set {
      key "name";
      description
        "A set of modules that may be used by one or more schemas.

         A module set does not have to be referentially complete,
         i.e., it may define modules that contain import statements
         for other modules not included in the module set.";
      uses module-set-parameters;
    }
    list schema {
      key "name";
      description
        "A datastore schema that may be used by one or more
         datastores.

         The schema must be valid and referentially complete, i.e.,
         it must contain modules to satisfy all used import
         statements for all modules specified in the schema.";
      leaf name {
        type string;
        description
          "An arbitrary name of the schema.";
      }
      leaf-list module-set {
        type leafref {
          path "../../module-set/name";
        }
        description
          "A set of module-sets that are included in this schema.
           If a non-import-only module appears in multiple module
           sets, then the module revision and the associated features
           and deviations must be identical.";
      }
    }
    list datastore {
      key "name";
      description
        "A datastore supported by this server.

         Each datastore indicates which schema it supports.

         The server MUST instantiate one entry in this list per
         specific datastore it supports.

         Each datastore entry with the same datastore schema SHOULD
         reference the same schema.";
      leaf name {
        type ds:datastore-ref;
        description
          "The identity of the datastore.";
      }
      leaf schema {
        type leafref {
          path "../../schema/name";
        }
        mandatory true;
        description
          "A reference to the schema supported by this datastore.
           All non-import-only modules of the schema are implemented
           with their associated features and deviations.";
      }
    }
  }

  /*
   * Top-level container
   */

  container yang-library {
    config false;
    description
      "Container holding the entire YANG library of this server.";
    uses yang-library-parameters;
    leaf content-id {
      type string;
      mandatory true;
      description
        "A server-generated identifier of the contents of the
         '/yang-library' tree.  The server MUST change the value of
         this leaf if the information represented by the
         '/yang-library' tree, except '/yang-library/content-id', has
         changed.";
    }
  }

  /*
   * Notifications
   */

  notification yang-library-update {
    description
      "Generated when any YANG library information on the
       server has changed.";
    leaf content-id {
      type leafref {
        path "/yanglib:yang-library/yanglib:content-id";
      }
      mandatory true;
      description
        "Contains the YANG library content identifier for the updated
         YANG library at the time the notification is generated.";
    }
  }

  /*
   * Legacy groupings
   */

  grouping module-list {
    status deprecated;
    description
      "The module data structure is represented as a grouping
       so it can be reused in configuration or another monitoring
       data structure.";

    grouping common-leafs {
      status deprecated;
      description
        "Common parameters for YANG modules and submodules.";
      leaf name {
        type yang:yang-identifier;
        status deprecated;
        description
          "The YANG module or submodule name.";
      }
      leaf revision {
        type union {
          type revision-identifier;
          type string {
            length "0";
          }
        }
        status deprecated;
        description
          "The YANG module or submodule revision date.
           A zero-length string is used if no revision statement
           is present in the YANG module or submodule.";
      }
    }

    grouping schema-leaf {
      status deprecated;
      description
        "Common schema leaf parameter for modules and submodules.";
      leaf schema {
        type inet:uri;
        description
          "Contains a URL that represents the YANG schema
           resource for this module or submodule.

           This leaf will only be present if there is a URL
           available for retrieval of the schema for this entry.";
      }
    }
    list module {
      key "name revision";
      status deprecated;
      description
        "Each entry represents one revision of one module
         currently supported by the server.";
      uses common-leafs {
        status deprecated;
      }
      uses schema-leaf {
        status deprecated;
      }
      leaf namespace {
        type inet:uri;
        mandatory true;
        status deprecated;
        description
          "The XML namespace identifier for this module.";
      }
      leaf-list feature {
        type yang:yang-identifier;
        status deprecated;
        description
          "List of YANG feature names from this module that are
           supported by the server, regardless of whether they are
           defined in the module or any included submodule.";
      }
      list deviation {
        key "name revision";
        status deprecated;
        description
          "List of YANG deviation module names and revisions
           used by this server to modify the conformance of
           the module associated with this entry.  Note that
           the same module can be used for deviations for
           multiple modules, so the same entry MAY appear
           within multiple 'module' entries.

           The deviation module MUST be present in the 'module'
           list, with the same name and revision values.
           The 'conformance-type' value will be 'implement' for
           the deviation module.";
        uses common-leafs {
          status deprecated;
        }
      }
      leaf conformance-type {
        type enumeration {
          enum implement {
            description
              "Indicates that the server implements one or more
               protocol-accessible objects defined in the YANG module
               identified in this entry.  This includes deviation
               statements defined in the module.

               For YANG version 1.1 modules, there is at most one
               'module' entry with conformance type 'implement' for a
               particular module name, since YANG 1.1 requires that
               at most one revision of a module is implemented.

               For YANG version 1 modules, there SHOULD NOT be more
               than one 'module' entry for a particular module 
               name.";
          }
          enum import {
            description
              "Indicates that the server imports reusable definitions
               from the specified revision of the module but does
               not implement any protocol-accessible objects from
               this revision.

               Multiple 'module' entries for the same module name MAY
               exist.  This can occur if multiple modules import the
               same module but specify different revision dates in
               the import statements.";
          }
        }
        mandatory true;
        status deprecated;
        description
          "Indicates the type of conformance the server is claiming
           for the YANG module identified by this entry.";
      }
      list submodule {
        key "name revision";
        status deprecated;
        description
          "Each entry represents one submodule within the
           parent module.";
        uses common-leafs {
          status deprecated;
        }
        uses schema-leaf {
          status deprecated;
        }
      }
    }
  }

  /*
   * Legacy operational state data nodes
   */

  container modules-state {
    config false;
    status deprecated;
    description
      "Contains YANG module monitoring information.";
    leaf module-set-id {
      type string;
      mandatory true;
      status deprecated;
      description
        "Contains a server-specific identifier representing
         the current set of modules and submodules.  The
         server MUST change the value of this leaf if the
         information represented by the 'module' list instances
         has changed.";
    }
    uses module-list {
      status deprecated;
    }
  }

  /*
   * Legacy notifications
   */

  notification yang-library-change {
    status deprecated;
    description
      "Generated when the set of modules and submodules supported
       by the server has changed.";
    leaf module-set-id {
      type leafref {
        path "/yanglib:modules-state/yanglib:module-set-id";
      }
      mandatory true;
      status deprecated;
      description
        "Contains the module-set-id value representing the
         set of modules and submodules supported at the server
         at the time the notification is generated.";
    }
  }
}

    ]]>

</sourcecode>
</figure>
      <t>&lt;CODE ENDS&gt;</t>

    </section>
    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
RFC 7895 previously registered one URI in the "IETF XML Registry"
<xref target="RFC3688" format="default"/>.  This document takes over this registration entry made by
RFC 7895 and changes the Registrant Contact to the IESG according to Section 4
of <xref target="RFC3688" format="default"/>.
      </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
  URI: urn:ietf:params:xml:ns:yang:ietf-yang-library

  Registrant Contact: The IESG.

  XML: N/A, the requested URI is an XML namespace.
]]></artwork>
      <t>
This document registers a YANG module in the "YANG Module
Names" registry <xref target="RFC6020" format="default"/>:
      </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
  name:         ietf-yang-library
  namespace:    urn:ietf:params:xml:ns:yang:ietf-yang-library
  prefix:       yanglib
  reference:    RFC 7895
    ]]></artwork>
      <t>
This document takes over this registration entry made by RFC 7895.
      </t>
    </section>
    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>
      <!-- Begin DNE -->
      <t>
The YANG module specified in this document defines a schema for data that is
designed to be accessed via network management protocols such as NETCONF 
<xref target="RFC6241" format="default"/> or RESTCONF <xref target="RFC8040" format="default"/>. 
The lowest NETCONF layer is the secure transport layer, and the
mandatory-to-implement secure transport is Secure Shell (SSH) <xref target="RFC6242" format="default"/>. The lowest RESTCONF layer is HTTPS, and the
mandatory-to-implement secure transport is TLS <xref target="RFC8446" format="default"/>.
      </t>
      <t>
The Network Configuration Access Control Model (NACM) 
<xref target="RFC8341" format="default"/> 
provides the means to restrict access for particular NETCONF or RESTCONF users
to a preconfigured subset of all available NETCONF or RESTCONF protocol
operations and content. 
      </t>
      <t>
Some of the readable data nodes 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 these data
nodes. These are the subtrees and data nodes and their
sensitivity/vulnerability: 
      </t>
      <!-- End DNE -->
      <t>
The "/yang‑library" subtree of the YANG library may help an attacker
identify the server capabilities and server implementations with known
bugs since the set of YANG modules supported by a server may reveal
the kind of device and the manufacturer of the device.  Although some
of this information may be available to all NETCONF users via the
NETCONF &lt;hello&gt; message (or similar messages in other management
protocols), this YANG module potentially exposes additional details
that could be of some assistance to an attacker. Server
vulnerabilities may be specific to particular modules, module
revisions, module features, or even module deviations. For example, if
a particular operation on a particular data node is known to cause a
server to crash or significantly degrade device performance, then the
"module" list information will help an attacker identify server
implementations with such a defect, in order to launch a
denial-of-service attack on the device.
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688">
          <front>
            <title>The IETF XML Registry</title>
            <seriesInfo name="DOI" value="10.17487/RFC3688"/>
            <seriesInfo name="RFC" value="3688"/>
            <seriesInfo name="BCP" value="81"/>
            <author initials="M." surname="Mealling" fullname="M. Mealling">
              <organization/>
            </author>
            <date year="2004" month="January"/>
            <abstract>
              <t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6020"/>
            <seriesInfo name="RFC" value="6020"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <date year="2010" month="October"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241">
          <front>
            <title>Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6241"/>
            <seriesInfo name="RFC" value="6241"/>
            <author initials="R." surname="Enns" fullname="R. Enns" role="editor">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization/>
            </author>
            <author initials="A." surname="Bierman" fullname="A. Bierman" role="editor">
              <organization/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized as remote procedure calls (RPCs).  This document obsoletes RFC 4741.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6242" target="https://www.rfc-editor.org/info/rfc6242">
          <front>
            <title>Using the NETCONF Protocol over Secure Shell (SSH)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6242"/>
            <seriesInfo name="RFC" value="6242"/>
            <author initials="M." surname="Wasserman" fullname="M. Wasserman">
              <organization/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t>This document describes a method for invoking and running the Network Configuration Protocol (NETCONF) within a Secure Shell (SSH) session as an SSH subsystem.  This document obsoletes RFC 4742.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6991" target="https://www.rfc-editor.org/info/rfc6991">
          <front>
            <title>Common YANG Data Types</title>
            <seriesInfo name="DOI" value="10.17487/RFC6991"/>
            <seriesInfo name="RFC" value="6991"/>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization/>
            </author>
            <date year="2013" month="July"/>
            <abstract>
              <t>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>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <seriesInfo name="DOI" value="10.17487/RFC7950"/>
            <seriesInfo name="RFC" value="7950"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols.  This document describes the syntax and semantics of version 1.1 of the YANG language.  YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification.  There are a small number of backward incompatibilities from YANG version 1.  This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040">
          <front>
            <title>RESTCONF Protocol</title>
            <seriesInfo name="DOI" value="10.17487/RFC8040"/>
            <seriesInfo name="RFC" value="8040"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <date year="2017" month="January"/>
            <abstract>
              <t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341">
          <front>
            <title>Network Configuration Access Control Model</title>
            <seriesInfo name="DOI" value="10.17487/RFC8341"/>
            <seriesInfo name="RFC" value="8341"/>
            <seriesInfo name="STD" value="91"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) or the RESTCONF protocol requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability.  There is a need for standard mechanisms to restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.  This document defines such an access control model.</t>
              <t>This document obsoletes RFC 6536.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8342" target="https://www.rfc-editor.org/info/rfc8342">
          <front>
            <title>Network Management Datastore Architecture (NMDA)</title>
            <seriesInfo name="DOI" value="10.17487/RFC8342"/>
            <seriesInfo name="RFC" value="8342"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder">
              <organization/>
            </author>
            <author initials="P." surname="Shafer" fullname="P. Shafer">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <author initials="R." surname="Wilton" fullname="R. Wilton">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model.  This document updates RFC 7950.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <seriesInfo name="DOI" value="10.17487/RFC8446"/>
            <seriesInfo name="RFC" value="8446"/>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization/>
            </author>
            <date year="2018" month="August"/>
            <abstract>
              <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol.  TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961.  This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC5277" target="https://www.rfc-editor.org/info/rfc5277">
          <front>
            <title>NETCONF Event Notifications</title>
            <seriesInfo name="DOI" value="10.17487/RFC5277"/>
            <seriesInfo name="RFC" value="5277"/>
            <author initials="S." surname="Chisholm" fullname="S. Chisholm">
              <organization/>
            </author>
            <author initials="H." surname="Trevino" fullname="H. Trevino">
              <organization/>
            </author>
            <date year="2008" month="July"/>
            <abstract>
              <t>This document defines mechanisms that provide an asynchronous message notification delivery service for the Network Configuration protocol (NETCONF).  This is an optional capability built on top of the base NETCONF definition.  This document defines the capabilities and operations necessary to support this service.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6470" target="https://www.rfc-editor.org/info/rfc6470">
          <front>
            <title>Network Configuration Protocol (NETCONF) Base Notifications</title>
            <seriesInfo name="DOI" value="10.17487/RFC6470"/>
            <seriesInfo name="RFC" value="6470"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <date year="2012" month="February"/>
            <abstract>
              <t>The Network Configuration Protocol (NETCONF) provides mechanisms to manipulate configuration datastores.  However, client applications often need to be aware of common events, such as a change in NETCONF server capabilities, that may impact management applications. Standard mechanisms are needed to support the monitoring of the base system events within the NETCONF server.  This document defines a YANG module that allows a NETCONF client to receive notifications for some common system events.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC7895" target="https://www.rfc-editor.org/info/rfc7895">
          <front>
            <title>YANG Module Library</title>
            <seriesInfo name="DOI" value="10.17487/RFC7895"/>
            <seriesInfo name="RFC" value="7895"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <date year="2016" month="June"/>
            <abstract>
              <t>This document describes a YANG library that provides information about all the YANG modules used by a network management server (e.g., a Network Configuration Protocol (NETCONF) server).  Simple caching mechanisms are provided to allow clients to minimize retrieval of this information.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340">
          <front>
            <title>YANG Tree Diagrams</title>
            <seriesInfo name="DOI" value="10.17487/RFC8340"/>
            <seriesInfo name="RFC" value="8340"/>
            <seriesInfo name="BCP" value="215"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="L." surname="Berger" fullname="L. Berger" role="editor">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document captures the current syntax used in YANG module tree diagrams.  The purpose of this document is to provide a single location for this definition.  This syntax may be updated from time to time based on the evolution of the YANG language.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8343" target="https://www.rfc-editor.org/info/rfc8343">
          <front>
            <title>A YANG Data Model for Interface Management</title>
            <seriesInfo name="DOI" value="10.17487/RFC8343"/>
            <seriesInfo name="RFC" value="8343"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>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>The YANG data model in this document conforms to the Network Management Datastore Architecture (NMDA) defined in RFC 8342.</t>
              <t>This document obsoletes RFC 7223.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8344" target="https://www.rfc-editor.org/info/rfc8344">
          <front>
            <title>A YANG Data Model for IP Management</title>
            <seriesInfo name="DOI" value="10.17487/RFC8344"/>
            <seriesInfo name="RFC" value="8344"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document defines a YANG data model for management of IP implementations.  The data model includes configuration and system state.</t>
              <t>The YANG data model in this document conforms to the Network Management Datastore Architecture defined in RFC 8342.</t>
              <t>This document obsoletes RFC 7277.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8345" target="https://www.rfc-editor.org/info/rfc8345">
          <front>
            <title>A YANG Data Model for Network Topologies</title>
            <seriesInfo name="DOI" value="10.17487/RFC8345"/>
            <seriesInfo name="RFC" value="8345"/>
            <author initials="A." surname="Clemm" fullname="A. Clemm">
              <organization/>
            </author>
            <author initials="J." surname="Medved" fullname="J. Medved">
              <organization/>
            </author>
            <author initials="R." surname="Varga" fullname="R. Varga">
              <organization/>
            </author>
            <author initials="N." surname="Bahadur" fullname="N. Bahadur">
              <organization/>
            </author>
            <author initials="H." surname="Ananthakrishnan" fullname="H. Ananthakrishnan">
              <organization/>
            </author>
            <author initials="X." surname="Liu" fullname="X. Liu">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document defines an abstract (generic, or base) YANG data model for network/service topologies and inventories.  The data model serves as a base model that is augmented with technology-specific details in other, more specific topology and inventory data models.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8348" target="https://www.rfc-editor.org/info/rfc8348">
          <front>
            <title>A YANG Data Model for Hardware Management</title>
            <seriesInfo name="DOI" value="10.17487/RFC8348"/>
            <seriesInfo name="RFC" value="8348"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="J." surname="Dong" fullname="J. Dong">
              <organization/>
            </author>
            <author initials="D." surname="Romascanu" fullname="D. Romascanu">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document defines a YANG data model for the management of hardware on a single server.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8349" target="https://www.rfc-editor.org/info/rfc8349">
          <front>
            <title>A YANG Data Model for Routing Management (NMDA Version)</title>
            <seriesInfo name="DOI" value="10.17487/RFC8349"/>
            <seriesInfo name="RFC" value="8349"/>
            <author initials="L." surname="Lhotka" fullname="L. Lhotka">
              <organization/>
            </author>
            <author initials="A." surname="Lindem" fullname="A. Lindem">
              <organization/>
            </author>
            <author initials="Y." surname="Qu" fullname="Y. Qu">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document specifies three YANG modules and one submodule. Together, they form the core routing data model that serves as a framework for configuring and managing a routing subsystem.  It is expected that these modules will be augmented by additional YANG modules defining data models for control-plane protocols, route filters, and other functions.  The core routing data model provides common building blocks for such extensions -- routes, Routing Information Bases (RIBs), and control-plane protocols.</t>
              <t>The YANG modules in this document conform to the Network Management Datastore Architecture (NMDA).  This document obsoletes RFC 8022.</t>
            </abstract>
          </front>
        </reference>
        <!-- ietf-netconf-nmda-netconf -->
        <reference anchor="RFC8526" target="https://www.rfc-editor.org/info/rfc8526">
          <front>
            <title>NETCONF Extensions to Support the Network Management Datastore Architecture</title>
            <seriesInfo name="DOI" value="10.17487/RFC8526"/>
            <seriesInfo name="RFC" value="8526"/>
            <author initials="M" surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="J" surname="Schoenwaelder" fullname="J. Schoenwaelder">
              <organization/>
            </author>
            <author initials="P" surname="Shafer" fullname="P. Shafer">
              <organization/>
            </author>
            <author initials="K" surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <author initials="R" surname="Wilton" fullname="R. Wilton">
              <organization/>
            </author>
            <date month="January" year="2019"/>
          </front>
        </reference>
        <!-- ietf-netmod-schema-mount -->
        <reference anchor="RFC8528" target="https://www.rfc-editor.org/info/rfc8528">
          <front>
            <title>YANG Schema Mount</title>
            <seriesInfo name="DOI" value="10.17487/RFC8528"/>
            <seriesInfo name="RFC" value="8528"/>
            <author initials="M" surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="L" surname="Lhotka" fullname="L. Lhotka">
              <organization/>
            </author>
            <date month="January" year="2019"/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="summary-of-changes-from-rfc-7895" numbered="true" toc="default">
      <name>Summary of Changes from RFC 7895</name>
      <t>
This document changes <xref target="RFC7895" format="default"/> in the following ways:
      </t>
      <ul spacing="normal">
        <li>
Renamed document title from "YANG Module Library" to "YANG Library".
 </li>
        <li>
Added a new top-level "/yang‑library" container to hold the entire
YANG library providing information about module sets, schemas, and
datastores.
 </li>
        <li>
Refactored the "/modules‑state" container into a new
"/yang‑library/module‑set" list.
 </li>
        <li>
Added a new "/yang‑library/schema" list and a new
"/yang‑library/datastore" list.
 </li>
        <li>
Added a set of new groupings as replacements for the deprecated
groupings.
 </li>
        <li>
Added a "yang‑library‑update" notification as a replacement for the
deprecated "yang‑library‑change" notification.
 </li>
        <li>
Deprecated the "/modules‑state" tree.
 </li>
        <li>
Deprecated the "/module‑list" grouping.
 </li>
        <li>
Deprecated the "/yang‑library‑change" notification.
 </li>
      </ul>
    </section>
    <section anchor="example-yang-library-instance-for-a-basic-server" numbered="true" toc="default">
      <name>Example YANG Library Instance for a Basic Server</name>
      <t>
The following example shows the YANG library of a basic server
implementing the "ietf‑interfaces" <xref target="RFC8343" format="default"/> and
"ietf‑ip" <xref target="RFC8344" format="default"/> modules in the &lt;running&gt;,
&lt;startup&gt;, and &lt;operational&gt; datastores and the "ietf‑hardware"
<xref target="RFC8348" format="default"/> module in the &lt;operational&gt; datastore.
      </t>
      <t>
Newline characters in leaf values are added for formatting reasons.
      </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
<yang-library
    xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"
    xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">

  <module-set>
    <name>config-modules</name>
    <module>
      <name>ietf-interfaces</name>
      <revision>2018-02-20</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-interfaces
      </namespace>
    </module>
    <module>
      <name>ietf-ip</name>
      <revision>2018-02-22</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-ip
      </namespace>
    </module>
    <import-only-module>
      <name>ietf-yang-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-yang-types
      </namespace>
    </import-only-module>
    <import-only-module>
      <name>ietf-inet-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-inet-types
      </namespace>
    </import-only-module>
  </module-set>

  <module-set>
    <name>state-modules</name>
    <module>
      <name>ietf-hardware</name>
      <revision>2018-03-13</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-hardware
      </namespace>
    </module>
    <import-only-module>
      <name>ietf-inet-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-inet-types
      </namespace>
    </import-only-module>
    <import-only-module>
      <name>ietf-yang-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-yang-types
      </namespace>
    </import-only-module>
    <import-only-module>
      <name>iana-hardware</name>
      <revision>2018-03-13</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:iana-hardware
      </namespace>
    </import-only-module>
  </module-set>

  <schema>
    <name>config-schema</name>
    <module-set>config-modules</module-set>
  </schema>
  <schema>
    <name>state-schema</name>
    <module-set>config-modules</module-set>
    <module-set>state-modules</module-set>
  </schema>

  <datastore>
    <name>ds:startup</name>
    <schema>config-schema</schema>
  </datastore>
  <datastore>
    <name>ds:running</name>
    <schema>config-schema</schema>
  </datastore>
  <datastore>
    <name>ds:operational</name>
    <schema>state-schema</schema>
  </datastore>

  <content-id>75a43df9bd56b92aacc156a2958fbe12312fb285</content-id>
</yang-library>
    ]]></artwork>
    </section>
    <section anchor="example-yang-library-instance-for-an-advanced-server" numbered="true" toc="default">
      <name>Example YANG Library Instance for an Advanced Server</name>
      <t>
The following example extends the example in <xref target="example-yang-library-instance-for-a-basic-server" format="default"/> 
by using modules from <xref target="RFC8345" format="default"/> and <xref target="RFC8349" format="default"/> to illustrate
a slightly more advanced server that:
      </t>
      <ul spacing="normal">
        <li>
Has a module with features only enabled in &lt;operational&gt;; the
"ietf-routing" module is supported in &lt;running&gt;, &lt;startup&gt;, and
&lt;operational&gt;, but the "multiple‑ribs" and "router‑id" features are
only enabled in &lt;operational&gt;.  Hence, the "router‑id" leaf may be
read but not configured.
 </li>
        <li>
Supports a dynamic configuration datastore
"example‑ds‑ephemeral", with only the "ietf‑network" and
"ietf‑network‑topology" modules configurable via a notional dynamic
configuration protocol.
 </li>
        <li>
Shows an example of datastore-specific deviations.  The 
"example‑vendor‑hardware‑deviations" module is included in
the schema for &lt;operational&gt; to remove data nodes that cannot be
supported by the server.
 </li>
        <li>
Shows how module-sets can be used to organize related modules together.
 </li>
      </ul>
      <artwork name="" type="" align="left" alt=""><![CDATA[
<yang-library
    xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"
    xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"
    xmlns:ex-ds-eph="urn:example:ds-ephemeral">

  <module-set>
    <name>config-state-modules</name>
    <module>
      <name>ietf-interfaces</name>
      <revision>2018-02-20</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-interfaces
      </namespace>
    </module>
    <module>
      <name>ietf-ip</name>
      <revision>2018-02-22</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-ip
      </namespace>
    </module>
    <module>
      <name>ietf-routing</name>
      <revision>2018-03-13</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-routing
      </namespace>
    </module>
    <import-only-module>
      <name>ietf-yang-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-yang-types
      </namespace>
    </import-only-module>
    <import-only-module>
      <name>ietf-inet-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-inet-types
      </namespace>
    </import-only-module>
  </module-set>

  <module-set>
    <name>config-only-modules</name>
    <module>
      <name>ietf-routing</name>
      <revision>2018-03-13</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-routing
      </namespace>
    </module>
  </module-set>

  <module-set>
    <name>dynamic-config-state-modules</name>
    <module>
      <name>ietf-network</name>
      <revision>2018-02-26</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-network
      </namespace>
    </module>
    <module>
      <name>ietf-network-topology</name>
      <revision>2018-02-26</revision> 
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-network-topology
      </namespace>
    </module>
    <import-only-module>
      <name>ietf-inet-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-inet-types
      </namespace>
    </import-only-module>
  </module-set>

  <module-set>
    <name>state-only-modules</name>
    <module>
      <name>ietf-hardware</name>
      <revision>2018-03-13</revision> 
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-hardware
      </namespace>
      <deviation>example-vendor-hardware-deviations</deviation>
    </module>
    <module>
      <name>ietf-routing</name>
      <revision>2018-03-13</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-routing
      </namespace>
      <feature>multiple-ribs</feature>
      <feature>router-id</feature>
    </module>
    <module>
      <name>example-vendor-hardware-deviations</name>
      <revision>2018-01-31</revision>
      <namespace>
        urn:example:example-vendor-hardware-deviations
      </namespace>
    </module>
    <import-only-module>
      <name>ietf-inet-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-inet-types
      </namespace>
    </import-only-module>
    <import-only-module>
      <name>ietf-yang-types</name>
      <revision>2013-07-15</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:ietf-yang-types
      </namespace>
    </import-only-module>
    <import-only-module>
      <name>iana-hardware</name>
      <revision>2018-03-13</revision>
      <namespace>
        urn:ietf:params:xml:ns:yang:iana-hardware
      </namespace>
    </import-only-module>
  </module-set>

  <schema>
    <name>config-schema</name>
    <module-set>config-state-modules</module-set>
    <module-set>config-only-modules</module-set>
  </schema>
  <schema>
    <name>dynamic-config-schema</name>
    <module-set>dynamic-config-state-modules</module-set>
  </schema>
  <schema>
    <name>state-schema</name>
    <module-set>config-state-modules</module-set>
    <module-set>dynamic-config-state-modules</module-set>
    <module-set>state-only-modules</module-set>
  </schema>

  <datastore>
    <name>ds:startup</name>
    <schema>config-schema</schema>
  </datastore>
  <datastore>
    <name>ds:running</name>
    <schema>config-schema</schema>
  </datastore>
  <datastore>
    <name>ex-ds-eph:ds-ephemeral</name>
    <schema>dynamic-config-schema</schema>
  </datastore>
  <datastore>
    <name>ds:operational</name>
    <schema>state-schema</schema>
  </datastore>

  <content-id>14782ab9bd56b92aacc156a2958fbe12312fb285</content-id>
</yang-library>
    ]]></artwork>
    </section>
  </back>
</rfc>
