Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 1 | module ietf-yang-library { |
| 2 | yang-version 1.1; |
| 3 | namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 4 | prefix yanglib; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 5 | |
| 6 | import ietf-yang-types { |
| 7 | prefix yang; |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 8 | reference |
| 9 | "RFC 6991: Common YANG Data Types"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 10 | } |
| 11 | import ietf-inet-types { |
| 12 | prefix inet; |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 13 | reference |
| 14 | "RFC 6991: Common YANG Data Types"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 15 | } |
| 16 | import ietf-datastores { |
| 17 | prefix ds; |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 18 | reference |
| 19 | "RFC 8342: Network Management Datastore Architecture |
| 20 | (NMDA)"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | organization |
| 24 | "IETF NETCONF (Network Configuration) Working Group"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 25 | contact |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 26 | "WG Web: <https://datatracker.ietf.org/wg/netconf/> |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 27 | WG List: <mailto:netconf@ietf.org> |
| 28 | |
| 29 | Author: Andy Bierman |
| 30 | <mailto:andy@yumaworks.com> |
| 31 | |
| 32 | Author: Martin Bjorklund |
| 33 | <mailto:mbj@tail-f.com> |
| 34 | |
| 35 | Author: Juergen Schoenwaelder |
| 36 | <mailto:j.schoenwaelder@jacobs-university.de> |
| 37 | |
| 38 | Author: Kent Watsen |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 39 | <mailto:kent+ietf@watsen.net> |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 40 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 41 | Author: Robert Wilton |
| 42 | <mailto:rwilton@cisco.com>"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 43 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 44 | "This module provides information about the YANG modules, |
| 45 | datastores, and datastore schemas used by a network |
| 46 | management server. |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 47 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 48 | The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL |
| 49 | NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', |
| 50 | 'MAY', and 'OPTIONAL' in this document are to be interpreted as |
| 51 | described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, |
| 52 | they appear in all capitals, as shown here. |
| 53 | |
| 54 | Copyright (c) 2019 IETF Trust and the persons identified as |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 55 | authors of the code. All rights reserved. |
| 56 | |
| 57 | Redistribution and use in source and binary forms, with or |
| 58 | without modification, is permitted pursuant to, and subject |
| 59 | to the license terms contained in, the Simplified BSD License |
| 60 | set forth in Section 4.c of the IETF Trust's Legal Provisions |
| 61 | Relating to IETF Documents |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 62 | (https://trustee.ietf.org/license-info). |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 63 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 64 | This version of this YANG module is part of RFC 8525; see |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 65 | the RFC itself for full legal notices."; |
| 66 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 67 | revision 2019-01-04 { |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 68 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 69 | "Added support for multiple datastores according to the |
| 70 | Network Management Datastore Architecture (NMDA)."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 71 | reference |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 72 | "RFC 8525: YANG Library"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 73 | } |
| 74 | revision 2016-04-09 { |
| 75 | description |
| 76 | "Initial revision."; |
| 77 | reference |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 78 | "RFC 7895: YANG Module Library"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | /* |
| 82 | * Typedefs |
| 83 | */ |
| 84 | |
| 85 | typedef revision-identifier { |
| 86 | type string { |
| 87 | pattern '\d{4}-\d{2}-\d{2}'; |
| 88 | } |
| 89 | description |
| 90 | "Represents a specific date in YYYY-MM-DD format."; |
| 91 | } |
| 92 | |
| 93 | /* |
| 94 | * Groupings |
| 95 | */ |
| 96 | |
| 97 | grouping module-identification-leafs { |
| 98 | description |
| 99 | "Parameters for identifying YANG modules and submodules."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 100 | leaf name { |
| 101 | type yang:yang-identifier; |
| 102 | mandatory true; |
| 103 | description |
| 104 | "The YANG module or submodule name."; |
| 105 | } |
| 106 | leaf revision { |
| 107 | type revision-identifier; |
| 108 | description |
| 109 | "The YANG module or submodule revision date. If no revision |
| 110 | statement is present in the YANG module or submodule, this |
| 111 | leaf is not instantiated."; |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | grouping location-leaf-list { |
| 116 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 117 | "Common leaf-list parameter for the locations of modules and |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 118 | submodules."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 119 | leaf-list location { |
| 120 | type inet:uri; |
| 121 | description |
| 122 | "Contains a URL that represents the YANG schema |
| 123 | resource for this module or submodule. |
| 124 | |
| 125 | This leaf will only be present if there is a URL |
| 126 | available for retrieval of the schema for this entry."; |
| 127 | } |
| 128 | } |
| 129 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 130 | grouping module-implementation-parameters { |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 131 | description |
| 132 | "Parameters for describing the implementation of a module."; |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 133 | leaf-list feature { |
| 134 | type yang:yang-identifier; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 135 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 136 | "List of all YANG feature names from this module that are |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 137 | supported by the server, regardless whether they are defined |
| 138 | in the module or any included submodule."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 139 | } |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 140 | leaf-list deviation { |
| 141 | type leafref { |
| 142 | path "../../module/name"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 143 | } |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 144 | description |
| 145 | "List of all YANG deviation modules used by this server to |
| 146 | modify the conformance of the module associated with this |
| 147 | entry. Note that the same module can be used for deviations |
| 148 | for multiple modules, so the same entry MAY appear within |
| 149 | multiple 'module' entries. |
| 150 | |
| 151 | This reference MUST NOT (directly or indirectly) |
| 152 | refer to the module being deviated. |
| 153 | |
| 154 | Robust clients may want to make sure that they handle a |
| 155 | situation where a module deviates itself (directly or |
| 156 | indirectly) gracefully."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 157 | } |
| 158 | } |
| 159 | |
| 160 | grouping module-set-parameters { |
| 161 | description |
| 162 | "A set of parameters that describe a module set."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 163 | leaf name { |
| 164 | type string; |
| 165 | description |
| 166 | "An arbitrary name of the module set."; |
| 167 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 168 | list module { |
| 169 | key "name"; |
| 170 | description |
| 171 | "An entry in this list represents a module implemented by the |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 172 | server, as per Section 5.6.5 of RFC 7950, with a particular |
| 173 | set of supported features and deviations."; |
| 174 | reference |
| 175 | "RFC 7950: The YANG 1.1 Data Modeling Language"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 176 | uses module-identification-leafs; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 177 | leaf namespace { |
| 178 | type inet:uri; |
| 179 | mandatory true; |
| 180 | description |
| 181 | "The XML namespace identifier for this module."; |
| 182 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 183 | uses location-leaf-list; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 184 | list submodule { |
| 185 | key "name"; |
| 186 | description |
| 187 | "Each entry represents one submodule within the |
| 188 | parent module."; |
| 189 | uses module-identification-leafs; |
| 190 | uses location-leaf-list; |
| 191 | } |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 192 | uses module-implementation-parameters; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 193 | } |
| 194 | list import-only-module { |
| 195 | key "name revision"; |
| 196 | description |
| 197 | "An entry in this list indicates that the server imports |
| 198 | reusable definitions from the specified revision of the |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 199 | module but does not implement any protocol-accessible |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 200 | objects from this revision. |
| 201 | |
| 202 | Multiple entries for the same module name MAY exist. This |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 203 | can occur if multiple modules import the same module but |
| 204 | specify different revision dates in the import statements."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 205 | leaf name { |
| 206 | type yang:yang-identifier; |
| 207 | description |
| 208 | "The YANG module name."; |
| 209 | } |
| 210 | leaf revision { |
| 211 | type union { |
| 212 | type revision-identifier; |
| 213 | type string { |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 214 | length "0"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 215 | } |
| 216 | } |
| 217 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 218 | "The YANG module revision date. |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 219 | A zero-length string is used if no revision statement |
| 220 | is present in the YANG module."; |
| 221 | } |
| 222 | leaf namespace { |
| 223 | type inet:uri; |
| 224 | mandatory true; |
| 225 | description |
| 226 | "The XML namespace identifier for this module."; |
| 227 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 228 | uses location-leaf-list; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 229 | list submodule { |
| 230 | key "name"; |
| 231 | description |
| 232 | "Each entry represents one submodule within the |
| 233 | parent module."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 234 | uses module-identification-leafs; |
| 235 | uses location-leaf-list; |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | grouping yang-library-parameters { |
| 241 | description |
| 242 | "The YANG library data structure is represented as a grouping |
| 243 | so it can be reused in configuration or another monitoring |
| 244 | data structure."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 245 | list module-set { |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 246 | key "name"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 247 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 248 | "A set of modules that may be used by one or more schemas. |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 249 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 250 | A module set does not have to be referentially complete, |
| 251 | i.e., it may define modules that contain import statements |
| 252 | for other modules not included in the module set."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 253 | uses module-set-parameters; |
| 254 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 255 | list schema { |
| 256 | key "name"; |
| 257 | description |
| 258 | "A datastore schema that may be used by one or more |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 259 | datastores. |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 260 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 261 | The schema must be valid and referentially complete, i.e., |
| 262 | it must contain modules to satisfy all used import |
| 263 | statements for all modules specified in the schema."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 264 | leaf name { |
| 265 | type string; |
| 266 | description |
| 267 | "An arbitrary name of the schema."; |
| 268 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 269 | leaf-list module-set { |
| 270 | type leafref { |
| 271 | path "../../module-set/name"; |
| 272 | } |
| 273 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 274 | "A set of module-sets that are included in this schema. |
| 275 | If a non-import-only module appears in multiple module |
| 276 | sets, then the module revision and the associated features |
| 277 | and deviations must be identical."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 278 | } |
| 279 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 280 | list datastore { |
| 281 | key "name"; |
| 282 | description |
| 283 | "A datastore supported by this server. |
| 284 | |
| 285 | Each datastore indicates which schema it supports. |
| 286 | |
| 287 | The server MUST instantiate one entry in this list per |
| 288 | specific datastore it supports. |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 289 | Each datastore entry with the same datastore schema SHOULD |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 290 | reference the same schema."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 291 | leaf name { |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 292 | type ds:datastore-ref; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 293 | description |
| 294 | "The identity of the datastore."; |
| 295 | } |
| 296 | leaf schema { |
| 297 | type leafref { |
| 298 | path "../../schema/name"; |
| 299 | } |
| 300 | mandatory true; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 301 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 302 | "A reference to the schema supported by this datastore. |
| 303 | All non-import-only modules of the schema are implemented |
| 304 | with their associated features and deviations."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 305 | } |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | /* |
| 310 | * Top-level container |
| 311 | */ |
| 312 | |
| 313 | container yang-library { |
| 314 | config false; |
| 315 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 316 | "Container holding the entire YANG library of this server."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 317 | uses yang-library-parameters; |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 318 | leaf content-id { |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 319 | type string; |
| 320 | mandatory true; |
| 321 | description |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 322 | "A server-generated identifier of the contents of the |
| 323 | '/yang-library' tree. The server MUST change the value of |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 324 | this leaf if the information represented by the |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 325 | '/yang-library' tree, except '/yang-library/content-id', has |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 326 | changed."; |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | /* |
| 331 | * Notifications |
| 332 | */ |
| 333 | |
| 334 | notification yang-library-update { |
| 335 | description |
| 336 | "Generated when any YANG library information on the |
| 337 | server has changed."; |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 338 | leaf content-id { |
| 339 | type leafref { |
| 340 | path "/yanglib:yang-library/yanglib:content-id"; |
| 341 | } |
| 342 | mandatory true; |
| 343 | description |
| 344 | "Contains the YANG library content identifier for the updated |
| 345 | YANG library at the time the notification is generated."; |
| 346 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 347 | } |
| 348 | |
| 349 | /* |
| 350 | * Legacy groupings |
| 351 | */ |
| 352 | |
| 353 | grouping module-list { |
| 354 | status deprecated; |
| 355 | description |
| 356 | "The module data structure is represented as a grouping |
| 357 | so it can be reused in configuration or another monitoring |
| 358 | data structure."; |
| 359 | |
| 360 | grouping common-leafs { |
| 361 | status deprecated; |
| 362 | description |
| 363 | "Common parameters for YANG modules and submodules."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 364 | leaf name { |
| 365 | type yang:yang-identifier; |
| 366 | status deprecated; |
| 367 | description |
| 368 | "The YANG module or submodule name."; |
| 369 | } |
| 370 | leaf revision { |
| 371 | type union { |
| 372 | type revision-identifier; |
| 373 | type string { |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 374 | length "0"; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 375 | } |
| 376 | } |
| 377 | status deprecated; |
| 378 | description |
| 379 | "The YANG module or submodule revision date. |
| 380 | A zero-length string is used if no revision statement |
| 381 | is present in the YANG module or submodule."; |
| 382 | } |
| 383 | } |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 384 | |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 385 | grouping schema-leaf { |
| 386 | status deprecated; |
| 387 | description |
| 388 | "Common schema leaf parameter for modules and submodules."; |
| 389 | leaf schema { |
| 390 | type inet:uri; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 391 | description |
| 392 | "Contains a URL that represents the YANG schema |
| 393 | resource for this module or submodule. |
| 394 | |
| 395 | This leaf will only be present if there is a URL |
| 396 | available for retrieval of the schema for this entry."; |
| 397 | } |
| 398 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 399 | list module { |
| 400 | key "name revision"; |
| 401 | status deprecated; |
| 402 | description |
| 403 | "Each entry represents one revision of one module |
| 404 | currently supported by the server."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 405 | uses common-leafs { |
| 406 | status deprecated; |
| 407 | } |
| 408 | uses schema-leaf { |
| 409 | status deprecated; |
| 410 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 411 | leaf namespace { |
| 412 | type inet:uri; |
| 413 | mandatory true; |
| 414 | status deprecated; |
| 415 | description |
| 416 | "The XML namespace identifier for this module."; |
| 417 | } |
| 418 | leaf-list feature { |
| 419 | type yang:yang-identifier; |
| 420 | status deprecated; |
| 421 | description |
| 422 | "List of YANG feature names from this module that are |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 423 | supported by the server, regardless of whether they are |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 424 | defined in the module or any included submodule."; |
| 425 | } |
| 426 | list deviation { |
| 427 | key "name revision"; |
| 428 | status deprecated; |
| 429 | description |
| 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. |
| 436 | |
| 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."; |
| 441 | uses common-leafs { |
| 442 | status deprecated; |
| 443 | } |
| 444 | } |
| 445 | leaf conformance-type { |
| 446 | type enumeration { |
| 447 | enum implement { |
| 448 | description |
| 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. |
| 453 | |
| 454 | For YANG version 1.1 modules, there is at most one |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 455 | 'module' entry with conformance type 'implement' for a |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 456 | particular module name, since YANG 1.1 requires that |
| 457 | at most one revision of a module is implemented. |
| 458 | |
| 459 | For YANG version 1 modules, there SHOULD NOT be more |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 460 | than one 'module' entry for a particular module |
| 461 | name."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 462 | } |
| 463 | enum import { |
| 464 | description |
| 465 | "Indicates that the server imports reusable definitions |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 466 | from the specified revision of the module but does |
| 467 | not implement any protocol-accessible objects from |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 468 | this revision. |
| 469 | |
Michal Vasko | cf296c8 | 2020-05-27 11:16:45 +0200 | [diff] [blame] | 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 |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 473 | the import statements."; |
| 474 | } |
| 475 | } |
| 476 | mandatory true; |
| 477 | status deprecated; |
| 478 | description |
| 479 | "Indicates the type of conformance the server is claiming |
| 480 | for the YANG module identified by this entry."; |
| 481 | } |
| 482 | list submodule { |
| 483 | key "name revision"; |
| 484 | status deprecated; |
| 485 | description |
| 486 | "Each entry represents one submodule within the |
| 487 | parent module."; |
| 488 | uses common-leafs { |
| 489 | status deprecated; |
| 490 | } |
| 491 | uses schema-leaf { |
| 492 | status deprecated; |
| 493 | } |
| 494 | } |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | /* |
| 499 | * Legacy operational state data nodes |
| 500 | */ |
| 501 | |
| 502 | container modules-state { |
| 503 | config false; |
| 504 | status deprecated; |
| 505 | description |
| 506 | "Contains YANG module monitoring information."; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 507 | leaf module-set-id { |
| 508 | type string; |
| 509 | mandatory true; |
| 510 | status deprecated; |
| 511 | description |
| 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 |
| 516 | has changed."; |
| 517 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 518 | uses module-list { |
| 519 | status deprecated; |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | /* |
| 524 | * Legacy notifications |
| 525 | */ |
| 526 | |
| 527 | notification yang-library-change { |
| 528 | status deprecated; |
| 529 | description |
| 530 | "Generated when the set of modules and submodules supported |
| 531 | by the server has changed."; |
| 532 | leaf module-set-id { |
| 533 | type leafref { |
| 534 | path "/yanglib:modules-state/yanglib:module-set-id"; |
| 535 | } |
| 536 | mandatory true; |
| 537 | status deprecated; |
| 538 | description |
| 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."; |
| 542 | } |
| 543 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 544 | } |