draft-ietf-netconf-rfc7895bis-03.txt   draft-ietf-netconf-rfc7895bis-04.txt 
Network Working Group A. Bierman Network Working Group A. Bierman
Internet-Draft YumaWorks Internet-Draft YumaWorks
Obsoletes: rfc7895 (if approved) M. Bjorklund Obsoletes: 7895 (if approved) M. Bjorklund
Intended status: Standards Track Tail-f Systems Intended status: Standards Track Tail-f Systems
Expires: July 21, 2018 J. Schoenwaelder Expires: August 2, 2018 J. Schoenwaelder
Jacobs University Jacobs University
K. Watsen K. Watsen
Juniper Networks Juniper Networks
R. Wilton R. Wilton
Cisco Systems Cisco Systems
January 17, 2018 January 29, 2018
YANG Library YANG Library
draft-ietf-netconf-rfc7895bis-03 draft-ietf-netconf-rfc7895bis-04
Abstract Abstract
This document describes a YANG library that provides information This document describes a YANG library that provides information
about all the YANG modules and datastores used by a network about the YANG modules, datastores, and datastore schemas used by a
management server (e.g., a Network Configuration Protocol (NETCONF) network management server. Simple caching mechanisms are provided to
server). Simple caching mechanisms are provided to allow clients to allow clients to minimize retrieval of this information. This
minimize retrieval of this information. version of the YANG library supports the Network Management Datastore
Architecture by listing all datastores supported by a network
management server and the schema that is used by each of these
datastores.
This document obsoletes RFC 7895.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 21, 2018. This Internet-Draft will expire on August 2, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 4 3. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Motivation for rfc7895bis . . . . . . . . . . . . . . . . 4 4. YANG Library Data Model . . . . . . . . . . . . . . . . . . . 6
1.4. Summary of Changes from RFC 7895 . . . . . . . . . . . . 6 5. YANG Library YANG Module . . . . . . . . . . . . . . . . . . 8
2. YANG Library . . . . . . . . . . . . . . . . . . . . . . . . 6 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21
2.1. yang-library . . . . . . . . . . . . . . . . . . . . . . 7 7. Security Considerations . . . . . . . . . . . . . . . . . . . 21
2.1.1. yang-library/checksum . . . . . . . . . . . . . . . . 7 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 22
2.1.2. yang-library/datastore . . . . . . . . . . . . . . . 8 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.3. yang-library/schema . . . . . . . . . . . . . . . . . 8 9.1. Normative References . . . . . . . . . . . . . . . . . . 22
2.1.4. yang-library/module-set . . . . . . . . . . . . . . . 8 9.2. Informative References . . . . . . . . . . . . . . . . . 23
2.1.5. yang-library/module-set/module . . . . . . . . . . . 9 Appendix A. Summary of Changes from RFC 7895 . . . . . . . . . . 25
2.1.6. yang-library/module-set/import-only-module . . . . . 9 Appendix B. Example YANG Library Instance for a Basic Server . . 25
2.2. YANG Library Module . . . . . . . . . . . . . . . . . . . 9 Appendix C. Example YANG Library Instance for an Advanced Server 28
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32
3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 21
4. Security Considerations . . . . . . . . . . . . . . . . . . . 22
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 22
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.1. Normative References . . . . . . . . . . . . . . . . . . 23
6.2. Informative References . . . . . . . . . . . . . . . . . 24
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction 1. Introduction
There is a need for standard mechanisms to provide the operational There is a need for a standard mechanism to expose which YANG modules
state of a network management server. This includes, for instance, [RFC7950], datastores and datastore schemas
identifying the YANG modules and datastores that are in use by a [I-D.ietf-netmod-revised-datastores] are in use by a network
server and how they relate to each other. management server.
This document defines a YANG module that can be used to provide this This document defines the YANG module "ietf-yang-library" that
informaton, in a way that is compatible with the NMDA provides this informaton. This version of the YANG library is
[I-D.ietf-netmod-revised-datastores], but that is also backwards compatible with the Network Management Datastore Architecture (NMDA)
compatible with the "YANG Module Library" YANG module defined in [I-D.ietf-netmod-revised-datastores]. The previous version of the
[RFC7895]. YANG library, defined in [RFC7895], 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.
If a large number of YANG modules are utilized by the server, then The old YANG library definitions have been retained (for backwards
the YANG library contents needed can be relatively large. This compability reasons) but the definitions have been marked as
information changes very infrequently, so it is important that deprecated. For backwards compatability, an NMDA-supporting server
SHOULD populate the deprecated "/modules-state" tree in a backwards-
compatible manner. The new "/yang-library" tree would be ignored by
legacy clients, while providing all the data needed for NMDA-aware
clients, which would themselves ignore the "/modules-state" tree.
The recommended approach to populate /modules-state is to report the
schema for YANG modules that are configurable via conventional
datastores and for which config false data nodes are returned via a
NETCONF <get> operation, or equivalent.
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.
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 changes very infrequently, it is important that
clients be able to cache the YANG library contents and easily clients be able to cache the YANG library contents and easily
identify whether their cache is out of date. identify whether their cache is out of date.
YANG library information can be different on every server and can All NETCONF servers supporting YANG 1.1 [RFC7950] are required to
change at runtime or across a server reboot. support YANG Library (see Section 5.6.4 of RFC 7950). NETCONF
servers implementing the NETCONF extensions to support the NMDA
[I-D.ietf-netconf-nmda-netconf] must implement at least the version
of the YANG library defined in this document. Similarly, all
RESTCONF servers are required to support YANG Library (see Section 10
of RFC 8040). RESTCONF servers implementing the RESTCONF extensions
to support the NMDA [I-D.ietf-netconf-nmda-restconf] must implement
at least the version of the YANG library defined in this document.
If the server implements multiple protocols to access the YANG- The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
defined data, each such protocol has its own conceptual instantiation "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
of the YANG library. "OPTIONAL" in this document are to be interpreted as described in BCP
14, [RFC2119].
The following information is needed by a client application (for each 2. Terminology
YANG module in the library) to fully utilize the YANG data modeling
language:
o identifier: a unique identifier for the module that includes the The following terms are defined in [RFC7950]:
module's name, revision, submodules, features, and deviations.
o name: The name of the YANG module. o module
o submodule
o revision: Each YANG module and submodule within the library SHOULD o data node
have a revision. This is derived from the most recent revision
statement within the module or submodule.
o submodule list: The name, and if defined, revision of each The following terms are defined in
submodule used by the module MUST be identified. [I-D.ietf-netmod-revised-datastores]:
o feature list: The name of each YANG feature supported by the o datastore
server, in a given datastore schema, MUST be identified.
o deviation list: The name of each YANG module used for deviation o datastore schema
statements, in a given datastore schema, MUST be identified.
The following information is needed by a client application (for each o configuration
datastore supported by the server) to fully access all the YANG-
modelled data available on the server:
o identity: the YANG identity for the datastore. o configuration datastore
o modules: modules supported by the datastore, including any o conventional configuration
features and deviations.
1.1. Terminology o conventional configuration datastore
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", o operational state
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14, [RFC2119].
The following terms are defined in [RFC7950]: o operational state datastore
o module o dynamic configuration datastore
o submodule o client and server
The following terms are defined in The following terms are used within this document:
[I-D.ietf-netmod-revised-datastores]:
o conventional configuration datastore o YANG library: A collection of YANG modules, submodules,
datastores, and datastore schemas used by a server.
o operational state datastore o YANG library checksum: A server-generated checksum of the contents
of the YANG library.
o operational state Tree diagrams used in this document use the notation defined in
[I-D.ietf-netmod-yang-tree-diagrams].
o datastore schema 3. Objectives
o client The following information is needed by a client application (for each
YANG module in the library) to fully utilize the YANG data modeling
language:
o server o name: The name of the YANG module.
1.2. Tree Diagrams o revision: Each YANG module and submodule within the library SHOULD
have a revision. This is derived from the most recent revision
statement within the module or submodule.
Tree diagrams used in this document follow the notation defined in o submodule list: The name, and if defined, revision of each
[I-D.ietf-netmod-yang-tree-diagrams]. submodule used by the module MUST be identified.
1.3. Motivation for rfc7895bis o feature list: The name of each YANG feature supported by the
server, in a given datastore schema, MUST be identified.
RFC Ed.: delete this section, including this note, at time of o deviation list: The name of each YANG module used for deviation
publication. statements, in a given datastore schema, MUST be identified.
All NETCONF servers supporting YANG 1.1 [RFC7950] are required to In addition, the following information is needed by a client
support YANG Library (see Section 5.6.4 of RFC 7950). Similarly, all application for each datastore supported by a server:
RESTCONF servers are required to support YANG Library (see Section 10
of RFC 8040). These requirements are independent of if the server
supports NMDA or not.
RFC 7895 has a mandatory to implement "modules-state" tree that a o identity: The YANG identity for the datastore.
server uses to advertise all the modules it supports. However, this
module was designed assuming the all modules would be in all
datastores, and with the same number of features and deviations.
However, this is not the case with NMDA-compatible servers that may
have some modules that only appear in <operational> (e.g., ietf-
network-topo) or only also appear in a dynamic datastore (e.g., i2rs-
ephemeral-rib). It is also possible that a server only implements a
module in <running>, as it hasn't yet coded support for returning the
module's opstate yet. Presumably, an NMDA-supporting server would
return all modules implemented in every datastore, but this would be
misleading to existing clients and unhelpful to NMDA-aware clients.
In the end, it appears that the "modules-state" node should be for o schema: The schema (i.e., the set of modules) implemented by the
non-NMDA aware clients. For backwards compatability, an NMDA- datastore.
supporting server SHOULD populate "modules-state" in a backwards-
compatible manner. The new "yang-library" node would be ignored by
legacy clients, while providing all the data needed for NMDA-aware
clients, which would themselves ignore the "modules-state" tree.
Design objectives: In order to select one out of several possible data model designs,
the following criteria were used:
1. As efficient as possible for a client to consume. Since the size 1. Efficient for a client to consume. Since the size of the YANG
of the yang library can be quite large, it should be possible for library can be quite large, it should be possible for clients to
clients to cache the yang library information. cache the YANG library information.
2. A dynamic configuration datastore must be able to implement a 2. A dynamic configuration datastore must be able to implement a
module or feature that is not implemented in the conventional module or feature that is not implemented in the conventional
datastores. configuration datastores.
3. It must be possible to NOT implement a module or feature in 3. It must be possible to NOT implement a module or feature in
<operational>, even if it is implemented in some other datastore. <operational>, even if it is implemented in some other datastore.
This is required for transition purposes; a server that wants to This is required for transition purposes; a server that wants to
implement <operational> should not have to implement all modules implement <operational> should not have to implement all modules
at once. at once.
4. A given module can only be implemented in one revision in all 4. A given module can only be implemented in one revision in all
datastores. If a module is implemented in more than one datastores. If a module is implemented in more than one
datastores, the same revision is implemented in all these datastores, the same revision is implemented in all these
datastores. datastores.
5. Multiple revisions can be used for import, if import-by revision 5. Multiple revisions can be used for import, if import-by revision
is used. is used.
6. Nice to have: make it possible to be used by schema mount 6. Make it possible to use the YANG library by schema mount
[I-D.ietf-netmod-schema-mount].
The solution presented in this document is further motivated by the
following desires:
o leverage Section 5.6.4 of RFC 7950 and Section 10 of RFC 8040.
o indicate which modules are supported by each datastore
o enable the features and deviations to vary by datastore
o structure extensible to support schema-mount
o provide a top-level container for all server metadata
1.4. Summary of Changes from RFC 7895
This document updates [RFC7895] in the following ways:
o Renames document title from "YANG Module Library" to "YANG
Library".
o Adds a new top-level "yang-library" container to hold many types
of server metadata: modules supported, datastores supported,
relationships between datastores and modules, etc.
o Adds a set of new groupings as replacements for the deprecated
"module-list" grouping.
o Adds a "yang-library-update" notification as a replacement for the
deprecated "yang-library-change" notification.
o Deprecates the "modules-state" tree.
o Deprecates the "module-list" grouping. 4. YANG Library Data Model
o Deprecates the "yang-library-change" notification. The "ietf-yang-library" YANG module provides information about the
modules, submodules, datastores, and datastore schemas supported by a
server. All data nodes in "ietf-yang-library" are "config false",
and thus only accessible in the operational state datastore.
2. YANG Library +-----------+
| datastore |
+-----------+
|
| has a
V
+-----------+ +--------+ +------------+
| datastore | union of | module | consists of | modules + |
| schema |----------->| set |--------------->| submodules |
+-----------+ +--------+ +------------+
The "ietf-yang-library" module provides information about the modules Figure 1
and datastores supported by a server. This module is defined using
YANG version 1.1, but it supports the description of YANG modules
written in any revision of YANG.
All data nodes in "ietf-yang-library" are "config false", and thus The conceptual model of the YANG library is depicted in Figure 1.
accessible in the operational state datastore. 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 that individual datastore schema 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.
Following is the YANG Tree Diagram for the "ietf-yang-library" Below is the YANG Tree Diagram for the "ietf-yang-library" module,
module, excluding the deprecated "modules-state" tree: excluding the deprecated "modules-state" tree:
module: ietf-yang-library module: ietf-yang-library
+--ro yang-library +--ro yang-library
+--ro module-set* [name] +--ro module-set* [name]
| +--ro name string | +--ro name string
| +--ro checksum string
| +--ro module* [name] | +--ro module* [name]
| | +--ro name yang:yang-identifier | | +--ro name yang:yang-identifier
| | +--ro revision? revision-identifier | | +--ro revision? revision-identifier
| | +--ro namespace inet:uri | | +--ro namespace inet:uri
| | +--ro location* inet:uri | | +--ro location* inet:uri
| | +--ro submodule* [name] | | +--ro submodule* [name]
| | | +--ro name yang:yang-identifier | | | +--ro name yang:yang-identifier
| | | +--ro revision? revision-identifier | | | +--ro revision? revision-identifier
| | | +--ro location* inet:uri | | | +--ro location* inet:uri
| | +--ro feature* [name] | | +--ro feature* [name]
| | | +--ro name yang:yang-identifier | | | +--ro name yang:yang-identifier
| | +--ro deviation* [module] | | +--ro deviation* [module]
| | +--ro module -> ../../name | | +--ro module -> ../../../module/name
| +--ro import-only-module* [name revision] | +--ro import-only-module* [name revision]
| +--ro name yang:yang-identifier | +--ro name yang:yang-identifier
| +--ro revision union | +--ro revision union
| +--ro namespace inet:uri | +--ro namespace inet:uri
| +--ro location* inet:uri | +--ro location* inet:uri
| +--ro submodule* [name] | +--ro submodule* [name]
| +--ro name yang:yang-identifier | +--ro name yang:yang-identifier
| +--ro revision? revision-identifier | +--ro revision? revision-identifier
| +--ro location* inet:uri | +--ro location* inet:uri
+--ro schema* [name] +--ro schema* [name]
| +--ro name string | +--ro name string
| +--ro checksum string
| +--ro module-set* -> ../../module-set/name | +--ro module-set* -> ../../module-set/name
+--ro datastore* [name] +--ro datastore* [name]
| +--ro name identityref | +--ro name ds:datastore-ref
| +--ro schema -> ../../schema/name | +--ro schema -> ../../schema/name
+--ro checksum string +--ro checksum string
notifications: notifications:
+---n yang-library-update +---n yang-library-update
+--ro checksum -> /yang-library/checksum
2.1. yang-library The "/yang-library" container holds the entire YANG library. The
container has the following child nodes:
This container holds all of the server's metadata.
2.1.1. yang-library/checksum
This mandatory leaf contains a unique implementation-specific
identifier representing the current information in the YANG library
on a specific server. The value of this leaf MUST change whenever
the the information in the YANG library changes. There is no
requirement that the same information always results in the same
"checksum" 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.
Note that for a NETCONF server that implements YANG 1.1 [RFC7950], a
change of the "checksum" value results in a new value for the :yang-
library capability defined in [RFC7950]. Thus, if such a server
implements NETCONF notifications [RFC5277], and the notification
"netconf-capability-change" [RFC6470], a "netconf-capability-change"
notification is generated whenever the "checksum" changes.
2.1.2. yang-library/datastore
This list contains one entry for each datastore supported by the o The "/yang-library/module-set" contains entries representing
server, and identifies the datastore schema associated with a module sets. The list "/yang-library/module-set/module"
datastore via a reference to an entry in the "schema" list. Each enumerates the modules that belong to the module set. A module is
supported conventional configuration datastore has a separate entry. 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.
2.1.3. yang-library/schema o 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.
An entry in the "schema" list represents the datastore schema that is o The "/yang-library/datastore" list contains one entry for each
used by one or more datastores. 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.
This list contains one entry for each schema in use by the server o The "/yang-library/checksum" leaf contains the YANG library
(e.g., presented by a datastore). checksum, which is a unique 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 results in the same "checksum"
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.
All conventional configuration datastores and the operational state Note that for a NETCONF server implementing the NETCONF extensions to
datastore use the same "schema" entry. support the NMDA [I-D.ietf-netconf-nmda-netconf], a change of the
YANG library checksum results in a new value for the :yang-
library:1.1 capability defined in [I-D.ietf-netconf-nmda-netconf].
Thus, if such a server implements NETCONF notifications [RFC5277],
and the notification "netconf-capability-change" [RFC6470], a
"netconf-capability-change" notification is generated whenever the
YANG library checksum changes.
A dynamic configuration datastore may use a different datastore 5. YANG Library YANG Module
schema from the conventional configuration datastores, and hence may
require a separate "schema" entry.
A schema has a leaf-list with references to entries in the The "ietf-yang-library" YANG module imports definitions from
"module-set" list. The schema consists of the sum of all modules in "ietf-yang-types" and "ietf-inet-types" defined in [RFC6991] and from
all referenced module sets. "ietf-datastores" defined in [I-D.ietf-netmod-revised-datastores].
While the YANG module is defined using YANG version 1.1, the YANG
library supports the YANG modules written in any version of YANG.
2.1.4. yang-library/module-set RFC Ed.: update the date below with the date of RFC publication and
2.1.5. yang-library/module-set/module remove this note.
2.1.6. yang-library/module-set/import-only-module <CODE BEGINS> file "ietf-yang-library@2018-01-26.yang"
2.2. YANG Library Module module ietf-yang-library {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
prefix "yanglib";
The "ietf-yang-library" module defines monitoring information for the import ietf-yang-types {
YANG modules used by a server. 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 "I-D.ietf-revised-datastores:
Network Management Datastore Architecture.";
}
The modules "ietf-yang-types" and "ietf-inet-types" from [RFC6991] organization
and the module "ietf-datastores" from "IETF NETCONF (Network Configuration) Working Group";
[I-D.ietf-netmod-revised-datastores] are used by this module for some
type definitions.
RFC Ed.: update the date below with the date of RFC publication and contact
remove this note. "WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
<CODE BEGINS> file "ietf-yang-library@2018-01-17.yang" Author: Andy Bierman
<mailto:andy@yumaworks.com>
module ietf-yang-library { Author: Martin Bjorklund
yang-version 1.1; <mailto:mbj@tail-f.com>
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
prefix "yanglib";
import ietf-yang-types { Author: Juergen Schoenwaelder
prefix yang; <mailto:j.schoenwaelder@jacobs-university.de>
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 "I-D.ietf-revised-datastores:
Network Management Datastore Architecture.";
}
organization Author: Kent Watsen
"IETF NETCONF (Network Configuration) Working Group"; <mailto:kwatsen@juniper.net>
contact Author: Rob Wilton
"WG Web: <http://tools.ietf.org/wg/netconf/> <rwilton@cisco.com>";
WG List: <mailto:netconf@ietf.org>
Author: Andy Bierman description
<mailto:andy@yumaworks.com> "This module provides information about the YANG modules,
datastores, and datastore schemas used by a network
management server.
Author: Martin Bjorklund Copyright (c) 2018 IETF Trust and the persons identified as
<mailto:mbj@tail-f.com> authors of the code. All rights reserved.
Author: Juergen Schoenwaelder Redistribution and use in source and binary forms, with or
<mailto:j.schoenwaelder@jacobs-university.de> 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
(http://trustee.ietf.org/license-info).
Author: Kent Watsen This version of this YANG module is part of RFC XXXX; see
<mailto:kwatsen@juniper.net> the RFC itself for full legal notices.";
Author: Rob Wilton // RFC Ed.: update the date below with the date of RFC publication
<rwilton@cisco.com>"; // and remove this note.
// RFC Ed.: replace XXXX with actual RFC number and remove this
// note.
revision 2018-01-26 {
description
"Added support for multiple datastores according to the
Network Management Datastore Architecture (NMDA).";
reference
"RFC XXXX: YANG Library.";
}
revision 2016-04-09 {
description
"Initial revision.";
reference
"RFC 7895: YANG Module Library.";
}
description /*
"This module contains information about the YANG server instance, * Typedefs
including the modules and datastores the server supports, and */
which modules are present in which datastores.
Copyright (c) 2018 IETF Trust and the persons identified as typedef revision-identifier {
authors of the code. All rights reserved. type string {
pattern '\d{4}-\d{2}-\d{2}';
}
description
"Represents a specific date in YYYY-MM-DD format.";
}
Redistribution and use in source and binary forms, with or /*
without modification, is permitted pursuant to, and subject * Groupings
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
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see grouping module-identification-leafs {
the RFC itself for full legal notices."; description
"Parameters for identifying YANG modules and submodules.";
// RFC Ed.: update the date below with the date of RFC publication leaf name {
// and remove this note. type yang:yang-identifier;
// RFC Ed.: replace XXXX with actual RFC number and remove this mandatory true;
// note. description
revision 2018-01-17 { "The YANG module or submodule name.";
description }
"Added support for multiple datastores."; leaf revision {
reference type revision-identifier;
"RFC XXXX: YANG Library."; description
} "The YANG module or submodule revision date. If no revision
revision 2016-04-09 { statement is present in the YANG module or submodule, this
description leaf is not instantiated.";
"Initial revision."; }
reference }
"RFC 7895: YANG Module Library.";
}
/* grouping location-leaf-list {
* Typedefs description
*/ "Common location leaf list parameter for modules and
submodules.";
typedef revision-identifier { leaf-list location {
type string { type inet:uri;
pattern '\d{4}-\d{2}-\d{2}'; description
} "Contains a URL that represents the YANG schema
description resource for this module or submodule.
"Represents a specific date in YYYY-MM-DD format.";
}
/* This leaf will only be present if there is a URL
* Groupings available for retrieval of the schema for this entry.";
*/ }
}
grouping module-identification-leafs { grouping implementation-parameters {
description description
"Parameters for identifying YANG modules and submodules."; "Parameters for describing the implementation of a module.";
leaf name { list feature {
type yang:yang-identifier; key "name";
mandatory true; description
description "List of YANG feature names from this module that are
"The YANG module or submodule name."; supported by the server, regardless whether they are defined
} in the module or any included submodule.";
leaf revision { leaf name {
type revision-identifier; type yang:yang-identifier;
description description
"The YANG module or submodule revision date. If no revision "A feature supported by the server.";
statement is present in the YANG module or submodule, this
leaf is not instantiated.";
}
}
grouping location-leaf-list { }
description }
"Common location leaf list parameter for modules and list deviation {
submodules."; key "module";
description
"List of 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.";
leaf-list location { leaf module {
type inet:uri; type leafref {
description path "../../../module/name";
"Contains a URL that represents the YANG schema }
resource for this module or submodule. description
"A module that deviates the module associated with this
entry.
This leaf will only be present if there is a URL While this reference MUST NOT be directly or indirectly
available for retrieval of the schema for this entry."; self-referential, clients must make sure that they
} handle such a situation gracefully.";
}
}
}
} grouping module-set-parameters {
description
"A set of parameters that describe a module set.";
grouping implementation-parameters { leaf name {
description type string;
"Parameters for describing the implementation of a module."; 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 with a particular set of supported features and
deviations.
list feature { The server implements one or more protocol-accessible
key "name"; objects defined in the YANG module identified in this entry.
description This includes deviation statements defined in the module.";
"List of 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 name {
type yang:yang-identifier;
description
"A feature supported by the server.";
}
}
list deviation {
key "module";
description
"List of 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.";
leaf module { uses module-identification-leafs;
type leafref { leaf namespace {
path "../../name"; type inet:uri;
} mandatory true;
description description
"A module that deviates the module associated with this "The XML namespace identifier for this module.";
entry."; }
}
}
}
grouping module-set-parameters { uses location-leaf-list;
description
"A set of parameters that describe a module set.";
leaf name { list submodule {
type string; key "name";
description description
"An arbitrary name of the module set."; "Each entry represents one submodule within the
} parent module.";
leaf checksum { uses module-identification-leafs;
type string; uses location-leaf-list;
config false; }
mandatory true;
description
"A server-generated checksum of the contents of the module
set. The server MUST change the value of this leaf if the
information represented by the module set, except
'checksum', has changed.";
}
list module {
key "name";
description
"An entry in this list represents a module implemented by the
server with a particular set of supported features and
deviations.
The server implements one or more protocol-accessible uses implementation-parameters;
objects defined in the YANG module identified in this entry. }
This includes deviation statements defined in the module."; 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.
uses module-identification-leafs; 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 namespace { leaf name {
type inet:uri; type yang:yang-identifier;
mandatory true; description
description "The YANG module name.";
"The XML namespace identifier for this module."; }
} 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.";
uses location-leaf-list; }
leaf namespace {
type inet:uri;
mandatory true;
description
"The XML namespace identifier for this module.";
}
list submodule { uses location-leaf-list;
key "name";
description
"Each entry represents one submodule within the
parent module.";
uses module-identification-leafs;
uses location-leaf-list;
}
uses implementation-parameters; list submodule {
} key "name";
list import-only-module { description
key "name revision"; "Each entry represents one submodule within the
description parent module.";
"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 uses module-identification-leafs;
can occur if multiple modules import the same module, but uses location-leaf-list;
specify different revision-dates in the import statements."; }
}
}
leaf name { grouping yang-library-parameters {
type yang:yang-identifier; description
description "The YANG library data structure is represented as a grouping
"The YANG module name."; so it can be reused in configuration or another monitoring
} data structure.";
leaf revision {
type union {
type revision-identifier;
type string {
length 0;
}
}
description
"The YANG module or 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 module-set {
key name;
description
"A set of modules that may be used by one or more schemas.
list submodule { A module set does not have to be referentially complete,
key "name"; i.e., it may define modules that contain import statements
description for other modules not included in the module set.";
"Each entry represents one submodule within the
parent module.";
uses module-identification-leafs; uses module-set-parameters;
uses location-leaf-list; }
}
}
}
grouping yang-library-parameters { list schema {
description key "name";
"The YANG library data structure is represented as a grouping description
so it can be reused in configuration or another monitoring "A datastore schema that may be used by one or more
data structure."; datastores.
list module-set { The schema must be valid and referentially complete, i.e., it
key name; must contain modules to satisfy all used import statements
description for all modules specified in the schema";
"A set of modules that may be used by one or more schemas.";
uses module-set-parameters; 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 module appears in multiple module sets,
then the module revision and the associated features
and deviations must be identical.";
}
}
list schema { list datastore {
key "name"; key "name";
description description
"A datastore schema that may be used by one or more "A datastore supported by this server.
datastores.";
leaf name { Each datastore indicates which schema it supports.
type string;
description
"An arbitrary name of the schema.";
}
leaf checksum {
type string;
config false;
mandatory true;
description
"A server-generated checksum of the contents of the schema.
The server MUST change the value of this leaf if the
information represented by the schema, except 'checksum',
has changed.";
}
leaf-list module-set {
type leafref {
path "../../module-set/name";
}
description
"A set of module-sets that are included in this schema.";
}
}
list datastore { The server MUST instantiate one entry in this list per
key "name"; specific datastore it supports.
description
"A datastore supported by this server.
Each datastore indicates which schema it supports. Each datstore entry with the same datastore schema SHOULD
reference the same schema.";
The server MUST instantiate one entry in this list per leaf name {
specific datastore it supports. 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 modules of the schema are implemented
with their associated features and deviations.";
}
}
Each datstore entry with the same datastore schema SHOULD }
reference the same schema.";
leaf name { /*
type identityref { * Top-level container
base ds:datastore; */
}
description
"The identity of the datastore.";
}
leaf schema {
type leafref {
path "../../schema/name";
}
mandatory true;
description container yang-library {
"A reference to the schema supported by this datastore."; config false;
} description
} "Container holding the entire YANG library of this server.";
}
/* uses yang-library-parameters;
* Top-level container
*/
container yang-library { leaf checksum {
config false; type string;
description mandatory true;
"Container providing all the YANG meta information the description
server possesses."; "A server-generated checksum 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/checksum', has
changed.";
}
}
uses yang-library-parameters; /*
* Notifications
*/
leaf checksum { notification yang-library-update {
type string; description
mandatory true; "Generated when any YANG library information on the
description server has changed.";
"A server-generated checksum 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/checksum', has
changed.";
}
}
/*
* Notifications
*/
notification yang-library-update { leaf checksum {
description type leafref {
"Generated when any YANG library information on the path "/yanglib:yang-library/yanglib:checksum";
server has changed."; }
} mandatory true;
description
"Contains the YANG library checksum for the updated YANG
library at the time the notification is generated.";
}
}
/* /*
* Legacy groupings * Legacy groupings
*/ */
grouping module-list { grouping module-list {
status deprecated; status deprecated;
description description
"The module data structure is represented as a grouping "The module data structure is represented as a grouping
so it can be reused in configuration or another monitoring so it can be reused in configuration or another monitoring
data structure."; data structure.";
grouping common-leafs { grouping common-leafs {
status deprecated; status deprecated;
description description
"Common parameters for YANG modules and submodules."; "Common parameters for YANG modules and submodules.";
leaf name { leaf name {
type yang:yang-identifier; type yang:yang-identifier;
status deprecated; status deprecated;
description description
"The YANG module or submodule name."; "The YANG module or submodule name.";
} }
leaf revision { leaf revision {
type union { type union {
type revision-identifier; type revision-identifier;
type string { type string {
length 0; length 0;
} }
} }
status deprecated; status deprecated;
description description
"The YANG module or submodule revision date. "The YANG module or submodule revision date.
A zero-length string is used if no revision statement A zero-length string is used if no revision statement
is present in the YANG module or submodule."; is present in the YANG module or submodule.";
} }
} }
grouping schema-leaf { grouping schema-leaf {
status deprecated; status deprecated;
description description
"Common schema leaf parameter for modules and submodules."; "Common schema leaf parameter for modules and submodules.";
leaf schema { leaf schema {
type inet:uri; type inet:uri;
description description
"Contains a URL that represents the YANG schema "Contains a URL that represents the YANG schema
resource for this module or submodule. resource for this module or submodule.
This leaf will only be present if there is a URL This leaf will only be present if there is a URL
available for retrieval of the schema for this entry."; available for retrieval of the schema for this entry.";
} }
} }
list module { list module {
key "name revision"; key "name revision";
status deprecated; status deprecated;
description description
"Each entry represents one revision of one module "Each entry represents one revision of one module
currently supported by the server."; currently supported by the server.";
uses common-leafs { uses common-leafs {
status deprecated; status deprecated;
} }
uses schema-leaf { uses schema-leaf {
status deprecated; status deprecated;
} }
leaf namespace { leaf namespace {
type inet:uri; type inet:uri;
mandatory true; mandatory true;
status deprecated; status deprecated;
description description
"The XML namespace identifier for this module."; "The XML namespace identifier for this module.";
} }
leaf-list feature { leaf-list feature {
type yang:yang-identifier; type yang:yang-identifier;
status deprecated; status deprecated;
description description
"List of YANG feature names from this module that are "List of YANG feature names from this module that are
supported by the server, regardless whether they are supported by the server, regardless whether they are
defined in the module or any included submodule."; defined in the module or any included submodule.";
} }
list deviation { list deviation {
key "name revision"; key "name revision";
status deprecated; status deprecated;
description description
"List of YANG deviation module names and revisions "List of YANG deviation module names and revisions
used by this server to modify the conformance of used by this server to modify the conformance of
the module associated with this entry. Note that the module associated with this entry. Note that
the same module can be used for deviations for the same module can be used for deviations for
multiple modules, so the same entry MAY appear multiple modules, so the same entry MAY appear
within multiple 'module' entries. within multiple 'module' entries.
The deviation module MUST be present in the 'module' The deviation module MUST be present in the 'module'
list, with the same name and revision values. list, with the same name and revision values.
The 'conformance-type' value will be 'implement' for The 'conformance-type' value will be 'implement' for
the deviation module."; the deviation module.";
uses common-leafs { uses common-leafs {
status deprecated; status deprecated;
} }
} }
leaf conformance-type { leaf conformance-type {
type enumeration { type enumeration {
enum implement { enum implement {
description description
"Indicates that the server implements one or more "Indicates that the server implements one or more
protocol-accessible objects defined in the YANG module protocol-accessible objects defined in the YANG module
identified in this entry. This includes deviation identified in this entry. This includes deviation
statements defined in the module. statements defined in the module.
For YANG version 1.1 modules, there is at most one For YANG version 1.1 modules, there is at most one
module entry with conformance type 'implement' for a module entry with conformance type 'implement' for a
particular module name, since YANG 1.1 requires that particular module name, since YANG 1.1 requires that
at most one revision of a module is implemented. at most one revision of a module is implemented.
For YANG version 1 modules, there SHOULD NOT be more For YANG version 1 modules, there SHOULD NOT be more
than one module entry for a particular module name."; than one module entry for a particular module name.";
} }
enum import { enum import {
description description
"Indicates that the server imports reusable definitions "Indicates that the server imports reusable definitions
from the specified revision of the module, but does from the specified revision of the module, but does
not implement any protocol accessible objects from not implement any protocol accessible objects from
this revision. this revision.
Multiple module entries for the same module name MAY Multiple module entries for the same module name MAY
exist. This can occur if multiple modules import the exist. This can occur if multiple modules import the
same module, but specify different revision-dates in same module, but specify different revision-dates in
the import statements."; the import statements.";
} }
} }
mandatory true; mandatory true;
status deprecated; status deprecated;
description description
"Indicates the type of conformance the server is claiming "Indicates the type of conformance the server is claiming
for the YANG module identified by this entry."; 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;
}
}
} }
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 * Legacy operational state data nodes
*/ */
container modules-state { container modules-state {
config false; config false;
status deprecated; status deprecated;
description description
"Contains YANG module monitoring information."; "Contains YANG module monitoring information.";
leaf module-set-id { leaf module-set-id {
type string; type string;
mandatory true; mandatory true;
status deprecated; status deprecated;
description description
"Contains a server-specific identifier representing "Contains a server-specific identifier representing
the current set of modules and submodules. The the current set of modules and submodules. The
server MUST change the value of this leaf if the server MUST change the value of this leaf if the
information represented by the 'module' list instances information represented by the 'module' list instances
has changed."; has changed.";
} }
uses module-list { uses module-list {
status deprecated; status deprecated;
} }
} }
/* /*
* Legacy notifications * Legacy notifications
*/ */
notification yang-library-change { notification yang-library-change {
status deprecated; status deprecated;
description description
"Generated when the set of modules and submodules supported "Generated when the set of modules and submodules supported
by the server has changed."; by the server has changed.";
leaf module-set-id { leaf module-set-id {
type leafref { type leafref {
path "/yanglib:modules-state/yanglib:module-set-id"; path "/yanglib:modules-state/yanglib:module-set-id";
} }
mandatory true; mandatory true;
status deprecated; status deprecated;
description description
"Contains the module-set-id value representing the "Contains the module-set-id value representing the
set of modules and submodules supported at the server set of modules and submodules supported at the server
at the time the notification is generated."; at the time the notification is generated.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
3. IANA Considerations 6. IANA Considerations
3.1. YANG Module Registry
RFC 7895 previously registered one URI in the IETF XML registry RFC 7895 previously registered one URI in the IETF XML registry
[RFC3688]. Following the format in RFC 3688, the following [RFC3688]. This document takes over this registration entry made by
registration was made: RFC 7895 and changes the Registrant to the IESG according to
Section 4 in [RFC3688].
URI: urn:ietf:params:xml:ns:yang:ietf-yang-library URI: urn:ietf:params:xml:ns:yang:ietf-yang-library
Registrant Contact: The NETCONF WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
This document takes over this registration entry made by RFC 7895. Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
RFC 7895 previously registered one YANG module in the "YANG Module RFC 7895 previously registered one YANG module in the "YANG Module
Names" registry [RFC6020] as follows: Names" registry [RFC6020] as follows:
name: ietf-yang-library name: ietf-yang-library
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
prefix: yanglib prefix: yanglib
reference: RFC 7895 reference: RFC 7895
This document takes over this registration entry made by RFC 7895. This document takes over this registration entry made by RFC 7895.
4. Security Considerations 7. Security Considerations
The YANG module defined in this document is designed to be accessed The YANG module specified in this document defines a schema for data
via network management protocols such as NETCONF [RFC6241] or that is accessed by network management protocols such as NETCONF
RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the
layer, and the mandatory-to-implement secure transport is Secure secure transport layer, and the mandatory-to-implement secure
Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
mandatory-to-implement secure transport is TLS [RFC5246]. is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC5246].
The NETCONF access control model [RFC6536] provides the means to The NETCONF access control model [RFC6536] provides the means to
restrict access for particular NETCONF or RESTCONF users to a restrict access for particular NETCONF or RESTCONF users to a
preconfigured subset of all available NETCONF or RESTCONF protocol preconfigured subset of all available NETCONF or RESTCONF protocol
operations and content. operations and content.
Some of the readable data nodes in this YANG module may be considered Some of the readable data nodes in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get, get-config, or important to control read access (e.g., via get, get-config, or
notification) to these data nodes. These are the subtrees and data notification) to these data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability: nodes and their sensitivity/vulnerability:
o /yang-library/schema: The schema list used in a server The "/yang-library" subtree of the YANG library may help an attacker
implementation may help an attacker identify the server identify the server capabilities and server implementations with
capabilities and server implementations with known bugs. Although known bugs since the set of YANG modules supported by a server may
some of this information may be available to all users via the reveal the kind of device and the manufacturer of the device.
NETCONF <hello> message (or similar messages in other management Although some of this information may be available to all NETCONF
protocols), this YANG module potentially exposes additional users via the NETCONF <hello> message (or similar messages in other
details that could be of some assistance to an attacker. Server management protocols), this YANG module potentially exposes
vulnerabilities may be specific to particular modules, module additional details that could be of some assistance to an attacker.
revisions, module features, or even module deviations. This Server vulnerabilities may be specific to particular modules, module
information is included in each module entry. For example, if a revisions, module features, or even module deviations. For example,
particular operation on a particular data node is known to cause a if a particular operation on a particular data node is known to cause
server to crash or significantly degrade device performance, then a server to crash or significantly degrade device performance, then
the module list information will help an attacker identify server the module list information will help an attacker identify server
implementations with such a defect, in order to launch a denial- implementations with such a defect, in order to launch a denial-of-
of-service attack on the device. service attack on the device.
5. Acknowledgements 8. Acknowledgements
Contributions to this material by Andy Bierman are based upon work Contributions to this material by Andy Bierman are based upon work
supported by the The Space & Terrestrial Communications Directorate supported by the The Space & Terrestrial Communications Directorate
(S&TCD) under Contract No. W15P7T-13-C-A616. Any opinions, findings (S&TCD) under Contract No. W15P7T-13-C-A616. Any opinions, findings
and conclusions or recommendations expressed in this material are and conclusions or recommendations expressed in this material are
those of the author(s) and do not necessarily reflect the views of those of the author(s) and do not necessarily reflect the views of
The Space & Terrestrial Communications Directorate (S&TCD). The Space & Terrestrial Communications Directorate (S&TCD).
6. References 9. References
6.1. Normative References 9.1. Normative References
[I-D.ietf-netmod-revised-datastores] [I-D.ietf-netmod-revised-datastores]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore and R. Wilton, "Network Management Datastore
Architecture", draft-ietf-netmod-revised-datastores-10 Architecture", draft-ietf-netmod-revised-datastores-10
(work in progress), January 2018. (work in progress), January 2018.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
RFC2119, March 1997, <https://www.rfc-editor.org/info/ RFC2119, March 1997, <https://www.rfc-editor.org/info/
skipping to change at page 24, line 13 skipping to change at page 23, line 41
editor.org/info/rfc6991>. editor.org/info/rfc6991>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>. <https://www.rfc-editor.org/info/rfc8040>.
6.2. Informative References 9.2. Informative References
[I-D.ietf-i2rs-yang-network-topo]
Clemm, A., Medved, J., Varga, R., Bahadur, N.,
Ananthakrishnan, H., and X. Liu, "A Data Model for Network
Topologies", draft-ietf-i2rs-yang-network-topo-20 (work in
progress), December 2017.
[I-D.ietf-netconf-nmda-netconf]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "NETCONF Extensions to Support the Network
Management Datastore Architecture", draft-ietf-netconf-
nmda-netconf-02 (work in progress), January 2018.
[I-D.ietf-netconf-nmda-restconf]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "RESTCONF Extensions to Support the Network
Management Datastore Architecture", draft-ietf-netconf-
nmda-restconf-02 (work in progress), January 2018.
[I-D.ietf-netmod-entity]
Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A
YANG Data Model for Hardware Management", draft-ietf-
netmod-entity-08 (work in progress), January 2018.
[I-D.ietf-netmod-rfc7223bis]
Bjorklund, M., "A YANG Data Model for Interface
Management", draft-ietf-netmod-rfc7223bis-03 (work in
progress), January 2018.
[I-D.ietf-netmod-rfc7277bis]
Bjorklund, M., "A YANG Data Model for IP Management",
draft-ietf-netmod-rfc7277bis-03 (work in progress),
January 2018.
[I-D.ietf-netmod-rfc8022bis]
Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
Routing Management (NMDA Version)", draft-ietf-netmod-
rfc8022bis-11 (work in progress), January 2018.
[I-D.ietf-netmod-schema-mount]
Bjorklund, M. and L. Lhotka, "YANG Schema Mount", draft-
ietf-netmod-schema-mount-08 (work in progress), October
2017.
[I-D.ietf-netmod-yang-tree-diagrams] [I-D.ietf-netmod-yang-tree-diagrams]
Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft- Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft-
ietf-netmod-yang-tree-diagrams-04 (work in progress), ietf-netmod-yang-tree-diagrams-05 (work in progress),
December 2017. January 2018.
[RFC5277] Chisholm, S. and H. Trevino, "NETCONF Event [RFC5277] Chisholm, S. and H. Trevino, "NETCONF Event
Notifications", RFC 5277, DOI 10.17487/RFC5277, July 2008, Notifications", RFC 5277, DOI 10.17487/RFC5277, July 2008,
<https://www.rfc-editor.org/info/rfc5277>. <https://www.rfc-editor.org/info/rfc5277>.
[RFC6470] Bierman, A., "Network Configuration Protocol (NETCONF) [RFC6470] Bierman, A., "Network Configuration Protocol (NETCONF)
Base Notifications", RFC 6470, DOI 10.17487/RFC6470, Base Notifications", RFC 6470, DOI 10.17487/RFC6470,
February 2012, <https://www.rfc-editor.org/info/rfc6470>. February 2012, <https://www.rfc-editor.org/info/rfc6470>.
[RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module
Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, Library", RFC 7895, DOI 10.17487/RFC7895, June 2016,
<https://www.rfc-editor.org/info/rfc7895>. <https://www.rfc-editor.org/info/rfc7895>.
Appendix A. Summary of Changes from RFC 7895
This document updates [RFC7895] in the following ways:
o Renamed document title from "YANG Module Library" to "YANG
Library".
o Added a new top-level "/yang-library" container to hold the entire
YANG library providing information about module sets, schemas, and
datastores.
o Refactored the "/modules-state" container into a new
"/yang-library/module-set" list.
o Added a new "/yang-library/schema" list and a new "/yang-library/
datastore" list.
o Added a set of new groupings as replacements for the deprecated
groupings.
o Added a "yang-library-update" notification as a replacement for
the deprecated "yang-library-change" notification.
o Deprecated the "/modules-state" tree.
o Deprecated the "/module-list" grouping.
o Deprecated the "/yang-library-change" notification.
Appendix B. Example YANG Library Instance for a Basic Server
The following example shows the YANG Library of a basic server
implementing the "ietf-interfaces" [I-D.ietf-netmod-rfc7223bis] and
"ietf-ip" [I-D.ietf-netmod-rfc7277bis] modules in the <running>,
<startup>, and <operational> datastores and the "ietf-hardware"
[I-D.ietf-netmod-entity] module in the <operational> datastore.
Newlines in leaf values are added for formatting reasons.
<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-01-09</revision> <!-- RFC Ed. update this -->
<namespace>
urn:ietf:params:xml:ns:yang:ietf-interfaces
</namespace>
</module>
<module>
<name>ietf-ip</name>
<revision>2018-01-09</revision> <!-- RFC Ed. update this -->
<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-12-18</revision> <!-- RFC Ed. update this -->
<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>2017-12-18</revision> <!-- RFC Ed. update this -->
<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>
<checksum>75a43df9bd56b92aacc156a2958fbe12312fb285</checksum>
</yang-library>
Appendix C. Example YANG Library Instance for an Advanced Server
The following example extends the preceding Basic Server YANG Libary
example, by using modules from [I-D.ietf-netmod-rfc8022bis] and
[I-D.ietf-i2rs-yang-network-topo], to illustrate a slightly more
advanced server that:
o Has a module with features only enabled in <operational>; the
"ietf-routing module" is supported in <running>, <startup>, and
<operational>, but the "multiple-ribs" and "router-id" features
are only enabled in <operational>. Hence the "router-id" leaf may
be read but not configured.
o 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.
o Shows an example of datastore specific deviations. The module
"example-vendor-hardware-deviations" is included in the schema for
<operational> to remove data nodes that cannot be supported by the
server.
o Shows how module-sets can be used to organize related modules
together.
<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-01-09</revision> <!-- RFC Ed. update this -->
<namespace>
urn:ietf:params:xml:ns:yang:ietf-interfaces
</namespace>
</module>
<module>
<name>ietf-ip</name>
<revision>2018-01-09</revision> <!-- RFC Ed. update this -->
<namespace>
urn:ietf:params:xml:ns:yang:ietf-ip
</namespace>
</module>
<module>
<name>ietf-routing</name>
<revision>2018-01-25</revision> <!-- RFC Ed. update this -->
<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-01-25</revision> <!-- RFC Ed. update this -->
<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>2017-12-18</revision> <!-- RFC Ed. update this -->
<namespace>
urn:ietf:params:xml:ns:yang:ietf-network
</namespace>
</module>
<module>
<name>ietf-network-topology</name>
<revision>2017-12-18</revision> <!-- RFC Ed. update this -->
<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-12-18</revision> <!-- RFC Ed. update this -->
<namespace>
urn:ietf:params:xml:ns:yang:ietf-hardware
</namespace>
</module>
<module>
<name>ietf-routing</name>
<revision>2018-01-25</revision> <!-- RFC Ed. update this -->
<namespace>
urn:ietf:params:xml:ns:yang:ietf-routing
</namespace>
<feature>
<name>multiple-ribs</name>
</feature>
<feature>
<name>router-id</name>
</feature>
</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>2017-12-18</revision> <!-- RFC Ed. update this -->
<namespace>
urn:ietf:params:xml:ns:yang:iana-hardware
</namespace>
</import-only-module>
</module-set>
<module-set>
<name>state-only-vendor-deviation-modules</name>
<module>
<name>example-vendor-hardware-deviations</name>
<revision>2018-01-31</revision> <!-- RFC Ed. update this -->
<namespace>
urn:example:example-vendor-hardware-deviations
</namespace>
</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>
<module-set>state-only-vendor-deviation-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>
<checksum>14782ab9bd56b92aacc156a2958fbe12312fb285</checksum>
</yang-library>
Authors' Addresses Authors' Addresses
Andy Bierman Andy Bierman
YumaWorks YumaWorks
Email: andy@yumaworks.com Email: andy@yumaworks.com
Martin Bjorklund Martin Bjorklund
Tail-f Systems Tail-f Systems
 End of changes. 159 change blocks. 
763 lines changed or deleted 1124 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/