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>
30 <mailto:andy@yumaworks.com>
32 Author: Martin Bjorklund
33 <mailto:mbj@tail-f.com>
35 Author: Juergen Schoenwaelder
36 <mailto:j.schoenwaelder@jacobs-university.de>
39 <mailto:kent+ietf@watsen.net>
42 <mailto:rwilton@cisco.com>";
44 "This module provides information about the YANG modules,
45 datastores, and datastore schemas used by a network
47 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
48 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
49 'MAY', and 'OPTIONAL' in this document are to be interpreted as
50 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
51 they appear in all capitals, as shown here.
53 Copyright (c) 2019 IETF Trust and the persons identified as
54 authors of the code. All rights reserved.
56 Redistribution and use in source and binary forms, with or
57 without modification, is permitted pursuant to, and subject
58 to the license terms contained in, the Simplified BSD License
59 set forth in Section 4.c of the IETF Trust's Legal Provisions
60 Relating to IETF Documents
61 (https://trustee.ietf.org/license-info).
63 This version of this YANG module is part of RFC 8525; see
64 the RFC itself for full legal notices.";
68 "Added support for multiple datastores according to the
69 Network Management Datastore Architecture (NMDA).";
71 "RFC 8525: YANG Library";
77 "RFC 7895: YANG Module Library";
84 typedef revision-identifier {
86 pattern '\d{4}-\d{2}-\d{2}';
89 "Represents a specific date in YYYY-MM-DD format.";
95 grouping module-identification-leafs {
97 "Parameters for identifying YANG modules and submodules.";
99 type yang:yang-identifier;
102 "The YANG module or submodule name.";
105 type revision-identifier;
107 "The YANG module or submodule revision date. If no revision
108 statement is present in the YANG module or submodule, this
109 leaf is not instantiated.";
113 grouping location-leaf-list {
115 "Common leaf-list parameter for the locations of modules and
120 "Contains a URL that represents the YANG schema
121 resource for this module or submodule.
123 This leaf will only be present if there is a URL
124 available for retrieval of the schema for this entry.";
128 grouping module-implementation-parameters {
130 "Parameters for describing the implementation of a module.";
132 type yang:yang-identifier;
134 "List of all YANG feature names from this module that are
135 supported by the server, regardless whether they are defined
136 in the module or any included submodule.";
138 leaf-list deviation {
140 path "../../module/name";
144 "List of all YANG deviation modules used by this server to
145 modify the conformance of the module associated with this
146 entry. Note that the same module can be used for deviations
147 for multiple modules, so the same entry MAY appear within
148 multiple 'module' entries.
150 This reference MUST NOT (directly or indirectly)
151 refer to the module being deviated.
153 Robust clients may want to make sure that they handle a
154 situation where a module deviates itself (directly or
155 indirectly) gracefully.";
159 grouping module-set-parameters {
161 "A set of parameters that describe a module set.";
165 "An arbitrary name of the module set.";
170 "An entry in this list represents a module implemented by the
171 server, as per Section 5.6.5 of RFC 7950, with a particular
172 set of supported features and deviations.";
174 "RFC 7950: The YANG 1.1 Data Modeling Language";
175 uses module-identification-leafs;
180 "The XML namespace identifier for this module.";
182 uses location-leaf-list;
186 "Each entry represents one submodule within the
188 uses module-identification-leafs;
189 uses location-leaf-list;
191 uses module-implementation-parameters;
193 list import-only-module {
196 "An entry in this list indicates that the server imports
197 reusable definitions from the specified revision of the
198 module but does not implement any protocol-accessible
199 objects from this revision.
201 Multiple entries for the same module name MAY exist. This
202 can occur if multiple modules import the same module but
203 specify different revision dates in the import statements.";
205 type yang:yang-identifier;
207 "The YANG module name.";
211 type revision-identifier;
217 "The YANG module revision date.
218 A zero-length string is used if no revision statement
219 is present in the YANG module.";
225 "The XML namespace identifier for this module.";
227 uses location-leaf-list;
231 "Each entry represents one submodule within the
233 uses module-identification-leafs;
234 uses location-leaf-list;
239 grouping yang-library-parameters {
241 "The YANG library data structure is represented as a grouping
242 so it can be reused in configuration or another monitoring
247 "A set of modules that may be used by one or more schemas.
249 A module set does not have to be referentially complete,
250 i.e., it may define modules that contain import statements
251 for other modules not included in the module set.";
252 uses module-set-parameters;
257 "A datastore schema that may be used by one or more
260 The schema must be valid and referentially complete, i.e.,
261 it must contain modules to satisfy all used import
262 statements for all modules specified in the schema.";
266 "An arbitrary name of the schema.";
268 leaf-list module-set {
270 path "../../module-set/name";
273 "A set of module-sets that are included in this schema.
274 If a non-import-only module appears in multiple module
275 sets, then the module revision and the associated features
276 and deviations must be identical.";
282 "A datastore supported by this server.
284 Each datastore indicates which schema it supports.
286 The server MUST instantiate one entry in this list per
287 specific datastore it supports.
288 Each datastore entry with the same datastore schema SHOULD
289 reference the same schema.";
291 type ds:datastore-ref;
293 "The identity of the datastore.";
297 path "../../schema/name";
301 "A reference to the schema supported by this datastore.
302 All non-import-only modules of the schema are implemented
303 with their associated features and deviations.";
309 * Top-level container
312 container yang-library {
315 "Container holding the entire YANG library of this server.";
316 uses yang-library-parameters;
321 "A server-generated identifier of the contents of the
322 '/yang-library' tree. The server MUST change the value of
323 this leaf if the information represented by the
324 '/yang-library' tree, except '/yang-library/content-id', has
333 notification yang-library-update {
335 "Generated when any YANG library information on the
336 server has changed.";
339 path "/yanglib:yang-library/yanglib:content-id";
343 "Contains the YANG library content identifier for the updated
344 YANG library at the time the notification is generated.";
352 grouping module-list {
355 "The module data structure is represented as a grouping
356 so it can be reused in configuration or another monitoring
359 grouping common-leafs {
362 "Common parameters for YANG modules and submodules.";
364 type yang:yang-identifier;
367 "The YANG module or submodule name.";
371 type revision-identifier;
378 "The YANG module or submodule revision date.
379 A zero-length string is used if no revision statement
380 is present in the YANG module or submodule.";
384 grouping schema-leaf {
387 "Common schema leaf parameter for modules and submodules.";
391 "Contains a URL that represents the YANG schema
392 resource for this module or submodule.
394 This leaf will only be present if there is a URL
395 available for retrieval of the schema for this entry.";
402 "Each entry represents one revision of one module
403 currently supported by the server.";
415 "The XML namespace identifier for this module.";
418 type yang:yang-identifier;
421 "List of YANG feature names from this module that are
422 supported by the server, regardless of whether they are
423 defined in the module or any included submodule.";
430 "List of YANG deviation module names and revisions
431 used by this server to modify the conformance of
432 the module associated with this entry. Note that
433 the same module can be used for deviations for
434 multiple modules, so the same entry MAY appear
435 within multiple 'module' entries.
437 The deviation module MUST be present in the 'module'
438 list, with the same name and revision values.
439 The 'conformance-type' value will be 'implement' for
440 the deviation module.";
445 leaf conformance-type {
449 "Indicates that the server implements one or more
450 protocol-accessible objects defined in the YANG module
451 identified in this entry. This includes deviation
452 statements defined in the module.
454 For YANG version 1.1 modules, there is at most one
455 'module' entry with conformance type 'implement' for a
456 particular module name, since YANG 1.1 requires that
457 at most one revision of a module is implemented.
459 For YANG version 1 modules, there SHOULD NOT be more
460 than one 'module' entry for a particular module
465 "Indicates that the server imports reusable definitions
466 from the specified revision of the module but does
467 not implement any protocol-accessible objects from
470 Multiple 'module' entries for the same module name MAY
471 exist. This can occur if multiple modules import the
472 same module but specify different revision dates in
473 the import statements.";
479 "Indicates the type of conformance the server is claiming
480 for the YANG module identified by this entry.";
486 "Each entry represents one submodule within the
499 * Legacy operational state data nodes
502 container modules-state {
506 "Contains YANG module monitoring information.";
512 "Contains a server-specific identifier representing
513 the current set of modules and submodules. The
514 server MUST change the value of this leaf if the
515 information represented by the 'module' list instances
524 * Legacy notifications
527 notification yang-library-change {
530 "Generated when the set of modules and submodules supported
531 by the server has changed.";
534 path "/yanglib:modules-state/yanglib:module-set-id";
539 "Contains the module-set-id value representing the
540 set of modules and submodules supported at the server
541 at the time the notification is generated.";