blob: 467779e440d862834e0e040a600c98ecd5d1f1dc [file] [log] [blame]
hirokid8fd7862018-10-09 15:24:24 +09001module tapi-oam {
2 namespace "urn:onf:otcc:yang:tapi-oam";
3 prefix tapi-oam;
4 import tapi-common {
5 prefix tapi-common;
6 }
7 import tapi-connectivity {
8 prefix tapi-connectivity;
9 }
10 import tapi-topology {
11 prefix tapi-topology;
12 }
13 organization "ONF OTCC (Open Transport Configuration & Control) Project";
14 contact "
15 Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
16 Project List: <mailto:transport-api@opennetworking.org>
17 Editor: Karthik Sethuraman
18 <mailto:karthik.sethuraman@necam.com>";
19 description "
20 This module contains TAPI OAM Model definitions.
21 Source: TapiOam.uml
22 Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.
23 License: This module is distributed under the Apache License 2.0";
24 revision 2018-10-16 {
25 description "ONF Transport API version 2.1.0.
26 - The TAPI YANG models included in this TAPI release (v2.1.0) are a *normative* part of the TAPI SDK.
27 - The YANG specifications have been generated from the corresponding UML model using the [ONF EAGLE UML2YANG mapping tool]
28 <https://github.com/OpenNetworkingFoundation/EagleUmlYang>
29 and further edited manually to comply with the [ONF IISOMI UML2YANG mapping guidelines]
30 <https://wiki.opennetworking.org/display/OIMT/UML+-+YANG+Guidelines>
31 - Status of YANG model artifacts can be determined by referring to the corresponding UML artifacts.
32 As described in the UML models, some artifacts are considered *experimental*, and thus the corresponding YANG artifacts.
33 - The ONF TAPI release process does not guarantee backward compatibility of YANG models across major versions of TAPI releases.
34 The YANG model backward compatibility criteria are outlined in section 11 of <https://tools.ietf.org/html/rfc7950>.
35 YANG models included in this release are not backward compatible with previous TAPI releases.
36 - Changes included in this TAPI release (v2.1.0) are listed in
37 <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.0.md>";
38 reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model
39 <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";
40 }
41 revision 2018-03-07 {
42 description "ONF Transport API version 2.0.2
43 This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
44 Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.2.md>";
45 reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
46 <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.2/UML>";
47 }
48 revision 2018-02-16 {
49 description "ONF Transport API version 2.0.1
50 This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
51 Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.1.md>";
52 reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
53 <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.1/UML>";
54 }
55 revision 2018-01-02 {
56 description "ONF Transport API version 2.0.0
57 This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
58 Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.0.md>";
59 reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
60 <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.0/UML>";
61 }
62 augment "/tapi-common:context" {
63 container oam-context {
64 uses oam-context;
65 description "Augments the base TAPI Context with OamService information";
66 }
67 description "Augments the base TAPI Context with OamService information";
68 }
69 augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:cep-list/tapi-connectivity:connection-end-point" {
70 container mep-mip-list {
71 uses mep-mip-list;
72 description "none";
73 }
74 description "none";
75 }
76
77 /*************************
78 * definitions of references
79 *************************/
80 grouping oam-service-ref {
81 leaf oam-service-uuid {
82 type leafref {
83 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-service/tapi-oam:uuid';
84 }
85 description "none";
86 }
87 description "none";
88 }
89
90 grouping oam-service-end-point-ref {
91 uses oam-service-ref;
92 leaf oam-service-end-point-local-id {
93 type leafref {
94 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-service/tapi-oam:end-point/tapi-oam:local-id';
95 }
96 description "none";
97 }
98 description "none";
99 }
100
101 grouping meg-ref {
102 leaf meg-uuid {
103 type leafref {
104 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:meg/tapi-oam:uuid';
105 }
106 description "none";
107 }
108 description "none";
109 }
110
111 grouping maintenance-entity-ref {
112 uses meg-ref;
113 leaf maintenance-entity-local-id {
114 type leafref {
115 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:meg/tapi-oam:me/tapi-oam:local-id';
116 }
117 description "none";
118 }
119 description "none";
120 }
121
122 grouping mep-ref {
123 uses meg-ref;
124 leaf mep-local-id {
125 type leafref {
126 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:meg/tapi-oam:mep/tapi-oam:local-id';
127 }
128 description "none";
129 }
130 description "none";
131 }
132
133 grouping mip-ref {
134 uses meg-ref;
135 leaf mip-local-id {
136 type leafref {
137 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:meg/tapi-oam:mip/tapi-oam:local-id';
138 }
139 description "none";
140 }
141 description "none";
142 }
143
144 grouping oam-job-ref {
145 leaf oam-job-uuid {
146 type leafref {
147 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-job/tapi-oam:uuid';
148 }
149 description "none";
150 }
151 description "none";
152 }
153
154 grouping pm-current-data-ref {
155 uses oam-job-ref;
156 leaf pm-current-data-local-id {
157 type leafref {
158 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-job/tapi-oam:pm-current-data/tapi-oam:local-id';
159 }
160 description "none";
161 }
162 description "none";
163 }
164
165 grouping pm-history-data-ref {
166 uses pm-current-data-ref;
167 leaf pm-history-data-local-id {
168 type leafref {
169 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-job/tapi-oam:pm-current-data/tapi-oam:pm-history-data/tapi-oam:local-id';
170 }
171 description "none";
172 }
173 description "none";
174 }
175
176 grouping oam-profile-ref {
177 leaf oam-profile-uuid {
178 type leafref {
179 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-profile/tapi-oam:uuid';
180 }
181 description "none";
182 }
183 description "none";
184 }
185
186 grouping pm-threshold-data-ref {
187 uses oam-profile-ref;
188 leaf pm-threshold-data-local-id {
189 type leafref {
190 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-profile/tapi-oam:pm-threshold-data/tapi-oam:local-id';
191 }
192 description "none";
193 }
194 description "none";
195 }
196
197 grouping pm-bin-data-ref {
198 uses oam-profile-ref;
199 leaf pm-bin-data-local-id {
200 type leafref {
201 path '/tapi-common:context/tapi-oam:oam-context/tapi-oam:oam-profile/tapi-oam:pm-bin-data/tapi-oam:local-id';
202 }
203 description "none";
204 }
205 description "none";
206 }
207
208 /***********************
209 * package object-classes
210 **********************/
211 grouping mep {
212 leaf layer-protocol-name {
213 type tapi-common:layer-protocol-name;
214 config false;
215 description "none";
216 }
217 leaf direction {
218 type tapi-common:termination-direction;
219 config false;
220 description "none";
221 }
222 leaf mep-identifier {
223 type string;
224 config false;
225 description "none";
226 }
227 leaf-list peer-mep-identifier {
228 type string;
229 config false;
230 min-elements 1;
231 description "none";
232 }
233 uses tapi-common:local-class;
234 uses tapi-common:operational-state-pac;
235 description "none";
236 }
237 grouping oam-job {
238 list oam-service-end-point {
239 uses oam-service-end-point-ref;
240 key 'oam-service-uuid oam-service-end-point-local-id';
241 min-elements 1;
242 description "none";
243 }
244 container oam-profile {
245 uses oam-profile-ref;
246 description "none";
247 }
248 list pm-current-data {
249 key 'local-id';
250 config false;
251 uses pm-current-data;
252 description "Granularity period of the CurrentData identifies the specific CurrentData instance in the scope of this OamJob.
253 For example, typically at least
254 one 15min and
255 one 24hr;
256 optionally one additional configurable (< 15min)";
257 }
258 leaf oam-job-type {
259 type oam-job-type;
260 description "none";
261 }
262 container schedule {
263 uses tapi-common:time-range;
264 description "none";
265 }
266 leaf creation-time {
267 type tapi-common:date-and-time;
268 config false;
269 description "none";
270 }
271 uses tapi-common:global-class;
272 uses tapi-common:admin-state-pac;
273 description "none";
274 }
275 grouping meg {
276 list mep {
277 key 'local-id';
278 config false;
279 uses mep;
280 description "1. ME may have 0 MEPs (case of transit domains where at least 1 MIP is present)
281 2. ME may have 1 MEP (case of edge domaind, where the peer MEP is ouside the managed domain)
282 3. ME may have 2 MEPs";
283 }
284 list mip {
285 key 'local-id';
286 config false;
287 uses mip;
288 description "ME may 0, 1, or more MIPs";
289 }
290 leaf layer-protocol-name {
291 type tapi-common:layer-protocol-name;
292 config false;
293 description "none";
294 }
295 leaf direction {
296 type tapi-common:forwarding-direction;
297 config false;
298 description "none";
299 }
300 leaf meg-level {
301 type uint64;
302 config false;
303 description "none";
304 }
305 leaf meg-identifier {
306 type string;
307 config false;
308 description "none";
309 }
310 uses tapi-common:resource-spec;
311 uses tapi-common:operational-state-pac;
312 description "none";
313 }
314 grouping mip {
315 leaf layer-protocol-name {
316 type tapi-common:layer-protocol-name;
317 config false;
318 description "none";
319 }
320 uses tapi-common:local-class;
321 description "none";
322 }
323 grouping oam-service {
324 list end-point {
325 key 'local-id';
326 min-elements 2;
327 uses oam-service-end-point;
328 description "none";
329 }
330 container meg {
331 uses meg-ref;
332 config false;
333 description "none";
334 }
335 container oam-profile {
336 uses oam-profile-ref;
337 description "none";
338 }
339 uses tapi-common:service-spec;
340 uses tapi-common:admin-state-pac;
341 uses oam-constraint;
342 description "none";
343 }
344 grouping oam-context {
345 list oam-service {
346 key 'uuid';
347 uses oam-service;
348 description "none";
349 }
350 list meg {
351 key 'uuid';
352 config false;
353 uses meg;
354 description "none";
355 }
356 list oam-job {
357 key 'uuid';
358 uses oam-job;
359 description "none";
360 }
361 list oam-profile {
362 key 'uuid';
363 uses oam-profile;
364 description "none";
365 }
366 description "none";
367 }
368 grouping oam-service-end-point {
369 container service-interface-point {
370 uses tapi-common:service-interface-point-ref;
371 description "none";
372 }
373 container connectivity-service-end-point {
374 uses tapi-connectivity:connectivity-service-end-point-ref;
375 description "none";
376 }
377 container mep {
378 uses mep-ref;
379 config false;
380 description "none";
381 }
382 container mip {
383 uses mip-ref;
384 config false;
385 description "none";
386 }
387 leaf layer-protocol-name {
388 type tapi-common:layer-protocol-name;
389 description "none";
390 }
391 leaf direction {
392 type tapi-common:port-direction;
393 description "none";
394 }
395 leaf mep-identifier {
396 type string;
397 description "This attribute contains the identifier of the MEP.
398 This attribute is empty in case the OSEP relates to the provisioing of an MIP.
399 ";
400 }
401 leaf-list peer-mep-identifier {
402 type string;
403 description "This attribute models the MI_PeerMEP_ID[i] defined in G.8021 and configured as specified in G.8051. It provides the identifiers of the MEPs which are peer to the subject MEP.
404 This attribute is not specified in case the OSEP relates to the provisioing of an MIP.
405 In case of P2P, there is only one peer";
406 }
407 uses tapi-common:local-class;
408 uses tapi-common:admin-state-pac;
409 description "none";
410 }
411 grouping mep-mip-list {
412 list mip {
413 uses mip-ref;
414 key 'meg-uuid mip-local-id';
415 description "none";
416 }
417 list mep {
418 uses mep-ref;
419 key 'meg-uuid mep-local-id';
420 description "none";
421 }
422 description "none";
423 }
424 grouping oam-constraint {
425 leaf layer-protocol-name {
426 type tapi-common:layer-protocol-name;
427 description "none";
428 }
429 leaf direction {
430 type tapi-common:forwarding-direction;
431 description "none";
432 }
433 leaf meg-level {
434 type uint64;
435 description "none";
436 }
437 description "none";
438 }
439 grouping pm-current-data {
440 list pm-history-data {
441 key 'local-id';
442 config false;
443 uses pm-history-data;
444 description "in case of 24hr Current Data, at least 1 History Data.
445 In case of 15min Current Data, at least 16 History Data.
446 In case of <15min, the number of History Data shall be able to cover a span of 4 hours.";
447 }
448 container granularity-period {
449 uses tapi-common:time-period;
450 description "none";
451 }
452 leaf timestamp {
453 type tapi-common:date-and-time;
454 config false;
455 description "This attribute indicates the start of the current monitoring interval.
456 The value is bound to the quarter of an hour in case of a 15 minute interval and bound to the hour in case of a 24 hour interval.";
457 }
458 container elapsed-time {
459 uses tapi-common:time-interval;
460 description "none";
461 }
462 leaf suspect-interval-flag {
463 type boolean;
464 description "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
465 – Suspect data were detected by the actual resource doing data collection.
466 – Transition of the administrativeState attribute to/from the 'lock' state.
467 – Transition of the operationalState to/from the 'disabled' state.
468 – Scheduler setting that inhibits the collection function.
469 – The performance counters were reset during the interval.
470 – The currentData (or subclass) object instance was created during the monitoring period.";
471 }
472 uses tapi-common:local-class;
473 description "none";
474 }
475 grouping pm-history-data {
476 container granularity-period {
477 uses tapi-common:time-period;
478 description "none";
479 }
480 leaf period-end-time {
481 type tapi-common:date-and-time;
482 description "none";
483 }
484 leaf suspect-interval-flag {
485 type boolean;
486 config false;
487 description "This attribute indicates that the performance data may not be reliable.";
488 }
489 uses tapi-common:local-class;
490 description "none";
491 }
492 grouping oam-profile {
493 list pm-threshold-data {
494 key 'local-id';
495 min-elements 1;
496 uses pm-threshold-data;
497 description "none";
498 }
499 list pm-bin-data {
500 key 'local-id';
501 min-elements 1;
502 uses pm-bin-data;
503 description "none";
504 }
505 uses tapi-common:global-class;
506 description "none";
507 }
508 grouping pm-threshold-data {
509 container granularity-period {
510 uses tapi-common:time-period;
511 description "none";
512 }
513 leaf is-transient {
514 type boolean;
515 description "none";
516 }
517 uses tapi-common:local-class;
518 description "none";
519 }
520 grouping pm-bin-data {
521 container granularity-period {
522 uses tapi-common:time-period;
523 description "none";
524 }
525 uses tapi-common:local-class;
526 description "none";
527 }
528
529 /***********************
530 * package type-definitions
531 **********************/
532 identity OAM_JOB_TYPE {
533 description "none";
534 }
535 typedef oam-job-type {
536 type identityref {
537 base OAM_JOB_TYPE;
538 }
539 description "none";
540 }
541
542 /***********************
543 * package interfaces
544 **********************/
545 rpc create-oam-service {
546 description "none";
547 input {
548 list end-point {
Ai Hamano933b0fe2018-11-30 11:22:37 +0900549 key 'local-id';
hirokid8fd7862018-10-09 15:24:24 +0900550 min-elements 2;
551 uses oam-service-end-point;
552 description "none";
553 }
554 container oam-constraint {
555 uses oam-constraint;
556 description "none";
557 }
558 leaf state {
559 type string;
560 description "none";
561 }
562 }
563 output {
564 container service {
565 uses oam-service;
566 description "none";
567 }
568 }
569 }
570 rpc delete-oam-service {
571 description "none";
572 input {
573 leaf service-id {
574 type string;
575 description "none";
576 }
577 }
578 }
579 rpc get-oam-service {
580 description "none";
581 input {
582 leaf service-id {
583 type string;
584 description "none";
585 }
586 }
587 output {
588 container service {
589 uses oam-service;
590 description "none";
591 }
592 }
593 }
594 rpc create-oam-job {
595 description "none";
596 input {
597 leaf oam-job-type {
598 type oam-job-type;
599 description "none";
600 }
601 list oam-service-end-point {
Ai Hamano933b0fe2018-11-30 11:22:37 +0900602 key 'local-id';
hirokid8fd7862018-10-09 15:24:24 +0900603 min-elements 2;
604 uses oam-service-end-point;
605 description "none";
606 }
607 container oam-profile {
608 uses oam-profile;
609 description "none";
610 }
611 leaf state {
612 type string;
613 description "none";
614 }
615 leaf schedule {
616 type string;
617 description "none";
618 }
619 }
620 output {
621 container oam-job {
622 uses oam-job;
623 description "none";
624 }
625 }
626 }
627 rpc get-oam-job {
628 description "none";
629 input {
630 leaf job-id {
631 type string;
632 description "none";
633 }
634 }
635 output {
636 container oam-job {
637 uses oam-job;
638 description "none";
639 }
640 }
641 }
642 rpc get-oam-service-list {
643 description "none";
644 output {
645 list service {
Ai Hamano933b0fe2018-11-30 11:22:37 +0900646 key 'uuid';
hirokid8fd7862018-10-09 15:24:24 +0900647 uses oam-service;
648 description "none";
649 }
650 }
651 }
652 rpc get-meg {
653 description "none";
654 input {
655 leaf service-id {
656 type string;
657 description "none";
658 }
659 }
660 output {
661 container meg {
662 uses meg;
663 description "none";
664 }
665 }
666 }
667 rpc update-oam-service {
668 description "none";
669 input {
670 leaf service-id {
671 type string;
672 description "none";
673 }
674 list end-point {
Ai Hamano933b0fe2018-11-30 11:22:37 +0900675 key 'local-id';
hirokid8fd7862018-10-09 15:24:24 +0900676 uses oam-service-end-point;
677 description "none";
678 }
679 container oam-constraint {
680 uses oam-constraint;
681 description "none";
682 }
683 leaf state {
684 type string;
685 description "none";
686 }
687 }
688 output {
689 container service {
690 uses oam-service;
691 description "none";
692 }
693 }
694 }
695 rpc delete-oam-job {
696 description "none";
697 input {
698 leaf job-id {
699 type string;
700 description "none";
701 }
702 }
703 }
704 rpc update-oam-job {
705 description "none";
706 input {
707 leaf job-id {
708 type string;
709 description "none";
710 }
711 container oam-profile {
712 uses oam-profile;
713 description "none";
714 }
715 leaf state {
716 type string;
717 description "none";
718 }
719 leaf schedule {
720 type string;
721 description "none";
722 }
723 }
724 output {
725 container oam-job {
726 uses oam-job;
727 description "none";
728 }
729 }
730 }
731 rpc create-oam-service-end-point {
732 description "none";
733 input {
734 leaf service-id {
735 type string;
736 description "none";
737 }
738 leaf sip-id {
739 type string;
740 description "none";
741 }
742 leaf c-sep-id {
743 type string;
744 description "none";
745 }
746 leaf layer {
747 type string;
748 description "none";
749 }
750 leaf direction {
751 type string;
752 description "none";
753 }
754 leaf state {
755 type string;
756 description "none";
757 }
758 leaf mep-identifier {
759 type string;
760 description "none";
761 }
762 leaf-list peer-mep-identifier {
763 type string;
764 description "none";
765 }
766 }
767 output {
768 container end-point {
769 uses oam-service-end-point;
770 description "none";
771 }
772 }
773 }
774 rpc delete-oam-service-end-point {
775 description "none";
776 input {
777 leaf service-id {
778 type string;
779 description "none";
780 }
781 leaf o-sep-id {
782 type string;
783 description "none";
784 }
785 }
786 }
787 rpc update-oam-service-end-point {
788 description "none";
789 input {
790 leaf service-id {
791 type string;
792 description "none";
793 }
794 leaf o-sep-id {
795 type string;
796 description "none";
797 }
798 leaf state {
799 type string;
800 description "none";
801 }
802 }
803 output {
804 container end-point {
805 uses oam-service-end-point;
806 description "none";
807 }
808 }
809 }
810 rpc get-oam-service-end-point {
811 description "none";
812 input {
813 leaf service-id {
814 type string;
815 description "none";
816 }
817 leaf o-sep-id {
818 type string;
819 description "none";
820 }
821 }
822 output {
823 container end-point {
824 uses oam-service-end-point;
825 description "none";
826 }
827 }
828 }
829
830}