blob: 1ca3f5218d2765ff391191e184b91fca79da6b2e [file] [log] [blame]
Toru Furusawa28988892017-10-30 17:28:40 -07001module tapi-notification {
2 namespace "urn:onf:params:xml:ns:yang:tapi-notification";
3 prefix tapi-notification;
4 import tapi-common {
5 prefix tapi-common;
6 }
7 organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";
8 contact "
9 WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>
10 WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,
11 WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,
12 Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";
13 description "none";
14 revision 2017-05-31 {
15 description "TAPI SDK 2.0-alpha";
16 reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
17 }
18 augment "/tapi-common:context" {
19 uses notification-context;
20 description "Augments the base TAPI Context with NotificationService information";
21 }
22 /***********************
23 * package object-classes
24 **********************/
25 grouping notification-subscription-service {
26 list notification {
27 key 'uuid';
28 config false;
29 uses notification;
30 description "none";
31 }
32 container notification-channel {
33 uses notification-channel;
34 description "none";
35 }
36 container subscription-filter {
37 uses subscription-filter;
38 description "none";
39 }
40 leaf subscription-state {
41 type subscription-state;
42 description "none";
43 }
44 leaf-list supported-notification-types {
45 type notification-type;
46 config false;
47 min-elements 1;
48 description "none";
49 }
50 leaf-list supported-object-types {
51 type object-type;
52 config false;
53 min-elements 1;
54 description "none";
55 }
56 uses tapi-common:service-spec;
57 description "none";
58 }
59 grouping subscription-filter {
60 leaf-list requested-notification-types {
61 type notification-type;
62 config false;
63 description "none";
64 }
65 leaf-list requested-object-types {
66 type object-type;
67 config false;
68 description "none";
69 }
70 leaf-list requested-layer-protocols {
71 type tapi-common:layer-protocol-name;
72 config false;
73 description "none";
74 }
75 leaf-list requested-object-identifier {
76 type tapi-common:uuid;
77 config false;
78 description "none";
79 }
80 leaf include-content {
81 type boolean;
82 config false;
83 description "Indicates whether the published Notification includes content or just the Notification Id (which enables retrieval of the notification at the later stage)";
84 }
85 uses tapi-common:local-class;
86 description "none";
87 }
88 notification notification {
89 uses notification;
90 description "none";
91 }
92 grouping notification {
93 leaf notification-type {
94 type notification-type;
95 description "none";
96 }
97 leaf target-object-type {
98 type object-type;
99 description "none";
100 }
101 leaf target-object-identifier {
102 type tapi-common:uuid;
103 description "none";
104 }
105 list target-object-name {
106 key 'value-name';
107 min-elements 1;
108 uses tapi-common:name-and-value;
109 description "none";
110 }
111 leaf event-time-stamp {
112 type tapi-common:date-and-time;
113 description "none";
114 }
115 leaf sequence-number {
116 type uint64;
117 config false;
118 description "A monotonous increasing sequence number associated with the notification.
119 The exact semantics of how this sequence number is assigned (per channel or subscription or source or system) is left undefined.";
120 }
121 leaf source-indicator {
122 type source-indicator;
123 description "none";
124 }
125 leaf layer-protocol-name {
126 type tapi-common:layer-protocol-name;
127 description "none";
128 }
129 list changed-attributes {
130 key 'value-name';
131 uses name-and-value-change;
132 description "none";
133 }
134 list additional-info {
135 key 'value-name';
136 uses tapi-common:name-and-value;
137 description "none";
138 }
139 leaf additional-text {
140 type string;
141 description "none";
142 }
143 container tca-info {
144 uses tca-info;
145 description "none";
146 }
147 container alarm-info {
148 uses alarm-info;
149 description "none";
150 }
151 uses tapi-common:resource-spec;
152 description "none";
153 }
154 grouping notification-channel {
155 leaf stream-address {
156 type string;
157 config false;
158 description "The address/location/URI of the channel/stream to which the subscribed notifications are published.
159 This specifics of this is typically dependent on the implementation protocol & mechanism and hence is typed as a string.";
160 }
161 leaf next-sequence-no {
162 type uint64;
163 config false;
164 description "The sequence number of the next notification that will be published on the channel";
165 }
166 uses tapi-common:local-class;
167 description "none";
168 }
169 grouping notification-context {
170 list notif-subscription {
171 key 'uuid';
172 uses notification-subscription-service;
173 description "none";
174 }
175 list notification {
176 key 'uuid';
177 config false;
178 uses notification;
179 description "none";
180 }
181 description "none";
182 }
183 grouping alarm-info {
184 leaf is-transient {
185 type boolean;
186 config false;
187 description "none";
188 }
189 leaf pervceived-severity {
190 type perceived-serverity-type;
191 config false;
192 description "none";
193 }
194 leaf probable-cause {
195 type string;
196 config false;
197 description "none";
198 }
199 leaf service-affecting {
200 type service-affecting;
201 description "none";
202 }
203 description "none";
204 }
205 grouping tca-info {
206 leaf is-transient {
207 type boolean;
208 config false;
209 description "none";
210 }
211 leaf threshold-crossing {
212 type threshold-crossing-type;
213 description "none";
214 }
215 leaf threshold-parameter {
216 type string;
217 config false;
218 description "none";
219 }
220 leaf threshold-value {
221 type uint64;
222 config false;
223 description "none";
224 }
225 description "none";
226 }
227
228 /***********************
229 * package type-definitions
230 **********************/
231 grouping name-and-value-change {
232 leaf value-name {
233 type string;
234 description "The name of the value. The value need not have a name.";
235 }
236 leaf old-value {
237 type string;
238 description "The value";
239 }
240 leaf new-value {
241 type string;
242 description "The value";
243 }
244 description "A scoped name-value triple, including old value and new value";
245 }
246 typedef notification-type {
247 type enumeration {
248 enum object-creation {
249 description "Not a normal state. The system is unable to determine the correct value.";
250 }
251 enum object-deletion {
252 description "none";
253 }
254 enum attribute-value-change {
255 description "none";
256 }
257 enum alarm-event {
258 description "none";
259 }
260 enum threshold-crossing-alert {
261 description "none";
262 }
263 }
264 description "The orientation of flow at the Port of a Forwarding entity";
265 }
266 typedef object-type {
267 type enumeration {
268 enum topology {
269 description "none";
270 }
271 enum node {
272 description "none";
273 }
274 enum link {
275 description "none";
276 }
277 enum connection {
278 description "none";
279 }
280 enum path {
281 description "none";
282 }
283 enum connectivity-service {
284 description "none";
285 }
286 enum virtual-network-service {
287 description "none";
288 }
289 enum path-computation-service {
290 description "none";
291 }
292 enum node-edge-point {
293 description "none";
294 }
295 enum service-interface-point {
296 description "none";
297 }
298 enum connection-end-point {
299 description "none";
300 }
301 }
302 description "The orientation of flow at the Port of a Forwarding entity";
303 }
304 typedef source-indicator {
305 type enumeration {
306 enum resource-operation {
307 description "none";
308 }
309 enum management-operation {
310 description "none";
311 }
312 enum unknown {
313 description "none";
314 }
315 }
316 description "none";
317 }
318 typedef subscription-state {
319 type enumeration {
320 enum suspended {
321 description "none";
322 }
323 enum active {
324 description "none";
325 }
326 }
327 description "none";
328 }
329 typedef perceived-serverity-type {
330 type enumeration {
331 enum critical {
332 description "none";
333 }
334 enum major {
335 description "none";
336 }
337 enum minor {
338 description "none";
339 }
340 enum warning {
341 description "none";
342 }
343 enum cleared {
344 description "none";
345 }
346 }
347 description "none";
348 }
349 typedef threshold-crossing-type {
350 type enumeration {
351 enum threshold-above {
352 description "none";
353 }
354 enum threshold-below {
355 description "none";
356 }
357 enum cleared {
358 description "none";
359 }
360 }
361 description "none";
362 }
363 typedef service-affecting {
364 type enumeration {
365 enum service-affecting {
366 description "none";
367 }
368 enum not-service-affecting {
369 description "none";
370 }
371 enum unknown {
372 description "none";
373 }
374 }
375 description "none";
376 }
377
378 /***********************
379 * package interfaces
380 **********************/
381 rpc get-supported-notification-types {
382 description "none";
383 output {
384 leaf-list supported-notification-types {
385 type notification-type;
386 min-elements 1;
387 description "none";
388 }
389 leaf-list supported-object-types {
390 type object-type;
391 min-elements 1;
392 description "none";
393 }
394 }
395 }
396 rpc create-notification-subscription-service {
397 description "none";
398 input {
399 container subscription-filter {
400 uses subscription-filter;
401 description "none";
402 }
403 leaf subscription-state {
404 type subscription-state;
405 description "none";
406 }
407 }
408 output {
409 container subscription-service {
410 uses notification-subscription-service;
411 description "none";
412 }
413 }
414 }
415 rpc update-notification-subscription-service {
416 description "none";
417 input {
418 leaf subscription-id-or-name {
419 type string;
420 description "none";
421 }
422 container subscription-filter {
423 uses subscription-filter;
424 description "none";
425 }
426 leaf subscription-state {
427 type subscription-state;
428 description "none";
429 }
430 }
431 output {
432 container subscription-service {
433 uses notification-subscription-service;
434 description "none";
435 }
436 }
437 }
438 rpc delete-notification-subscription-service {
439 description "none";
440 input {
441 leaf subscription-id-or-name {
442 type string;
443 description "none";
444 }
445 }
446 output {
447 container subscription-service {
448 uses notification-subscription-service;
449 description "none";
450 }
451 }
452 }
453 rpc get-notification-subscription-service-details {
454 description "none";
455 input {
456 leaf subscription-id-or-name {
457 type string;
458 description "none";
459 }
460 }
461 output {
462 container subscription-service {
463 uses notification-subscription-service;
464 description "none";
465 }
466 }
467 }
468 rpc get-notification-subscription-service-list {
469 description "none";
470 output {
471 list subscription-service {
472 uses notification-subscription-service;
473 description "none";
474 }
475 }
476 }
477 rpc get-notification-list {
478 description "none";
479 input {
480 leaf subscription-id-or-name {
481 type string;
482 description "none";
483 }
484 leaf time-period {
485 type string;
486 description "none";
487 }
488 }
489 output {
490 list notification {
491 uses notification;
492 description "none";
493 }
494 }
495 }
496
497}