Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / ietf-yang-library@2017-08-17.yang
1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2   <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">module ietf-yang-library {
3   yang-version 1.1;
4   namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
5   prefix yanglib;
6
7   import ietf-yang-types {
8     prefix yang;
9     reference
10       "RFC 6991: Common YANG Data Types.";
11   }
12
13   import ietf-inet-types {
14     prefix inet;
15     reference
16       "RFC 6991: Common YANG Data Types.";
17   }
18
19   import ietf-datastores {
20     prefix ds;
21     reference
22       "I-D.ietf-revised-datastores:
23        Network Management Datastore Architecture.";
24   }
25
26   organization
27     "IETF NETCONF (Network Configuration) Working Group";
28   contact
29     "WG Web:   &lt;http://tools.ietf.org/wg/netconf/&gt;
30      WG List:  &lt;mailto:netconf@ietf.org&gt;
31
32      Author:   Andy Bierman
33                &lt;mailto:andy@yumaworks.com&gt;
34
35      Author:   Martin Bjorklund
36                &lt;mailto:mbj@tail-f.com&gt;
37
38      Author:   Kent Watsen
39                &lt;mailto:kwatsen@juniper.net&gt;";
40   description
41     "This module contains information about the YANG server
42      instance, including the modules and datastores the
43      server supports, and which modules are present in
44      which datastores.
45
46      Copyright (c) 2017 IETF Trust and the persons identified as
47      authors of the code.  All rights reserved.
48
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      (http://trustee.ietf.org/license-info).
55
56      This version of this YANG module is part of RFC XXXX; see
57      the RFC itself for full legal notices.";
58
59   revision 2017-08-17 {
60     description
61       "Updated revision.";
62     reference
63       "RFC XXXX: YANG Library.";
64   }
65   revision 2016-04-09 {
66     description
67       "Initial revision.";
68     reference
69       "RFC 7895: YANG Module Library.";
70   }
71
72   typedef revision-identifier {
73     type string {
74       pattern "\\d{4}-\\d{2}-\\d{2}";
75     }
76     description
77       "Represents a specific date in YYYY-MM-DD format.";
78   }
79
80   grouping module-identification-leafs {
81     description
82       "Parameters for identifying YANG modules and submodules.";
83     leaf name {
84       type yang:yang-identifier;
85       mandatory true;
86       description
87         "The YANG module or submodule name.";
88     }
89
90     leaf revision {
91       type union {
92         type revision-identifier;
93         type string {
94           length "0";
95         }
96       }
97       mandatory true;
98       description
99         "The YANG module or submodule revision date.
100          A zero-length string is used if no revision statement
101          is present in the YANG module or submodule.";
102     }
103   }
104
105   grouping schema-leaf {
106     description
107       "Common schema leaf parameter for modules and submodules.";
108     leaf schema {
109       type inet:uri;
110       description
111         "Contains a URL that represents the YANG schema
112          resource for this module or submodule.
113          This leaf will only be present if there is a URL
114          available for retrieval of the schema for this entry.";
115     }
116   }
117
118   grouping implementation-parameters {
119     description
120       "Parameters for describing the implementation of a module.";
121     leaf-list feature {
122       type yang:yang-identifier;
123       description
124         "List of YANG feature names from this module that are
125          supported by the server, regardless whether they are defined
126          in the module or any included submodule.";
127     }
128
129     list deviation {
130       key "name revision";
131       description
132         "List of YANG deviation module names and revisions used by
133          this server to modify the conformance of the module
134          associated with this entry.  Note that the same module can
135          be used for deviations for multiple modules, so the same
136          entry MAY appear within multiple 'module' entries.
137
138          The deviation module MUST be present in the 'module' list,
139          with the same name and revision values.  The
140          'conformance-type' value will be 'implement' for the
141          deviation module.";
142       uses module-identification-leafs;
143     }
144
145     leaf conformance-type {
146       type enumeration {
147         enum "implement" {
148           description
149             "Indicates that the server implements one or more
150              protocol-accessible objects defined in the YANG module
151              identified in this entry.  This includes deviation
152              statements defined in the module.
153
154              For YANG version 1.1 modules, there is at most one
155              module entry with conformance type 'implement' for a
156              particular module name, since YANG 1.1 requires that at
157              most one revision of a module is implemented.
158
159              For YANG version 1 modules, there SHOULD NOT be more
160              than one module entry for a particular module name.";
161         }
162         enum "import" {
163           description
164             "Indicates that the server imports reusable definitions
165              from the specified revision of the module, but does not
166              implement any protocol accessible objects from this
167              revision.
168
169              Multiple module entries for the same module name MAY
170              exist. This can occur if multiple modules import the
171              same module, but specify different revision-dates in the
172              import statements.";
173         }
174       }
175       mandatory true;
176       description
177         "Indicates the type of conformance the server is claiming
178          for the YANG module identified by this entry.";
179     }
180   }
181
182   grouping yang-library-parameters {
183     description
184       "The YANG library data structure is represented as a grouping
185        so it can be reused in configuration or another monitoring
186        data structure.";
187     container modules {
188       description
189         "A container holding a list of modules.  Note, modules being
190          listed here does not mean that they are supported by any
191          particular datastore.";
192       list module {
193         key "id";
194         description
195           "Each entry represents one revision of one module
196            currently supported by the server.";
197         leaf id {
198           type string;
199           description
200             "A stable identifier, independent of any other part
201              of this module instance.";
202         }
203
204         uses module-identification-leafs;
205
206         uses schema-leaf;
207
208         leaf namespace {
209           type inet:uri;
210           mandatory true;
211           description
212             "The XML namespace identifier for this module.";
213         }
214
215         uses implementation-parameters;
216
217         list submodule {
218           key "name revision";
219           description
220             "Each entry represents one submodule within the
221              parent module.";
222           uses module-identification-leafs;
223
224           uses schema-leaf;
225         }
226       }
227     }
228
229     container module-sets {
230       description
231         "A container for a list of module-sets.  Module-sets being
232          listed here does not mean that they are used by any
233          particular datastore.";
234       list module-set {
235         key "id";
236         description
237           "An arbitrary module-set definition provided by the
238            server.";
239         leaf id {
240           type string;
241           description
242             "A system-generated value that uniquely represents the
243              referenced set of modules.  Any change to the number
244              of modules referenced, or to the modules themselves,
245              generates a different value.";
246         }
247
248         leaf-list module {
249           type leafref {
250             path "../../../modules/module/id";
251           }
252           description
253             "A module-instance supported by the server, including its
254              features and deviations.";
255         }
256       }
257     }
258
259     container datastores {
260       description
261         "A container for a list of datastores supported by the
262          server.  Each datastore indicates which module-sets it
263          supports.";
264       list datastore {
265         key "name";
266         description
267           "A datastore supported by this server.";
268         leaf name {
269           type identityref {
270             base ds:datastore;
271           }
272           description
273             "The identity of the datastore.";
274         }
275
276         leaf module-set {
277           type leafref {
278             path "../../../module-sets/module-set/id";
279           }
280           description
281             "A reference to a module-set supported by this
282              datastore";
283         }
284       }
285     }
286   }
287
288   grouping module-list {
289     status deprecated;
290     description
291       "The module data structure is represented as a grouping
292        so it can be reused in configuration or another monitoring
293        data structure.";
294     grouping common-leafs {
295       status deprecated;
296       description
297         "Common parameters for YANG modules and submodules.";
298       leaf name {
299         type yang:yang-identifier;
300         status deprecated;
301         description
302           "The YANG module or submodule name.";
303       }
304
305       leaf revision {
306         type union {
307           type revision-identifier;
308           type string {
309             length "0";
310           }
311         }
312         status deprecated;
313         description
314           "The YANG module or submodule revision date.
315            A zero-length string is used if no revision statement
316            is present in the YANG module or submodule.";
317       }
318     }
319
320     list module {
321       key "name revision";
322       status deprecated;
323       description
324         "Each entry represents one revision of one module
325          currently supported by the server.";
326       uses common-leafs {
327         status deprecated;
328       }
329
330       uses schema-leaf {
331         status deprecated;
332       }
333
334       leaf namespace {
335         type inet:uri;
336         mandatory true;
337         status deprecated;
338         description
339           "The XML namespace identifier for this module.";
340       }
341
342       leaf-list feature {
343         type yang:yang-identifier;
344         status deprecated;
345         description
346           "List of YANG feature names from this module that are
347            supported by the server, regardless whether they are
348            defined in the module or any included submodule.";
349       }
350
351       list deviation {
352         key "name revision";
353         status deprecated;
354         description
355           "List of YANG deviation module names and revisions
356            used by this server to modify the conformance of
357            the module associated with this entry.  Note that
358            the same module can be used for deviations for
359            multiple modules, so the same entry MAY appear
360            within multiple 'module' entries.
361
362            The deviation module MUST be present in the 'module'
363            list, with the same name and revision values.
364            The 'conformance-type' value will be 'implement' for
365            the deviation module.";
366         uses common-leafs {
367           status deprecated;
368         }
369       }
370
371       leaf conformance-type {
372         type enumeration {
373           enum "implement" {
374             description
375               "Indicates that the server implements one or more
376                protocol-accessible objects defined in the YANG module
377                identified in this entry.  This includes deviation
378                statements defined in the module.
379
380                For YANG version 1.1 modules, there is at most one
381                module entry with conformance type 'implement' for a
382                particular module name, since YANG 1.1 requires that
383                at most one revision of a module is implemented.
384
385                For YANG version 1 modules, there SHOULD NOT be more
386                than one module entry for a particular module name.";
387           }
388           enum "import" {
389             description
390               "Indicates that the server imports reusable definitions
391                from the specified revision of the module, but does
392                not implement any protocol accessible objects from
393                this revision.
394
395                Multiple module entries for the same module name MAY
396                exist. This can occur if multiple modules import the
397                same module, but specify different revision-dates in
398                the import statements.";
399           }
400         }
401         mandatory true;
402         status deprecated;
403         description
404           "Indicates the type of conformance the server is claiming
405            for the YANG module identified by this entry.";
406       }
407
408       list submodule {
409         key "name revision";
410         status deprecated;
411         description
412           "Each entry represents one submodule within the
413            parent module.";
414         uses common-leafs {
415           status deprecated;
416         }
417
418         uses schema-leaf {
419           status deprecated;
420         }
421       }
422     }
423   }
424
425   container yang-library {
426     config false;
427     description
428       "Container providing all the YANG meta information the
429        server possesses.";
430     uses yang-library-parameters;
431
432     leaf checksum {
433       type string;
434       config false;
435       mandatory true;
436       description
437         "A server-generated checksum of the contents of the
438          'yang-library' tree.  The server MUST change the value of
439          this leaf if the information represented by the
440          'yang-library' tree, except yang-library/checksum, has
441          changed.";
442     }
443   }
444
445   container modules-state {
446     config false;
447     status deprecated;
448     description
449       "Contains YANG module monitoring information.";
450     leaf module-set-id {
451       type string;
452       mandatory true;
453       status deprecated;
454       description
455         "Contains a server-specific identifier representing
456          the current set of modules and submodules.  The
457          server MUST change the value of this leaf if the
458          information represented by the 'module' list instances
459          has changed.";
460     }
461
462     uses module-list {
463       status deprecated;
464     }
465   }
466
467   notification yang-library-update {
468     description
469       "Generated when any YANG library information on the
470        server has changed.";
471   }
472
473   notification yang-library-change {
474     status deprecated;
475     description
476       "Generated when the set of modules and submodules supported
477        by the server has changed.";
478     leaf module-set-id {
479       type leafref {
480         path "/yanglib:modules-state/yanglib:module-set-id";
481       }
482       mandatory true;
483       status deprecated;
484       description
485         "Contains the module-set-id value representing the
486          set of modules and submodules supported at the server
487          at the time the notification is generated.";
488     }
489   }
490 }
491 </data>
492 </rpc-reply>