blob: 6d9e285ee5fc05d7e7fdb4716449a1710c59dbe8 [file] [log] [blame]
Michal Vasko086311b2016-01-08 09:53:11 +01001<?xml version="1.0" encoding="UTF-8"?>
2<module name="ietf-netconf-notifications"
3 xmlns="urn:ietf:params:xml:ns:yang:yin:1"
4 xmlns:ncn="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"
5 xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types"
6 xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
7 <namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"/>
8 <prefix value="ncn"/>
9 <import module="ietf-inet-types">
10 <prefix value="inet"/>
11 </import>
12 <import module="ietf-netconf">
13 <prefix value="nc"/>
14 </import>
15 <organization>
16 <text>IETF NETCONF (Network Configuration Protocol) 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: Bert Wijnen
23 &lt;mailto:bertietf@bwijnen.net&gt;
24
25WG Chair: Mehmet Ersue
26 &lt;mailto:mehmet.ersue@nsn.com&gt;
27
28Editor: Andy Bierman
29 &lt;mailto:andy@netconfcentral.org&gt;</text>
30 </contact>
31 <description>
32 <text>This module defines a YANG data model for use with the
33NETCONF protocol that allows the NETCONF client to
34receive common NETCONF base event notifications.
35
36Copyright (c) 2012 IETF Trust and the persons identified as
37the document authors. All rights reserved.
38
39Redistribution and use in source and binary forms, with or
40without modification, is permitted pursuant to, and subject
41to the license terms contained in, the Simplified BSD License
42
43
44
45set forth in Section 4.c of the IETF Trust's Legal Provisions
46Relating to IETF Documents
47(http://trustee.ietf.org/license-info).
48
49This version of this YANG module is part of RFC 6470; see
50the RFC itself for full legal notices.</text>
51 </description>
52 <revision date="2012-02-06">
53 <description>
54 <text>Initial version.</text>
55 </description>
56 <reference>
57 <text>RFC 6470: NETCONF Base Notifications</text>
58 </reference>
59 </revision>
60 <grouping name="common-session-parms">
61 <description>
62 <text>Common session parameters to identify a
63management session.</text>
64 </description>
65 <leaf name="username">
66 <type name="string"/>
67 <mandatory value="true"/>
68 <description>
69 <text>Name of the user for the session.</text>
70 </description>
71 </leaf>
72 <leaf name="session-id">
73 <type name="nc:session-id-or-zero-type"/>
74 <mandatory value="true"/>
75 <description>
76 <text>Identifier of the session.
77A NETCONF session MUST be identified by a non-zero value.
78A non-NETCONF session MAY be identified by the value zero.</text>
79 </description>
80 </leaf>
81 <leaf name="source-host">
82 <type name="inet:ip-address"/>
83 <description>
84 <text>Address of the remote host for the session.</text>
85 </description>
86 </leaf>
87 </grouping>
88 <grouping name="changed-by-parms">
89 <description>
90 <text>Common parameters to identify the source
91of a change event, such as a configuration
92or capability change.</text>
93 </description>
94 <container name="changed-by">
95 <description>
96 <text>Indicates the source of the change.
97If caused by internal action, then the
98empty leaf 'server' will be present.
99If caused by a management session, then
100the name, remote host address, and session ID
101of the session that made the change will be reported.</text>
102 </description>
103 <choice name="server-or-user">
104 <mandatory value="true"/>
105 <leaf name="server">
106 <type name="empty"/>
107 <description>
108 <text>If present, the change was caused
109by the server.</text>
110 </description>
111 </leaf>
112 <case name="by-user">
113 <uses name="common-session-parms"/>
114 </case>
115 </choice>
116 </container>
117 </grouping>
118 <notification name="netconf-config-change">
119 <description>
120 <text>Generated when the NETCONF server detects that the
121&lt;running&gt; or &lt;startup&gt; configuration datastore
122has been changed by a management session.
123The notification summarizes the edits that
124have been detected.
125
126The server MAY choose to also generate this
127notification while loading a datastore during the
128boot process for the device.</text>
129 </description>
130 <uses name="changed-by-parms"/>
131 <leaf name="datastore">
132 <type name="enumeration">
133 <enum name="running">
134 <description>
135 <text>The &lt;running&gt; datastore has changed.</text>
136 </description>
137 </enum>
138 <enum name="startup">
139 <description>
140 <text>The &lt;startup&gt; datastore has changed</text>
141 </description>
142 </enum>
143 </type>
144 <default value="running"/>
145 <description>
146 <text>Indicates which configuration datastore has changed.</text>
147 </description>
148 </leaf>
149 <list name="edit">
150 <description>
151 <text>An edit record SHOULD be present for each distinct
152edit operation that the server has detected on
153the target datastore. This list MAY be omitted
154if the detailed edit operations are not known.
155The server MAY report entries in this list for
156changes not made by a NETCONF session (e.g., CLI).</text>
157 </description>
158 <leaf name="target">
159 <type name="instance-identifier"/>
160 <description>
161 <text>Topmost node associated with the configuration change.
162A server SHOULD set this object to the node within
163the datastore that is being altered. A server MAY
164set this object to one of the ancestors of the actual
165node that was changed, or omit this object, if the
166exact node is not known.</text>
167 </description>
168 </leaf>
169 <leaf name="operation">
170 <type name="nc:edit-operation-type"/>
171 <description>
172 <text>Type of edit operation performed.
173A server MUST set this object to the NETCONF edit
174operation performed on the target datastore.</text>
175 </description>
176 </leaf>
177 </list>
178 </notification>
179 <notification name="netconf-capability-change">
180 <description>
181 <text>Generated when the NETCONF server detects that
182the server capabilities have changed.
183Indicates which capabilities have been added, deleted,
184and/or modified. The manner in which a server
185capability is changed is outside the scope of this
186document.</text>
187 </description>
188 <uses name="changed-by-parms"/>
189 <leaf-list name="added-capability">
190 <type name="inet:uri"/>
191 <description>
192 <text>List of capabilities that have just been added.</text>
193 </description>
194 </leaf-list>
195 <leaf-list name="deleted-capability">
196 <type name="inet:uri"/>
197 <description>
198 <text>List of capabilities that have just been deleted.</text>
199 </description>
200 </leaf-list>
201 <leaf-list name="modified-capability">
202 <type name="inet:uri"/>
203 <description>
204 <text>List of capabilities that have just been modified.
205A capability is considered to be modified if the
206base URI for the capability has not changed, but
207one or more of the parameters encoded at the end of
208the capability URI have changed.
209The new modified value of the complete URI is returned.</text>
210 </description>
211 </leaf-list>
212 </notification>
213 <notification name="netconf-session-start">
214 <description>
215 <text>Generated when a NETCONF server detects that a
216NETCONF session has started. A server MAY generate
217this event for non-NETCONF management sessions.
218Indicates the identity of the user that started
219the session.</text>
220 </description>
221 <uses name="common-session-parms"/>
222 </notification>
223 <notification name="netconf-session-end">
224 <description>
225 <text>Generated when a NETCONF server detects that a
226NETCONF session has terminated.
227A server MAY optionally generate this event for
228non-NETCONF management sessions. Indicates the
229identity of the user that owned the session,
230and why the session was terminated.</text>
231 </description>
232 <uses name="common-session-parms"/>
233 <leaf name="killed-by">
234 <when condition="../termination-reason = 'killed'"/>
235 <type name="nc:session-id-type"/>
236 <description>
237 <text>The ID of the session that directly caused this session
238to be abnormally terminated. If this session was abnormally
239terminated by a non-NETCONF session unknown to the server,
240then this leaf will not be present.</text>
241 </description>
242 </leaf>
243 <leaf name="termination-reason">
244 <type name="enumeration">
245 <enum name="closed">
246 <description>
247 <text>The session was terminated by the client in normal
248fashion, e.g., by the NETCONF &lt;close-session&gt;
249protocol operation.</text>
250 </description>
251 </enum>
252 <enum name="killed">
253 <description>
254 <text>The session was terminated in abnormal
255fashion, e.g., by the NETCONF &lt;kill-session&gt;
256protocol operation.</text>
257 </description>
258 </enum>
259 <enum name="dropped">
260 <description>
261 <text>The session was terminated because the transport layer
262connection was unexpectedly closed.</text>
263 </description>
264 </enum>
265 <enum name="timeout">
266 <description>
267 <text>The session was terminated because of inactivity,
268e.g., waiting for the &lt;hello&gt; message or &lt;rpc&gt;
269messages.</text>
270 </description>
271 </enum>
272 <enum name="bad-hello">
273 <description>
274 <text>The client's &lt;hello&gt; message was invalid.</text>
275 </description>
276 </enum>
277 <enum name="other">
278 <description>
279 <text>The session was terminated for some other reason.</text>
280 </description>
281 </enum>
282 </type>
283 <mandatory value="true"/>
284 <description>
285 <text>Reason the session was terminated.</text>
286 </description>
287 </leaf>
288 </notification>
289 <notification name="netconf-confirmed-commit">
290 <description>
291 <text>Generated when a NETCONF server detects that a
292confirmed-commit event has occurred. Indicates the event
293and the current state of the confirmed-commit procedure
294in progress.</text>
295 </description>
296 <reference>
297 <text>RFC 6241, Section 8.4</text>
298 </reference>
299 <uses name="common-session-parms">
Michal Vasko8d3f60c2016-11-22 10:13:12 +0100300 <when condition="confirm-event != 'timeout'"/>
Michal Vasko086311b2016-01-08 09:53:11 +0100301 </uses>
302 <leaf name="confirm-event">
303 <type name="enumeration">
304 <enum name="start">
305 <description>
306 <text>The confirmed-commit procedure has started.</text>
307 </description>
308 </enum>
309 <enum name="cancel">
310 <description>
311 <text>The confirmed-commit procedure has been canceled,
312e.g., due to the session being terminated, or an
313explicit &lt;cancel-commit&gt; operation.</text>
314 </description>
315 </enum>
316 <enum name="timeout">
317 <description>
318 <text>The confirmed-commit procedure has been canceled
319due to the confirm-timeout interval expiring.
320The common session parameters will not be present
321in this sub-mode.</text>
322 </description>
323 </enum>
324 <enum name="extend">
325 <description>
326 <text>The confirmed-commit timeout has been extended,
327e.g., by a new &lt;confirmed-commit&gt; operation.</text>
328 </description>
329 </enum>
330 <enum name="complete">
331 <description>
332 <text>The confirmed-commit procedure has been completed.</text>
333 </description>
334 </enum>
335 </type>
336 <mandatory value="true"/>
337 <description>
338 <text>Indicates the event that caused the notification.</text>
339 </description>
340 </leaf>
341 <leaf name="timeout">
342 <when condition="../confirm-event = 'start' or ../confirm-event = 'extend'"/>
343 <type name="uint32"/>
344 <units name="seconds"/>
345 <description>
346 <text>The configured timeout value if the event type
347is 'start' or 'extend'. This value represents
348the approximate number of seconds from the event
349time when the 'timeout' event might occur.</text>
350 </description>
351 </leaf>
352 </notification>
353</module>