Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-impl / src / test / resources / semantic-statement-parser / yin / modules / ietf-netconf-monitoring.yin
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <module name="ietf-netconf-monitoring"\r
3         xmlns="urn:ietf:params:xml:ns:yang:yin:1"\r
4         xmlns:ncm="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"\r
5         xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"\r
6         xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types">\r
7   <yang-version value="1"/>\r
8   <namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"/>\r
9   <prefix value="ncm"/>\r
10   <import module="ietf-yang-types">\r
11     <prefix value="yang"/>\r
12   </import>\r
13   <import module="ietf-inet-types">\r
14     <prefix value="inet"/>\r
15   </import>\r
16   <organization>\r
17     <text>IETF NETCONF (Network Configuration) Working Group</text>\r
18   </organization>\r
19   <contact>\r
20     <text>WG Web:   &lt;http://tools.ietf.org/wg/netconf/&gt;\r
21 WG List:  &lt;mailto:netconf@ietf.org&gt;\r
22 \r
23 WG Chair: Mehmet Ersue\r
24         &lt;mailto:mehmet.ersue@nsn.com&gt;\r
25 \r
26 WG Chair: Bert Wijnen\r
27         &lt;mailto:bertietf@bwijnen.net&gt;\r
28 \r
29 Editor:   Mark Scott\r
30         &lt;mailto:mark.scott@ericsson.com&gt;\r
31 \r
32 Editor:   Martin Bjorklund\r
33         &lt;mailto:mbj@tail-f.com&gt;</text>\r
34   </contact>\r
35   <description>\r
36     <text>NETCONF Monitoring Module.\r
37 All elements in this module are read-only.\r
38 \r
39 Copyright (c) 2010 IETF Trust and the persons identified as\r
40 authors of the code. All rights reserved.\r
41 \r
42 Redistribution and use in source and binary forms, with or\r
43 without modification, is permitted pursuant to, and subject\r
44 to the license terms contained in, the Simplified BSD\r
45 License set forth in Section 4.c of the IETF Trust's\r
46 Legal Provisions Relating to IETF Documents\r
47 (http://trustee.ietf.org/license-info).\r
48 \r
49 This version of this YANG module is part of RFC 6022; see\r
50 the RFC itself for full legal notices.</text>\r
51   </description>\r
52   <revision date="2010-10-04">\r
53     <description>\r
54       <text>Initial revision.</text>\r
55     </description>\r
56     <reference>\r
57       <text>RFC 6022: YANG Module for NETCONF Monitoring</text>\r
58     </reference>\r
59   </revision>\r
60   <typedef name="netconf-datastore-type">\r
61     <type name="enumeration">\r
62       <enum name="running">\r
63         <value value="0"/>\r
64       </enum>\r
65       <enum name="candidate">\r
66         <value value="1"/>\r
67       </enum>\r
68       <enum name="startup">\r
69         <value value="2"/>\r
70       </enum>\r
71     </type>\r
72     <description>\r
73       <text>Enumeration of possible NETCONF datastore types.</text>\r
74     </description>\r
75     <reference>\r
76       <text>RFC 4741: NETCONF Configuration Protocol</text>\r
77     </reference>\r
78   </typedef>\r
79   <identity name="transport">\r
80     <description>\r
81       <text>Base identity for NETCONF transport types.</text>\r
82     </description>\r
83   </identity>\r
84   <identity name="netconf-ssh">\r
85     <base name="transport"/>\r
86     <description>\r
87       <text>NETCONF over Secure Shell (SSH).</text>\r
88     </description>\r
89     <reference>\r
90       <text>RFC 4742: Using the NETCONF Configuration Protocol\r
91   over Secure SHell (SSH)</text>\r
92     </reference>\r
93   </identity>\r
94   <identity name="netconf-soap-over-beep">\r
95     <base name="transport"/>\r
96     <description>\r
97       <text>NETCONF over Simple Object Access Protocol (SOAP) over\r
98 Blocks Extensible Exchange Protocol (BEEP).</text>\r
99     </description>\r
100     <reference>\r
101       <text>RFC 4743: Using NETCONF over the Simple Object\r
102   Access Protocol (SOAP)</text>\r
103     </reference>\r
104   </identity>\r
105   <identity name="netconf-soap-over-https">\r
106     <base name="transport"/>\r
107     <description>\r
108       <text>NETCONF over Simple Object Access Protocol (SOAP)\r
109 over Hypertext Transfer Protocol Secure (HTTPS).</text>\r
110     </description>\r
111     <reference>\r
112       <text>RFC 4743: Using NETCONF over the Simple Object\r
113   Access Protocol (SOAP)</text>\r
114     </reference>\r
115   </identity>\r
116   <identity name="netconf-beep">\r
117     <base name="transport"/>\r
118     <description>\r
119       <text>NETCONF over Blocks Extensible Exchange Protocol (BEEP).</text>\r
120     </description>\r
121     <reference>\r
122       <text>RFC 4744: Using the NETCONF Protocol over the\r
123   Blocks Extensible Exchange Protocol (BEEP)</text>\r
124     </reference>\r
125   </identity>\r
126   <identity name="netconf-tls">\r
127     <base name="transport"/>\r
128     <description>\r
129       <text>NETCONF over Transport Layer Security (TLS).</text>\r
130     </description>\r
131     <reference>\r
132       <text>RFC 5539: NETCONF over Transport Layer Security (TLS)</text>\r
133     </reference>\r
134   </identity>\r
135   <identity name="schema-format">\r
136     <description>\r
137       <text>Base identity for data model schema languages.</text>\r
138     </description>\r
139   </identity>\r
140   <identity name="xsd">\r
141     <base name="schema-format"/>\r
142     <description>\r
143       <text>W3C XML Schema Definition.</text>\r
144     </description>\r
145     <reference>\r
146       <text>W3C REC REC-xmlschema-1-20041028:\r
147  XML Schema Part 1: Structures</text>\r
148     </reference>\r
149   </identity>\r
150   <identity name="yang">\r
151     <base name="schema-format"/>\r
152     <description>\r
153       <text>The YANG data modeling language for NETCONF.</text>\r
154     </description>\r
155     <reference>\r
156       <text>RFC 6020:  YANG - A Data Modeling Language for the\r
157    Network Configuration Protocol (NETCONF)</text>\r
158     </reference>\r
159   </identity>\r
160   <identity name="yin">\r
161     <base name="schema-format"/>\r
162     <description>\r
163       <text>The YIN syntax for YANG.</text>\r
164     </description>\r
165     <reference>\r
166       <text>RFC 6020:  YANG - A Data Modeling Language for the\r
167    Network Configuration Protocol (NETCONF)</text>\r
168     </reference>\r
169   </identity>\r
170   <identity name="rng">\r
171     <base name="schema-format"/>\r
172     <description>\r
173       <text>Regular Language for XML Next Generation (RELAX NG).</text>\r
174     </description>\r
175     <reference>\r
176       <text>ISO/IEC 19757-2:2008: RELAX NG</text>\r
177     </reference>\r
178   </identity>\r
179   <identity name="rnc">\r
180     <base name="schema-format"/>\r
181     <description>\r
182       <text>Relax NG Compact Syntax</text>\r
183     </description>\r
184     <reference>\r
185       <text>ISO/IEC 19757-2:2008: RELAX NG</text>\r
186     </reference>\r
187   </identity>\r
188   <grouping name="common-counters">\r
189     <description>\r
190       <text>Counters that exist both per session, and also globally,\r
191 accumulated from all sessions.</text>\r
192     </description>\r
193     <leaf name="in-rpcs">\r
194       <type name="yang:zero-based-counter32"/>\r
195       <description>\r
196         <text>Number of correct &lt;rpc&gt; messages received.</text>\r
197       </description>\r
198     </leaf>\r
199     <leaf name="in-bad-rpcs">\r
200       <type name="yang:zero-based-counter32"/>\r
201       <description>\r
202         <text>Number of messages received when an &lt;rpc&gt; message was expected,\r
203 that were not correct &lt;rpc&gt; messages.  This includes XML parse\r
204 errors and errors on the rpc layer.</text>\r
205       </description>\r
206     </leaf>\r
207     <leaf name="out-rpc-errors">\r
208       <type name="yang:zero-based-counter32"/>\r
209       <description>\r
210         <text>Number of &lt;rpc-reply&gt; messages sent that contained an\r
211 &lt;rpc-error&gt; element.</text>\r
212       </description>\r
213     </leaf>\r
214     <leaf name="out-notifications">\r
215       <type name="yang:zero-based-counter32"/>\r
216       <description>\r
217         <text>Number of &lt;notification&gt; messages sent.</text>\r
218       </description>\r
219     </leaf>\r
220   </grouping>\r
221   <container name="netconf-state">\r
222     <config value="false"/>\r
223     <description>\r
224       <text>The netconf-state container is the root of the monitoring\r
225 data model.</text>\r
226     </description>\r
227     <container name="capabilities">\r
228       <description>\r
229         <text>Contains the list of NETCONF capabilities supported by the\r
230 server.</text>\r
231       </description>\r
232       <leaf-list name="capability">\r
233         <type name="inet:uri"/>\r
234         <description>\r
235           <text>List of NETCONF capabilities supported by the server.</text>\r
236         </description>\r
237       </leaf-list>\r
238     </container>\r
239     <container name="datastores">\r
240       <description>\r
241         <text>Contains the list of NETCONF configuration datastores.</text>\r
242       </description>\r
243       <list name="datastore">\r
244         <key value="name"/>\r
245         <description>\r
246           <text>List of NETCONF configuration datastores supported by\r
247 the NETCONF server and related information.</text>\r
248         </description>\r
249         <leaf name="name">\r
250           <type name="netconf-datastore-type"/>\r
251           <description>\r
252             <text>Name of the datastore associated with this list entry.</text>\r
253           </description>\r
254         </leaf>\r
255         <container name="locks">\r
256           <presence value="This container is present only if the datastore&#10;is locked."/>\r
257           <description>\r
258             <text>The NETCONF &lt;lock&gt; and &lt;partial-lock&gt; operations allow\r
259 a client to lock specific resources in a datastore.  The\r
260 NETCONF server will prevent changes to the locked\r
261 resources by all sessions except the one that acquired\r
262 the lock(s).\r
263 \r
264 Monitoring information is provided for each datastore\r
265 entry including details such as the session that acquired\r
266 the lock, the type of lock (global or partial) and the\r
267 list of locked resources.  Multiple locks per datastore\r
268 are supported.</text>\r
269           </description>\r
270           <grouping name="lock-info">\r
271             <description>\r
272               <text>Lock related parameters, common to both global and\r
273 partial locks.</text>\r
274             </description>\r
275             <leaf name="locked-by-session">\r
276               <type name="uint32"/>\r
277               <mandatory value="true"/>\r
278               <description>\r
279                 <text>The session ID of the session that has locked\r
280 this resource.  Both a global lock and a partial\r
281 lock MUST contain the NETCONF session-id.\r
282 \r
283 If the lock is held by a session that is not managed\r
284 by the NETCONF server (e.g., a CLI session), a session\r
285 id of 0 (zero) is reported.</text>\r
286               </description>\r
287               <reference>\r
288                 <text>RFC 4741: NETCONF Configuration Protocol</text>\r
289               </reference>\r
290             </leaf>\r
291             <leaf name="locked-time">\r
292               <type name="yang:date-and-time"/>\r
293               <mandatory value="true"/>\r
294               <description>\r
295                 <text>The date and time of when the resource was\r
296 locked.</text>\r
297               </description>\r
298             </leaf>\r
299           </grouping>\r
300           <choice name="lock-type">\r
301             <description>\r
302               <text>Indicates if a global lock or a set of partial locks\r
303 are set.</text>\r
304             </description>\r
305             <container name="global-lock">\r
306               <description>\r
307                 <text>Present if the global lock is set.</text>\r
308               </description>\r
309               <uses name="lock-info"/>\r
310             </container>\r
311             <list name="partial-lock">\r
312               <key value="lock-id"/>\r
313               <description>\r
314                 <text>List of partial locks.</text>\r
315               </description>\r
316               <reference>\r
317                 <text>RFC 5717: Partial Lock Remote Procedure Call (RPC) for\r
318   NETCONF</text>\r
319               </reference>\r
320               <leaf name="lock-id">\r
321                 <type name="uint32"/>\r
322                 <description>\r
323                   <text>This is the lock id returned in the &lt;partial-lock&gt;\r
324 response.</text>\r
325                 </description>\r
326               </leaf>\r
327               <uses name="lock-info"/>\r
328               <leaf-list name="select">\r
329                 <type name="yang:xpath1.0"/>\r
330                 <min-elements value="1"/>\r
331                 <description>\r
332                   <text>The xpath expression that was used to request\r
333 the lock.  The select expression indicates the\r
334 original intended scope of the lock.</text>\r
335                 </description>\r
336               </leaf-list>\r
337               <leaf-list name="locked-node">\r
338                 <type name="instance-identifier"/>\r
339                 <description>\r
340                   <text>The list of instance-identifiers (i.e., the\r
341 locked nodes).\r
342 \r
343 The scope of the partial lock is defined by the list\r
344 of locked nodes.</text>\r
345                 </description>\r
346               </leaf-list>\r
347             </list>\r
348           </choice>\r
349         </container>\r
350       </list>\r
351     </container>\r
352     <container name="schemas">\r
353       <description>\r
354         <text>Contains the list of data model schemas supported by the\r
355 server.</text>\r
356       </description>\r
357       <list name="schema">\r
358         <key value="identifier version format"/>\r
359         <description>\r
360           <text>List of data model schemas supported by the server.</text>\r
361         </description>\r
362         <leaf name="identifier">\r
363           <type name="string"/>\r
364           <description>\r
365             <text>Identifier to uniquely reference the schema.  The\r
366 identifier is used in the &lt;get-schema&gt; operation and may\r
367 be used for other purposes such as file retrieval.\r
368 \r
369 For modeling languages that support or require a data\r
370 model name (e.g., YANG module name) the identifier MUST\r
371 match that name.  For YANG data models, the identifier is\r
372 the name of the module or submodule.  In other cases, an\r
373 identifier such as a filename MAY be used instead.</text>\r
374           </description>\r
375         </leaf>\r
376         <leaf name="version">\r
377           <type name="string"/>\r
378           <description>\r
379             <text>Version of the schema supported.  Multiple versions MAY be\r
380 supported simultaneously by a NETCONF server.  Each\r
381 version MUST be reported individually in the schema list,\r
382 i.e., with same identifier, possibly different location,\r
383 but different version.\r
384 \r
385 For YANG data models, version is the value of the most\r
386 recent YANG 'revision' statement in the module or\r
387 submodule, or the empty string if no 'revision' statement\r
388 is present.</text>\r
389           </description>\r
390         </leaf>\r
391         <leaf name="format">\r
392           <type name="identityref">\r
393             <base name="schema-format"/>\r
394           </type>\r
395           <description>\r
396             <text>The data modeling language the schema is written\r
397 in (currently xsd, yang, yin, rng, or rnc).\r
398 For YANG data models, 'yang' format MUST be supported and\r
399 'yin' format MAY also be provided.</text>\r
400           </description>\r
401         </leaf>\r
402         <leaf name="namespace">\r
403           <type name="inet:uri"/>\r
404           <mandatory value="true"/>\r
405           <description>\r
406             <text>The XML namespace defined by the data model.\r
407 \r
408 For YANG data models, this is the module's namespace.\r
409 If the list entry describes a submodule, this field\r
410 contains the namespace of the module to which the\r
411 submodule belongs.</text>\r
412           </description>\r
413         </leaf>\r
414         <leaf-list name="location">\r
415           <type name="union">\r
416             <type name="enumeration">\r
417               <enum name="NETCONF">\r
418                 <value value="0"/>\r
419               </enum>\r
420             </type>\r
421             <type name="inet:uri"/>\r
422           </type>\r
423           <description>\r
424             <text>One or more locations from which the schema can be\r
425 retrieved.  This list SHOULD contain at least one\r
426 entry per schema.\r
427 \r
428 A schema entry may be located on a remote file system\r
429 (e.g., reference to file system for ftp retrieval) or\r
430 retrieved directly from a server supporting the\r
431 &lt;get-schema&gt; operation (denoted by the value 'NETCONF').</text>\r
432           </description>\r
433         </leaf-list>\r
434       </list>\r
435     </container>\r
436     <container name="sessions">\r
437       <description>\r
438         <text>The sessions container includes session-specific data for\r
439 NETCONF management sessions.  The session list MUST include\r
440 all currently active NETCONF sessions.</text>\r
441       </description>\r
442       <list name="session">\r
443         <key value="session-id"/>\r
444         <description>\r
445           <text>All NETCONF sessions managed by the NETCONF server\r
446 MUST be reported in this list.</text>\r
447         </description>\r
448         <leaf name="session-id">\r
449           <type name="uint32">\r
450             <range value="1..max"/>\r
451           </type>\r
452           <description>\r
453             <text>Unique identifier for the session.  This value is the\r
454 NETCONF session identifier, as defined in RFC 4741.</text>\r
455           </description>\r
456           <reference>\r
457             <text>RFC 4741: NETCONF Configuration Protocol</text>\r
458           </reference>\r
459         </leaf>\r
460         <leaf name="transport">\r
461           <type name="identityref">\r
462             <base name="transport"/>\r
463           </type>\r
464           <mandatory value="true"/>\r
465           <description>\r
466             <text>Identifies the transport for each session, e.g.,\r
467 'netconf-ssh', 'netconf-soap', etc.</text>\r
468           </description>\r
469         </leaf>\r
470         <leaf name="username">\r
471           <type name="string"/>\r
472           <mandatory value="true"/>\r
473           <description>\r
474             <text>The username is the client identity that was authenticated\r
475 by the NETCONF transport protocol.  The algorithm used to\r
476 derive the username is NETCONF transport protocol specific\r
477 and in addition specific to the authentication mechanism\r
478 used by the NETCONF transport protocol.</text>\r
479           </description>\r
480         </leaf>\r
481         <leaf name="source-host">\r
482           <type name="inet:host"/>\r
483           <description>\r
484             <text>Host identifier of the NETCONF client.  The value\r
485 returned is implementation specific (e.g., hostname,\r
486 IPv4 address, IPv6 address)</text>\r
487           </description>\r
488         </leaf>\r
489         <leaf name="login-time">\r
490           <type name="yang:date-and-time"/>\r
491           <mandatory value="true"/>\r
492           <description>\r
493             <text>Time at the server at which the session was established.</text>\r
494           </description>\r
495         </leaf>\r
496         <uses name="common-counters">\r
497           <description>\r
498             <text>Per-session counters.  Zero based with following reset\r
499 behaviour:\r
500 - at start of a session\r
501 - when max value is reached</text>\r
502           </description>\r
503         </uses>\r
504       </list>\r
505     </container>\r
506     <container name="statistics">\r
507       <description>\r
508         <text>Statistical data pertaining to the NETCONF server.</text>\r
509       </description>\r
510       <leaf name="netconf-start-time">\r
511         <type name="yang:date-and-time"/>\r
512         <description>\r
513           <text>Date and time at which the management subsystem was\r
514 started.</text>\r
515         </description>\r
516       </leaf>\r
517       <leaf name="in-bad-hellos">\r
518         <type name="yang:zero-based-counter32"/>\r
519         <description>\r
520           <text>Number of sessions silently dropped because an\r
521 invalid &lt;hello&gt; message was received.  This includes &lt;hello&gt;\r
522 messages with a 'session-id' attribute, bad namespace, and\r
523 bad capability declarations.</text>\r
524         </description>\r
525       </leaf>\r
526       <leaf name="in-sessions">\r
527         <type name="yang:zero-based-counter32"/>\r
528         <description>\r
529           <text>Number of sessions started.  This counter is incremented\r
530 when a &lt;hello&gt; message with a &lt;session-id&gt; is sent.\r
531 \r
532 'in-sessions' - 'in-bad-hellos' =\r
533  'number of correctly started netconf sessions'</text>\r
534         </description>\r
535       </leaf>\r
536       <leaf name="dropped-sessions">\r
537         <type name="yang:zero-based-counter32"/>\r
538         <description>\r
539           <text>Number of sessions that were abnormally terminated, e.g.,\r
540 due to idle timeout or transport close.  This counter is not\r
541 incremented when a session is properly closed by a\r
542 &lt;close-session&gt; operation, or killed by a &lt;kill-session&gt;\r
543 operation.</text>\r
544         </description>\r
545       </leaf>\r
546       <uses name="common-counters">\r
547         <description>\r
548           <text>Global counters, accumulated from all sessions.\r
549 Zero based with following reset behaviour:\r
550 - re-initialization of NETCONF server\r
551 - when max value is reached</text>\r
552         </description>\r
553       </uses>\r
554     </container>\r
555   </container>\r
556   <rpc name="get-schema">\r
557     <description>\r
558       <text>This operation is used to retrieve a schema from the\r
559 NETCONF server.\r
560 \r
561 Positive Response:\r
562 The NETCONF server returns the requested schema.\r
563 \r
564 Negative Response:\r
565 If requested schema does not exist, the &lt;error-tag&gt; is\r
566 'invalid-value'.\r
567 \r
568 If more than one schema matches the requested parameters, the\r
569 &lt;error-tag&gt; is 'operation-failed', and &lt;error-app-tag&gt; is\r
570 'data-not-unique'.</text>\r
571     </description>\r
572     <input>\r
573       <leaf name="identifier">\r
574         <type name="string"/>\r
575         <mandatory value="true"/>\r
576         <description>\r
577           <text>Identifier for the schema list entry.</text>\r
578         </description>\r
579       </leaf>\r
580       <leaf name="version">\r
581         <type name="string"/>\r
582         <description>\r
583           <text>Version of the schema requested.  If this parameter is not\r
584 present, and more than one version of the schema exists on\r
585 the server, a 'data-not-unique' error is returned, as\r
586 described above.</text>\r
587         </description>\r
588       </leaf>\r
589       <leaf name="format">\r
590         <type name="identityref">\r
591           <base name="schema-format"/>\r
592         </type>\r
593         <description>\r
594           <text>The data modeling language of the schema.  If this\r
595 parameter is not present, and more than one formats of\r
596 the schema exists on the server, a 'data-not-unique' error\r
597 is returned, as described above.</text>\r
598         </description>\r
599       </leaf>\r
600     </input>\r
601     <output>\r
602       <anyxml name="data">\r
603         <description>\r
604           <text>Contains the schema content.</text>\r
605         </description>\r
606       </anyxml>\r
607     </output>\r
608   </rpc>\r
609 </module>\r