1 module ietf-yang-library {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
6 import ietf-yang-types {
9 "RFC 6991: Common YANG Data Types";
11 import ietf-inet-types {
14 "RFC 6991: Common YANG Data Types";
16 import ietf-datastores {
19 "RFC 8342: Network Management Datastore Architecture
24 "IETF NETCONF (Network Configuration) Working Group";
26 "WG Web: <https://datatracker.ietf.org/wg/netconf/>
27 WG List: <mailto:netconf@ietf.org>
29 <mailto:andy@yumaworks.com>
30 Author: Martin Bjorklund
31 <mailto:mbj@tail-f.com>
32 Author: Juergen Schoenwaelder
33 <mailto:j.schoenwaelder@jacobs-university.de>
35 <mailto:kent+ietf@watsen.net>
37 <mailto:rwilton@cisco.com>";
39 "This module provides information about the YANG modules,
40 datastores, and datastore schemas used by a network
42 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
43 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
44 'MAY', and 'OPTIONAL' in this document are to be interpreted as
45 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
46 they appear in all capitals, as shown here.
47 Copyright (c) 2019 IETF Trust and the persons identified as
48 authors of the code. All rights reserved.
49 Redistribution and use in source and binary forms, with or
50 without modification, is permitted pursuant to, and subject
51 to the license terms contained in, the Simplified BSD License
52 set forth in Section 4.c of the IETF Trust's Legal Provisions
53 Relating to IETF Documents
54 (https://trustee.ietf.org/license-info).
55 This version of this YANG module is part of RFC 8525; see
56 the RFC itself for full legal notices.";
60 "Added support for multiple datastores according to the
61 Network Management Datastore Architecture (NMDA).";
63 "RFC 8525: YANG Library";
69 "RFC 7895: YANG Module Library";
76 typedef revision-identifier {
78 pattern '\d{4}-\d{2}-\d{2}';
81 "Represents a specific date in YYYY-MM-DD format.";
87 grouping module-identification-leafs {
89 "Parameters for identifying YANG modules and submodules.";
91 type yang:yang-identifier;
94 "The YANG module or submodule name.";
97 type revision-identifier;
99 "The YANG module or submodule revision date. If no revision
100 statement is present in the YANG module or submodule, this
101 leaf is not instantiated.";
105 grouping location-leaf-list {
107 "Common leaf-list parameter for the locations of modules and
112 "Contains a URL that represents the YANG schema
113 resource for this module or submodule.
114 This leaf will only be present if there is a URL
115 available for retrieval of the schema for this entry.";
119 grouping module-implementation-parameters {
121 "Parameters for describing the implementation of a module.";
123 type yang:yang-identifier;
125 "List of all YANG feature names from this module that are
126 supported by the server, regardless whether they are defined
127 in the module or any included submodule.";
129 leaf-list deviation {
131 path "../../module/name";
135 "List of all YANG deviation modules used by this server to
136 modify the conformance of the module associated with this
137 entry. Note that the same module can be used for deviations
138 for multiple modules, so the same entry MAY appear within
139 multiple 'module' entries.
140 This reference MUST NOT (directly or indirectly)
141 refer to the module being deviated.
142 Robust clients may want to make sure that they handle a
143 situation where a module deviates itself (directly or
144 indirectly) gracefully.";
148 grouping module-set-parameters {
150 "A set of parameters that describe a module set.";
154 "An arbitrary name of the module set.";
159 "An entry in this list represents a module implemented by the
160 server, as per Section 5.6.5 of RFC 7950, with a particular
161 set of supported features and deviations.";
163 "RFC 7950: The YANG 1.1 Data Modeling Language";
164 uses module-identification-leafs;
169 "The XML namespace identifier for this module.";
171 uses location-leaf-list;
175 "Each entry represents one submodule within the
177 uses module-identification-leafs;
178 uses location-leaf-list;
180 uses module-implementation-parameters;
182 list import-only-module {
185 "An entry in this list indicates that the server imports
186 reusable definitions from the specified revision of the
187 module but does not implement any protocol-accessible
188 objects from this revision.
189 Multiple entries for the same module name MAY exist. This
190 can occur if multiple modules import the same module but
191 specify different revision dates in the import statements.";
193 type yang:yang-identifier;
195 "The YANG module name.";
199 type revision-identifier;
205 "The YANG module revision date.
206 A zero-length string is used if no revision statement
207 is present in the YANG module.";
213 "The XML namespace identifier for this module.";
215 uses location-leaf-list;
219 "Each entry represents one submodule within the
221 uses module-identification-leafs;
222 uses location-leaf-list;
227 grouping yang-library-parameters {
229 "The YANG library data structure is represented as a grouping
230 so it can be reused in configuration or another monitoring
235 "A set of modules that may be used by one or more schemas.
236 A module set does not have to be referentially complete,
237 i.e., it may define modules that contain import statements
238 for other modules not included in the module set.";
239 uses module-set-parameters;
244 "A datastore schema that may be used by one or more
246 The schema must be valid and referentially complete, i.e.,
247 it must contain modules to satisfy all used import
248 statements for all modules specified in the schema.";
252 "An arbitrary name of the schema.";
254 leaf-list module-set {
256 path "../../module-set/name";
259 "A set of module-sets that are included in this schema.
260 If a non-import-only module appears in multiple module
261 sets, then the module revision and the associated features
262 and deviations must be identical.";
268 "A datastore supported by this server.
269 Each datastore indicates which schema it supports.
270 The server MUST instantiate one entry in this list per
271 specific datastore it supports.
272 Each datastore entry with the same datastore schema SHOULD
273 reference the same schema.";
275 type ds:datastore-ref;
277 "The identity of the datastore.";
281 path "../../schema/name";
285 "A reference to the schema supported by this datastore.
286 All non-import-only modules of the schema are implemented
287 with their associated features and deviations.";
293 * Top-level container
296 container yang-library {
299 "Container holding the entire YANG library of this server.";
300 uses yang-library-parameters;
305 "A server-generated identifier of the contents of the
306 '/yang-library' tree. The server MUST change the value of
307 this leaf if the information represented by the
308 '/yang-library' tree, except '/yang-library/content-id', has
317 notification yang-library-update {
319 "Generated when any YANG library information on the
320 server has changed.";
323 path "/yanglib:yang-library/yanglib:content-id";
327 "Contains the YANG library content identifier for the updated
328 YANG library at the time the notification is generated.";
336 grouping module-list {
339 "The module data structure is represented as a grouping
340 so it can be reused in configuration or another monitoring
343 grouping common-leafs {
346 "Common parameters for YANG modules and submodules.";
348 type yang:yang-identifier;
351 "The YANG module or submodule name.";
355 type revision-identifier;
362 "The YANG module or submodule revision date.
363 A zero-length string is used if no revision statement
364 is present in the YANG module or submodule.";
368 grouping schema-leaf {
371 "Common schema leaf parameter for modules and submodules.";
375 "Contains a URL that represents the YANG schema
376 resource for this module or submodule.
377 This leaf will only be present if there is a URL
378 available for retrieval of the schema for this entry.";
385 "Each entry represents one revision of one module
386 currently supported by the server.";
398 "The XML namespace identifier for this module.";
401 type yang:yang-identifier;
404 "List of YANG feature names from this module that are
405 supported by the server, regardless of whether they are
406 defined in the module or any included submodule.";
413 "List of YANG deviation module names and revisions
414 used by this server to modify the conformance of
415 the module associated with this entry. Note that
416 the same module can be used for deviations for
417 multiple modules, so the same entry MAY appear
418 within multiple 'module' entries.
419 The deviation module MUST be present in the 'module'
420 list, with the same name and revision values.
421 The 'conformance-type' value will be 'implement' for
422 the deviation module.";
427 leaf conformance-type {
431 "Indicates that the server implements one or more
432 protocol-accessible objects defined in the YANG module
433 identified in this entry. This includes deviation
434 statements defined in the module.
435 For YANG version 1.1 modules, there is at most one
436 'module' entry with conformance type 'implement' for a
437 particular module name, since YANG 1.1 requires that
438 at most one revision of a module is implemented.
439 For YANG version 1 modules, there SHOULD NOT be more
440 than one 'module' entry for a particular module
445 "Indicates that the server imports reusable definitions
446 from the specified revision of the module but does
447 not implement any protocol-accessible objects from
449 Multiple 'module' entries for the same module name MAY
450 exist. This can occur if multiple modules import the
451 same module but specify different revision dates in
452 the import statements.";
458 "Indicates the type of conformance the server is claiming
459 for the YANG module identified by this entry.";
465 "Each entry represents one submodule within the
478 * Legacy operational state data nodes
481 container modules-state {
485 "Contains YANG module monitoring information.";
491 "Contains a server-specific identifier representing
492 the current set of modules and submodules. The
493 server MUST change the value of this leaf if the
494 information represented by the 'module' list instances
503 * Legacy notifications
506 notification yang-library-change {
509 "Generated when the set of modules and submodules supported
510 by the server has changed.";
513 path "/yanglib:modules-state/yanglib:module-set-id";
518 "Contains the module-set-id value representing the
519 set of modules and submodules supported at the server
520 at the time the notification is generated.";