blob: ac259b73ca85153e393aff5fbc193de31f975e51 [file] [log] [blame]
Toru Furusawa28988892017-10-30 17:28:40 -07001module tapi-notification {
Yuta HIGUCHI80d0bbd2018-02-28 11:13:11 -08002 namespace "urn:onf:otcc:yang:tapi-notification";
Toru Furusawa28988892017-10-30 17:28:40 -07003 prefix tapi-notification;
4 import tapi-common {
5 prefix tapi-common;
6 }
Yuta HIGUCHI80d0bbd2018-02-28 11:13:11 -08007 organization "ONF OTCC (Open Transport Configuration & Control) Project";
8 contact "
9 Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
10 Project List: <mailto:transport-api@opennetworking.org>
11 Editor: Karthik Sethuraman
12 <mailto:karthik.sethuraman@necam.com>";
13 description "
14 This module contains TAPI Notification Model definitions.
15 Source: TapiNotification.uml
16 Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.
17 License: This module is distributed under the Apache License 2.0";
18 revision 2018-02-16 {
19 description "ONF Transport API version 2.0.1
20 This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .
21 <https://wiki.opennetworking.org/display/OIMT/IISOMI>
22 Changes in this revision: <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/blob/develop/change-log.md>";
23 reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
24 <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/tree/develop/UML>";
Toru Furusawa28988892017-10-30 17:28:40 -070025 }
26 augment "/tapi-common:context" {
27 uses notification-context;
28 description "Augments the base TAPI Context with NotificationService information";
29 }
30 /***********************
31 * package object-classes
32 **********************/
33 grouping notification-subscription-service {
34 list notification {
35 key 'uuid';
36 config false;
37 uses notification;
38 description "none";
39 }
40 container notification-channel {
41 uses notification-channel;
42 description "none";
43 }
44 container subscription-filter {
45 uses subscription-filter;
46 description "none";
47 }
48 leaf subscription-state {
49 type subscription-state;
50 description "none";
51 }
52 leaf-list supported-notification-types {
53 type notification-type;
54 config false;
55 min-elements 1;
56 description "none";
57 }
58 leaf-list supported-object-types {
59 type object-type;
60 config false;
61 min-elements 1;
62 description "none";
63 }
64 uses tapi-common:service-spec;
65 description "none";
66 }
67 grouping subscription-filter {
68 leaf-list requested-notification-types {
69 type notification-type;
70 config false;
71 description "none";
72 }
73 leaf-list requested-object-types {
74 type object-type;
75 config false;
76 description "none";
77 }
78 leaf-list requested-layer-protocols {
79 type tapi-common:layer-protocol-name;
80 config false;
81 description "none";
82 }
83 leaf-list requested-object-identifier {
84 type tapi-common:uuid;
85 config false;
86 description "none";
87 }
88 leaf include-content {
89 type boolean;
90 config false;
91 description "Indicates whether the published Notification includes content or just the Notification Id (which enables retrieval of the notification at the later stage)";
92 }
93 uses tapi-common:local-class;
94 description "none";
95 }
96 notification notification {
97 uses notification;
98 description "none";
99 }
100 grouping notification {
101 leaf notification-type {
102 type notification-type;
103 description "none";
104 }
105 leaf target-object-type {
106 type object-type;
107 description "none";
108 }
109 leaf target-object-identifier {
110 type tapi-common:uuid;
111 description "none";
112 }
113 list target-object-name {
114 key 'value-name';
115 min-elements 1;
116 uses tapi-common:name-and-value;
117 description "none";
118 }
119 leaf event-time-stamp {
120 type tapi-common:date-and-time;
121 description "none";
122 }
123 leaf sequence-number {
124 type uint64;
125 config false;
126 description "A monotonous increasing sequence number associated with the notification.
127 The exact semantics of how this sequence number is assigned (per channel or subscription or source or system) is left undefined.";
128 }
129 leaf source-indicator {
130 type source-indicator;
131 description "none";
132 }
133 leaf layer-protocol-name {
134 type tapi-common:layer-protocol-name;
135 description "none";
136 }
137 list changed-attributes {
138 key 'value-name';
139 uses name-and-value-change;
140 description "none";
141 }
142 list additional-info {
143 key 'value-name';
144 uses tapi-common:name-and-value;
145 description "none";
146 }
147 leaf additional-text {
148 type string;
149 description "none";
150 }
151 container tca-info {
152 uses tca-info;
153 description "none";
154 }
155 container alarm-info {
156 uses alarm-info;
157 description "none";
158 }
159 uses tapi-common:resource-spec;
160 description "none";
161 }
162 grouping notification-channel {
163 leaf stream-address {
164 type string;
165 config false;
166 description "The address/location/URI of the channel/stream to which the subscribed notifications are published.
167 This specifics of this is typically dependent on the implementation protocol & mechanism and hence is typed as a string.";
168 }
169 leaf next-sequence-no {
170 type uint64;
171 config false;
172 description "The sequence number of the next notification that will be published on the channel";
173 }
174 uses tapi-common:local-class;
175 description "none";
176 }
177 grouping notification-context {
178 list notif-subscription {
179 key 'uuid';
180 uses notification-subscription-service;
181 description "none";
182 }
183 list notification {
184 key 'uuid';
185 config false;
186 uses notification;
187 description "none";
188 }
189 description "none";
190 }
191 grouping alarm-info {
192 leaf is-transient {
193 type boolean;
194 config false;
195 description "none";
196 }
197 leaf pervceived-severity {
198 type perceived-serverity-type;
199 config false;
200 description "none";
201 }
202 leaf probable-cause {
203 type string;
204 config false;
205 description "none";
206 }
207 leaf service-affecting {
208 type service-affecting;
209 description "none";
210 }
211 description "none";
212 }
213 grouping tca-info {
214 leaf is-transient {
215 type boolean;
216 config false;
217 description "none";
218 }
219 leaf threshold-crossing {
220 type threshold-crossing-type;
221 description "none";
222 }
223 leaf threshold-parameter {
224 type string;
225 config false;
226 description "none";
227 }
228 leaf threshold-value {
229 type uint64;
230 config false;
231 description "none";
232 }
233 description "none";
234 }
235
236 /***********************
237 * package type-definitions
238 **********************/
239 grouping name-and-value-change {
240 leaf value-name {
241 type string;
242 description "The name of the value. The value need not have a name.";
243 }
244 leaf old-value {
245 type string;
246 description "The value";
247 }
248 leaf new-value {
249 type string;
250 description "The value";
251 }
252 description "A scoped name-value triple, including old value and new value";
253 }
254 typedef notification-type {
255 type enumeration {
wu6a418d22018-02-02 01:49:21 -0500256 enum OBJECT_CREATION {
Toru Furusawa28988892017-10-30 17:28:40 -0700257 description "Not a normal state. The system is unable to determine the correct value.";
258 }
wu6a418d22018-02-02 01:49:21 -0500259 enum OBJECT_DELETION {
Toru Furusawa28988892017-10-30 17:28:40 -0700260 description "none";
261 }
wu6a418d22018-02-02 01:49:21 -0500262 enum ATTRIBUTE_VALUE_CHANGE {
Toru Furusawa28988892017-10-30 17:28:40 -0700263 description "none";
264 }
wu6a418d22018-02-02 01:49:21 -0500265 enum ALARM_EVENT {
Toru Furusawa28988892017-10-30 17:28:40 -0700266 description "none";
267 }
wu6a418d22018-02-02 01:49:21 -0500268 enum THRESHOLD_CROSSING_ALERT {
Toru Furusawa28988892017-10-30 17:28:40 -0700269 description "none";
270 }
271 }
wu6a418d22018-02-02 01:49:21 -0500272 description "List of supported Notifications types.";
Toru Furusawa28988892017-10-30 17:28:40 -0700273 }
274 typedef object-type {
275 type enumeration {
wu6a418d22018-02-02 01:49:21 -0500276 enum TOPOLOGY {
Toru Furusawa28988892017-10-30 17:28:40 -0700277 description "none";
278 }
wu6a418d22018-02-02 01:49:21 -0500279 enum NODE {
Toru Furusawa28988892017-10-30 17:28:40 -0700280 description "none";
281 }
wu6a418d22018-02-02 01:49:21 -0500282 enum LINK {
Toru Furusawa28988892017-10-30 17:28:40 -0700283 description "none";
284 }
wu6a418d22018-02-02 01:49:21 -0500285 enum CONNECTION {
Toru Furusawa28988892017-10-30 17:28:40 -0700286 description "none";
287 }
wu6a418d22018-02-02 01:49:21 -0500288 enum PATH {
Toru Furusawa28988892017-10-30 17:28:40 -0700289 description "none";
290 }
wu6a418d22018-02-02 01:49:21 -0500291 enum CONNECTIVITY_SERVICE {
Toru Furusawa28988892017-10-30 17:28:40 -0700292 description "none";
293 }
wu6a418d22018-02-02 01:49:21 -0500294 enum VIRTUAL_NETWORK_SERVICE {
Toru Furusawa28988892017-10-30 17:28:40 -0700295 description "none";
296 }
wu6a418d22018-02-02 01:49:21 -0500297 enum PATH_COMPUTATION_SERVICE {
Toru Furusawa28988892017-10-30 17:28:40 -0700298 description "none";
299 }
wu6a418d22018-02-02 01:49:21 -0500300 enum NODE_EDGE_POINT {
Toru Furusawa28988892017-10-30 17:28:40 -0700301 description "none";
302 }
wu6a418d22018-02-02 01:49:21 -0500303 enum SERVICE_INTERFACE_POINT {
Toru Furusawa28988892017-10-30 17:28:40 -0700304 description "none";
305 }
wu6a418d22018-02-02 01:49:21 -0500306 enum CONNECTION_END_POINT {
Toru Furusawa28988892017-10-30 17:28:40 -0700307 description "none";
308 }
Yuta HIGUCHI80d0bbd2018-02-28 11:13:11 -0800309 enum MAINTENANCE_ENTITY_GROUP {
310 description "none";
311 }
312 enum MAINTENANCE_ENTITY {
313 description "none";
314 }
315 enum MEG_END_POINT {
316 description "none";
317 }
318 enum MEG_INTERMEDIATE_POINT {
319 description "none";
320 }
321 enum SWITCH_CONTROL {
322 description "none";
323 }
324 enum SWITCH {
325 description "none";
326 }
327 enum ROUTE {
328 description "none";
329 }
330 enum NODE_RULE_GROUP {
331 description "none";
332 }
333 enum INTER_RULE_GROUP {
334 description "none";
335 }
336 enum RULE {
337 description "none";
338 }
Toru Furusawa28988892017-10-30 17:28:40 -0700339 }
wu6a418d22018-02-02 01:49:21 -0500340 description "The list of TAPI Global Object Class types on which Notifications can be raised.";
Toru Furusawa28988892017-10-30 17:28:40 -0700341 }
342 typedef source-indicator {
343 type enumeration {
wu6a418d22018-02-02 01:49:21 -0500344 enum RESOURCE_OPERATION {
Toru Furusawa28988892017-10-30 17:28:40 -0700345 description "none";
346 }
wu6a418d22018-02-02 01:49:21 -0500347 enum MANAGEMENT_OPERATION {
Toru Furusawa28988892017-10-30 17:28:40 -0700348 description "none";
349 }
wu6a418d22018-02-02 01:49:21 -0500350 enum UNKNOWN {
Toru Furusawa28988892017-10-30 17:28:40 -0700351 description "none";
352 }
353 }
354 description "none";
355 }
356 typedef subscription-state {
357 type enumeration {
wu6a418d22018-02-02 01:49:21 -0500358 enum SUSPENDED {
Toru Furusawa28988892017-10-30 17:28:40 -0700359 description "none";
360 }
wu6a418d22018-02-02 01:49:21 -0500361 enum ACTIVE {
Toru Furusawa28988892017-10-30 17:28:40 -0700362 description "none";
363 }
364 }
365 description "none";
366 }
367 typedef perceived-serverity-type {
368 type enumeration {
wu6a418d22018-02-02 01:49:21 -0500369 enum CRITICAL {
Toru Furusawa28988892017-10-30 17:28:40 -0700370 description "none";
371 }
wu6a418d22018-02-02 01:49:21 -0500372 enum MAJOR {
Toru Furusawa28988892017-10-30 17:28:40 -0700373 description "none";
374 }
wu6a418d22018-02-02 01:49:21 -0500375 enum MINOR {
Toru Furusawa28988892017-10-30 17:28:40 -0700376 description "none";
377 }
wu6a418d22018-02-02 01:49:21 -0500378 enum WARNING {
Toru Furusawa28988892017-10-30 17:28:40 -0700379 description "none";
380 }
wu6a418d22018-02-02 01:49:21 -0500381 enum CLEARED {
Toru Furusawa28988892017-10-30 17:28:40 -0700382 description "none";
383 }
384 }
385 description "none";
386 }
387 typedef threshold-crossing-type {
388 type enumeration {
wu6a418d22018-02-02 01:49:21 -0500389 enum THRESHOLD_ABOVE {
Toru Furusawa28988892017-10-30 17:28:40 -0700390 description "none";
391 }
wu6a418d22018-02-02 01:49:21 -0500392 enum THRESHOLD_BELOW {
Toru Furusawa28988892017-10-30 17:28:40 -0700393 description "none";
394 }
wu6a418d22018-02-02 01:49:21 -0500395 enum CLEARED {
Toru Furusawa28988892017-10-30 17:28:40 -0700396 description "none";
397 }
398 }
399 description "none";
400 }
401 typedef service-affecting {
402 type enumeration {
wu6a418d22018-02-02 01:49:21 -0500403 enum SERVICE_AFFECTING {
Toru Furusawa28988892017-10-30 17:28:40 -0700404 description "none";
405 }
wu6a418d22018-02-02 01:49:21 -0500406 enum NOT_SERVICE_AFFECTING {
Toru Furusawa28988892017-10-30 17:28:40 -0700407 description "none";
408 }
wu6a418d22018-02-02 01:49:21 -0500409 enum UNKNOWN {
Toru Furusawa28988892017-10-30 17:28:40 -0700410 description "none";
411 }
412 }
413 description "none";
414 }
415
416 /***********************
417 * package interfaces
418 **********************/
419 rpc get-supported-notification-types {
420 description "none";
421 output {
422 leaf-list supported-notification-types {
423 type notification-type;
424 min-elements 1;
425 description "none";
426 }
427 leaf-list supported-object-types {
428 type object-type;
429 min-elements 1;
430 description "none";
431 }
432 }
433 }
434 rpc create-notification-subscription-service {
435 description "none";
436 input {
437 container subscription-filter {
438 uses subscription-filter;
439 description "none";
440 }
441 leaf subscription-state {
442 type subscription-state;
443 description "none";
444 }
445 }
446 output {
447 container subscription-service {
448 uses notification-subscription-service;
449 description "none";
450 }
451 }
452 }
453 rpc update-notification-subscription-service {
454 description "none";
455 input {
456 leaf subscription-id-or-name {
457 type string;
458 description "none";
459 }
460 container subscription-filter {
461 uses subscription-filter;
462 description "none";
463 }
464 leaf subscription-state {
465 type subscription-state;
466 description "none";
467 }
468 }
469 output {
470 container subscription-service {
471 uses notification-subscription-service;
472 description "none";
473 }
474 }
475 }
476 rpc delete-notification-subscription-service {
477 description "none";
478 input {
479 leaf subscription-id-or-name {
480 type string;
481 description "none";
482 }
483 }
484 output {
485 container subscription-service {
486 uses notification-subscription-service;
487 description "none";
488 }
489 }
490 }
491 rpc get-notification-subscription-service-details {
492 description "none";
493 input {
494 leaf subscription-id-or-name {
495 type string;
496 description "none";
497 }
498 }
499 output {
500 container subscription-service {
501 uses notification-subscription-service;
502 description "none";
503 }
504 }
505 }
506 rpc get-notification-subscription-service-list {
507 description "none";
508 output {
509 list subscription-service {
510 uses notification-subscription-service;
511 description "none";
512 }
513 }
514 }
515 rpc get-notification-list {
516 description "none";
517 input {
518 leaf subscription-id-or-name {
519 type string;
520 description "none";
521 }
522 leaf time-period {
523 type string;
524 description "none";
525 }
526 }
527 output {
528 list notification {
529 uses notification;
530 description "none";
531 }
532 }
533 }
534
535}