Michal Vasko | 086311b | 2016-01-08 09:53:11 +0100 | [diff] [blame] | 1 | <?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: <http://tools.ietf.org/wg/netconf/> |
| 20 | WG List: <mailto:netconf@ietf.org> |
| 21 | |
| 22 | WG Chair: Bert Wijnen |
| 23 | <mailto:bertietf@bwijnen.net> |
| 24 | |
| 25 | WG Chair: Mehmet Ersue |
| 26 | <mailto:mehmet.ersue@nsn.com> |
| 27 | |
| 28 | Editor: Andy Bierman |
| 29 | <mailto:andy@netconfcentral.org></text> |
| 30 | </contact> |
| 31 | <description> |
| 32 | <text>This module defines a YANG data model for use with the |
| 33 | NETCONF protocol that allows the NETCONF client to |
| 34 | receive common NETCONF base event notifications. |
| 35 | |
| 36 | Copyright (c) 2012 IETF Trust and the persons identified as |
| 37 | the document authors. All rights reserved. |
| 38 | |
| 39 | Redistribution and use in source and binary forms, with or |
| 40 | without modification, is permitted pursuant to, and subject |
| 41 | to the license terms contained in, the Simplified BSD License |
| 42 | |
| 43 | |
| 44 | |
| 45 | set forth in Section 4.c of the IETF Trust's Legal Provisions |
| 46 | Relating to IETF Documents |
| 47 | (http://trustee.ietf.org/license-info). |
| 48 | |
| 49 | This version of this YANG module is part of RFC 6470; see |
| 50 | the 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 |
| 63 | management 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. |
| 77 | A NETCONF session MUST be identified by a non-zero value. |
| 78 | A 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 |
| 91 | of a change event, such as a configuration |
| 92 | or capability change.</text> |
| 93 | </description> |
| 94 | <container name="changed-by"> |
| 95 | <description> |
| 96 | <text>Indicates the source of the change. |
| 97 | If caused by internal action, then the |
| 98 | empty leaf 'server' will be present. |
| 99 | If caused by a management session, then |
| 100 | the name, remote host address, and session ID |
| 101 | of 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 |
| 109 | by 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 | <running> or <startup> configuration datastore |
| 122 | has been changed by a management session. |
| 123 | The notification summarizes the edits that |
| 124 | have been detected. |
| 125 | |
| 126 | The server MAY choose to also generate this |
| 127 | notification while loading a datastore during the |
| 128 | boot 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 <running> datastore has changed.</text> |
| 136 | </description> |
| 137 | </enum> |
| 138 | <enum name="startup"> |
| 139 | <description> |
| 140 | <text>The <startup> 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 |
| 152 | edit operation that the server has detected on |
| 153 | the target datastore. This list MAY be omitted |
| 154 | if the detailed edit operations are not known. |
| 155 | The server MAY report entries in this list for |
| 156 | changes 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. |
| 162 | A server SHOULD set this object to the node within |
| 163 | the datastore that is being altered. A server MAY |
| 164 | set this object to one of the ancestors of the actual |
| 165 | node that was changed, or omit this object, if the |
| 166 | exact 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. |
| 173 | A server MUST set this object to the NETCONF edit |
| 174 | operation 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 |
| 182 | the server capabilities have changed. |
| 183 | Indicates which capabilities have been added, deleted, |
| 184 | and/or modified. The manner in which a server |
| 185 | capability is changed is outside the scope of this |
| 186 | document.</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. |
| 205 | A capability is considered to be modified if the |
| 206 | base URI for the capability has not changed, but |
| 207 | one or more of the parameters encoded at the end of |
| 208 | the capability URI have changed. |
| 209 | The 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 |
| 216 | NETCONF session has started. A server MAY generate |
| 217 | this event for non-NETCONF management sessions. |
| 218 | Indicates the identity of the user that started |
| 219 | the 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 |
| 226 | NETCONF session has terminated. |
| 227 | A server MAY optionally generate this event for |
| 228 | non-NETCONF management sessions. Indicates the |
| 229 | identity of the user that owned the session, |
| 230 | and 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 |
| 238 | to be abnormally terminated. If this session was abnormally |
| 239 | terminated by a non-NETCONF session unknown to the server, |
| 240 | then 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 |
| 248 | fashion, e.g., by the NETCONF <close-session> |
| 249 | protocol operation.</text> |
| 250 | </description> |
| 251 | </enum> |
| 252 | <enum name="killed"> |
| 253 | <description> |
| 254 | <text>The session was terminated in abnormal |
| 255 | fashion, e.g., by the NETCONF <kill-session> |
| 256 | protocol operation.</text> |
| 257 | </description> |
| 258 | </enum> |
| 259 | <enum name="dropped"> |
| 260 | <description> |
| 261 | <text>The session was terminated because the transport layer |
| 262 | connection was unexpectedly closed.</text> |
| 263 | </description> |
| 264 | </enum> |
| 265 | <enum name="timeout"> |
| 266 | <description> |
| 267 | <text>The session was terminated because of inactivity, |
| 268 | e.g., waiting for the <hello> message or <rpc> |
| 269 | messages.</text> |
| 270 | </description> |
| 271 | </enum> |
| 272 | <enum name="bad-hello"> |
| 273 | <description> |
| 274 | <text>The client's <hello> 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 |
| 292 | confirmed-commit event has occurred. Indicates the event |
| 293 | and the current state of the confirmed-commit procedure |
| 294 | in progress.</text> |
| 295 | </description> |
| 296 | <reference> |
| 297 | <text>RFC 6241, Section 8.4</text> |
| 298 | </reference> |
| 299 | <uses name="common-session-parms"> |
| 300 | <when condition="../confirm-event != 'timeout'"/> |
| 301 | </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, |
| 312 | e.g., due to the session being terminated, or an |
| 313 | explicit <cancel-commit> operation.</text> |
| 314 | </description> |
| 315 | </enum> |
| 316 | <enum name="timeout"> |
| 317 | <description> |
| 318 | <text>The confirmed-commit procedure has been canceled |
| 319 | due to the confirm-timeout interval expiring. |
| 320 | The common session parameters will not be present |
| 321 | in this sub-mode.</text> |
| 322 | </description> |
| 323 | </enum> |
| 324 | <enum name="extend"> |
| 325 | <description> |
| 326 | <text>The confirmed-commit timeout has been extended, |
| 327 | e.g., by a new <confirmed-commit> 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 |
| 347 | is 'start' or 'extend'. This value represents |
| 348 | the approximate number of seconds from the event |
| 349 | time when the 'timeout' event might occur.</text> |
| 350 | </description> |
| 351 | </leaf> |
| 352 | </notification> |
| 353 | </module> |