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