blob: 40374fefb968491a361b37c0d0bb988c83889030 [file] [log] [blame]
chengfan8ea6a562016-11-26 16:37:02 +08001module ietf-te {
2
3 namespace "urn:ietf:params:xml:ns:yang:ietf-te";
4
5 /* Replace with IANA when assigned */
6 prefix "te";
7
8 /* Import TE generic types */
9 import ietf-te-types {
10 prefix te-types;
11 }
12
13 import ietf-inet-types {
14 prefix inet;
15 }
16
17 organization
18 "IETF Traffic Engineering Architecture and Signaling (TEAS)
19 Working Group";
20
21 contact
22 "WG Web: <http://tools.ietf.org/wg/teas/>
23 WG List: <mailto:teas@ietf.org>
24
25 WG Chair: Lou Berger
26 <mailto:lberger@labn.net>
27
28 WG Chair: Vishnu Pavan Beeram
29 <mailto:vbeeram@juniper.net>
30
31 Editor: Tarek Saad
32 <mailto:tsaad@cisco.com>
33
34 Editor: Rakesh Gandhi
35 <mailto:rgandhi@cisco.com>
36
37 Editor: Vishnu Pavan Beeram
38 <mailto:vbeeram@juniper.net>
39
40 Editor: Himanshu Shah
41 <mailto:hshah@ciena.com>
42
43 Editor: Xufeng Liu
44 <mailto:xufeng.liu@ericsson.com>
45
46 Editor: Xia Chen
47 <mailto:jescia.chenxia@huawei.com>
48
49 Editor: Raqib Jones
50 <mailto:raqib@Brocade.com>
51
52 Editor: Bin Wen
53 <mailto:Bin_Wen@cable.comcast.com>";
54
55 description
56 "YANG data module for TE configuration,
57 state, RPC and notifications.";
58
59 revision "2016-07-05" {
60 description "Latest update to TE generic YANG module.";
61 reference "TBD";
62 }
63
64 typedef tunnel-ref {
65 type leafref {
66 path "/te:te/te:tunnels/te:tunnel/te:name";
67 }
68 description
69 "This type is used by data models that need to reference
70 configured TE tunnel.";
71 }
72
73 /**
74 * TE tunnel generic groupings
75 */
76
77 grouping p2p-secondary-path-params {
78 description
79 "tunnel path properties.";
80 container config {
81 description
82 "Configuration parameters relating to
83 tunnel properties";
84 uses path-properties_config;
85 uses path-params_config;
86 }
87 container state {
88 config false;
89 description
90 "State information associated with tunnel
91 properties";
92 uses path-properties_config;
93 uses path-params_config;
94 uses p2p-secondary-path-params_state;
95 }
96 }
97
98 grouping p2p-primary-path-params {
99 description
100 "TE tunnel primary path properties grouping";
101 container config {
102 description
103 "Configuration parameters relating to
104 tunnel properties";
105 uses path-properties_config;
106 uses path-params_config;
107 }
108 container state {
109 config false;
110 description
111 "State information associated with tunnel
112 properties";
113 uses path-params_config;
114 uses p2p-primary-path-params_state;
115 }
116 }
117
118 grouping p2p-primary-path-params_state {
119 description "TE primary path state parameters";
120 list lsp {
121 key
122 "source destination tunnel-id lsp-id "+
123 "extended-tunnel-id type";
124 description "List of LSPs associated with the tunnel.";
125
126 leaf source {
127 type leafref {
128 path "../../../../../../lsps-state/lsp/source";
129 }
130 description
131 "Tunnel sender address extracted from
132 SENDER_TEMPLATE object";
133 reference "RFC3209";
134 }
135 leaf destination {
136 type leafref {
137 path "../../../../../../lsps-state/lsp/destination";
138 }
139 description
140 "Tunnel endpoint address extracted from
141 SESSION object";
142 reference "RFC3209";
143 }
144 leaf tunnel-id {
145 type leafref {
146 path "../../../../../../lsps-state/lsp/tunnel-id";
147 }
148 description
149 "Tunnel identifier used in the SESSION
150 that remains constant over the life
151 of the tunnel.";
152 reference "RFC3209";
153 }
154 leaf lsp-id {
155 type leafref {
156 path "../../../../../../lsps-state/lsp/lsp-id";
157 }
158 description
159 "Identifier used in the SENDER_TEMPLATE
160 and the FILTER_SPEC that can be changed
161 to allow a sender to share resources with
162 itself.";
163 reference "RFC3209";
164 }
165 leaf extended-tunnel-id {
166 type leafref {
167 path "../../../../../../lsps-state/lsp/extended-tunnel-id";
168 }
169 description
170 "Extended Tunnel ID of the LSP.";
171 reference "RFC3209";
172 }
173 leaf type {
174 type leafref {
175 path "../../../../../../lsps-state/lsp/type";
176 }
177 description "LSP type P2P or P2MP";
178 }
179 }
180 }
181
182 grouping p2p-secondary-path-params_state {
183 description "TE secondary path state parameters";
184 list lsp {
185 key "source";
186 description "List of LSPs associated with the tunnel.";
187
188 leaf source {
189 type leafref {
190 path "../../../../../../../lsps-state/lsp/source";
191 }
192 description
193 "Tunnel sender address extracted from
194 SENDER_TEMPLATE object";
195 reference "RFC3209";
196 }
197 leaf destination {
198 type leafref {
199 path "../../../../../../../lsps-state/lsp/destination";
200 }
201 description
202 "Tunnel endpoint address extracted from
203 SESSION object";
204 reference "RFC3209";
205 }
206 leaf tunnel-id {
207 type leafref {
208 path "../../../../../../../lsps-state/lsp/tunnel-id";
209 }
210 description
211 "Tunnel identifier used in the SESSION
212 that remains constant over the life
213 of the tunnel.";
214 reference "RFC3209";
215 }
216 leaf lsp-id {
217 type leafref {
218 path "../../../../../../../lsps-state/lsp/lsp-id";
219 }
220 description
221 "Identifier used in the SENDER_TEMPLATE
222 and the FILTER_SPEC that can be changed
223 to allow a sender to share resources with
224 itself.";
225 reference "RFC3209";
226 }
227 leaf extended-tunnel-id {
228 type leafref {
229 path "../../../../../../../lsps-state/lsp/extended-tunnel-id";
230 }
231 description
232 "Extended Tunnel ID of the LSP.";
233 reference "RFC3209";
234 }
235 leaf type {
236 type leafref {
237 path "../../../../../../../lsps-state/lsp/type";
238 }
239 description "LSP type P2P or P2MP";
240 }
241 }
242 }
243
244 grouping path-params_config {
245 description
246 "TE tunnel path parameters configuration grouping";
247 leaf path-named-constraint {
248 if-feature te-types:named-path-constraints;
249 type string;
250 description
251 "Reference to a globally defined named path
252 constraint set";
253 }
254 uses te-types:tunnel-path-selection;
255 choice type {
256 description
257 "Describes the path type";
258 case dynamic {
259 leaf dynamic {
260 type empty;
261 description
262 "A CSPF dynamically computed path";
263 }
264 }
265 case explicit {
266 leaf explicit-path-name {
267 type string;
268 description
269 "The explicit-path name";
270 }
271
272 list explicit-route-objects {
273 key "index";
274 description
275 "List of explicit route objects";
276 leaf index {
277 type uint8 {
278 range "0..255";
279 }
280 description
281 "Index of this explicit route object";
282 }
283 leaf explicit-route-usage {
284 type identityref {
285 base te-types:route-usage-type;
286 }
287 description "An explicit-route hop action.";
288 }
289 uses te-types:explicit-route-subobject;
290 }
291 }
292 }
293 leaf no-cspf {
294 type empty;
295 description
296 "Indicates no CSPF is to be attempted on this
297 path.";
298 }
299 leaf lockdown {
300 type empty;
301 description
302 "Indicates no reoptimization to be attempted for
303 this path.";
304 }
305 }
306
307 /* TE tunnel configuration data */
308 grouping tunnel-params_config {
309 description
310 "Configuration parameters relating to TE tunnel";
311 leaf name {
312 type string;
313 description "TE tunnel name.";
314 }
315 leaf type {
316 type identityref {
317 base te-types:tunnel-type;
318 }
319 description "TE tunnel type.";
320 }
321 leaf identifier {
322 type uint16;
323 description
324 "TE tunnel Identifier.";
325 }
326 leaf description {
327 type string;
328 description
329 "Textual description for this TE tunnel";
330 }
331 leaf lsp-priority-setup {
332 type uint8 {
333 range "0..7";
334 }
335 description
336 "TE LSP setup priority";
337 }
338 leaf lsp-priority-hold {
339 type uint8 {
340 range "0..7";
341 }
342 description
343 "TE LSP hold priority";
344 }
345 leaf lsp-protection-type {
346 type identityref {
347 base te-types:lsp-prot-type;
348 }
349 description "LSP protection type.";
350 }
351 leaf admin-status {
352 type identityref {
353 base te-types:state-type;
354 }
355 default te-types:state-up;
356 description "TE tunnel administrative state.";
357 }
358 leaf source {
359 type inet:ip-address;
360 description
361 "TE tunnel source address.";
362 }
363 leaf destination {
364 /* Add when check */
365 type inet:ip-address;
366 description
367 "P2P tunnel destination address";
368 }
369 leaf src-tp-id {
370 type binary;
371 description
372 "TE tunnel source termination point identifier.";
373 }
374 leaf dst-tp-id {
375 /* Add when check */
376 type binary;
377 description
378 "TE tunnel destination termination point identifier.";
379 }
380 container hierarchical-link-id {
381 description
382 "Identifies a hierarchical link (in server layer)
383 that this tunnel is associated with.";
384 leaf local-te-node-id {
385 type te-types:te-node-id;
386 description
387 "Local TE node identifier";
388 }
389 leaf local-te-link-tp-id {
390 type te-types:te-tp-id;
391 description
392 "Local TE link termination point identifier";
393 }
394 leaf remote-te-node-id {
395 type te-types:te-node-id;
396 description
397 "Remote TE node identifier";
398 }
399 leaf te-topology-id {
400 type te-types:te-topology-id;
401 description
402 "It is presumed that a datastore will contain many
403 topologies. To distinguish between topologies it is
404 vital to have UNIQUE topology identifiers.";
405 }
406 }
407 uses te-types:tunnel-bidir-assoc-properties;
408 }
409
410 grouping tunnel-params_state {
411 description
412 "State parameters relating to TE tunnel";
413 leaf oper-status {
414 type identityref {
415 base te-types:state-type;
416 }
417 description "TE tunnel operational state.";
418 }
419 }
420
421 grouping path-properties_config {
422 description "TE path properties grouping";
423 leaf name {
424 type string;
425 description "TE path name";
426 }
427 leaf preference {
428 type uint8 {
429 range "1..255";
430 }
431 description
432 "Specifies a preference for this path. The lower the
433 number higher the preference";
434 }
435 }
436
437 /* TE tunnel configuration/state grouping */
438 grouping tunnel-properties {
439 description
440 "Top level grouping for tunnel properties.";
441 container config {
442 description
443 "Configuration parameters relating to
444 tunnel properties";
445 uses tunnel-params_config;
446 }
447 container state {
448 config false;
449 description
450 "State information associated with tunnel
451 properties";
452 uses tunnel-params_config;
453 uses tunnel-params_state;
454 }
455 list primary-paths {
456 key "name";
457 description
458 "List of primary paths for this tunnel.";
459 leaf name {
460 type leafref {
461 path "../config/name";
462 }
463 description "TE path name";
464 }
465 leaf preference {
466 type leafref {
467 path "../config/preference";
468 }
469 description
470 "Specifies a preference for this path. The lower the
471 number higher the preference";
472 }
473 uses p2p-primary-path-params;
474 list secondary-paths {
475 key "name";
476 description
477 "List of secondary paths for this tunnel.";
478 leaf name {
479 type leafref {
480 path "../config/name";
481 }
482 description "TE path name";
483 }
484 leaf preference {
485 type leafref {
486 path "../config/preference";
487 }
488 description
489 "Specifies a preference for this path. The lower the
490 number higher the preference";
491 }
492 uses p2p-secondary-path-params;
493 }
494 }
495 }
496 /*** End of TE tunnel groupings ***/
497
498 /**
499 * LSP related generic groupings
500 */
501 grouping lsp-record-route-information_state {
502 description "recorded route information grouping";
503 container lsp-record-route {
504 description "RSVP recorded route object information";
505 list record-route-subobjects {
506 when "../origin-type != 'ingress'" {
507 description "Applicable on non-ingress LSPs only";
508 }
509 key "subobject-index";
510 description "";
511 leaf subobject-index {
512 type uint32;
513 description "RRO subobject index";
514 }
515 uses te-types:record-route-subobject;
516 }
517 }
518 }
519
520 grouping lsp-properties_state {
521 description
522 "State parameters relating to LSP";
523 leaf oper-status {
524 type identityref {
525 base te-types:state-type;
526 }
527 description "LSP operational state.";
528 }
529
530 leaf origin-type {
531 type enumeration {
532 enum ingress {
533 description
534 "Origin ingress";
535 }
536 enum egress {
537 description
538 "Origin egress";
539 }
540 enum transit {
541 description
542 "transit";
543 }
544 }
545 description
546 "Origin type of LSP relative to the location
547 of the local switch in the path.";
548 }
549
550 leaf lsp-resource-status {
551 type enumeration {
552 enum primary {
553 description
554 "A primary LSP is a fully established LSP for
555 which the resource allocation has been committed
556 at the data plane";
557 }
558 enum secondary {
559 description
560 "A secondary LSP is an LSP that has been provisioned
561 in the control plane only; e.g. resource allocation
562 has not been committed at the data plane";
563 }
564 }
565 description "LSP resource allocation type";
566 reference "rfc4872, section 4.2.1";
567 }
568
569 leaf lsp-protection-role {
570 type enumeration {
571 enum working {
572 description
573 "A working LSP must be a primary LSP whilst a protecting
574 LSP can be either a primary or a secondary LSP. Also,
575 known as protected LSPs when working LSPs are associated
576 with protecting LSPs.";
577 }
578 enum protecting {
579 description
580 "A secondary LSP is an LSP that has been provisioned
581 in the control plane only; e.g. resource allocation
582 has not been committed at the data plane";
583 }
584 }
585 description "LSP role type";
586 reference "rfc4872, section 4.2.1";
587 }
588
589 leaf lsp-operational-status {
590 type empty;
591 description
592 "This bit is set when a protecting LSP is carrying the normal
593 traffic after protection switching";
594 }
595 }
596 /*** End of TE LSP groupings ***/
597
598 /**
599 * TE global generic groupings
600 */
601
602 /* Global named admin-groups configuration data */
603 grouping named-admin-groups_config {
604 description
605 "Global named administrative groups configuration
606 grouping";
607 list named-admin-groups {
608 if-feature te-types:extended-admin-groups;
609 if-feature te-types:named-extended-admin-groups;
610 key "name";
611 description
612 "List of named TE admin-groups";
613 leaf name {
614 type string;
615 description
616 "A string name that uniquely identifies a TE
617 interface named admin-group";
618 }
619 leaf bit-position {
620 type uint32;
621 description
622 "Bit position representing the administrative group";
623 }
624 }
625 }
626
627 /* Global named admin-srlgs configuration data */
628 grouping named-srlgs_config {
629 description
630 "Global named SRLGs configuration
631 grouping";
632 list named-srlgs {
633 if-feature te-types:named-srlg-groups;
634 key "name";
635 description
636 "A list of named SRLG groups";
637 leaf name {
638 type string;
639 description
640 "A string name that uniquely identifies a TE
641 interface named srlg";
642 }
643 leaf group {
644 type te-types:srlg;
645 description "An SRLG value";
646 }
647 }
648 }
649
650 /* Global named explicit-paths configuration data */
651 grouping named-explicit-paths_config {
652 description
653 "Global explicit path configuration
654 grouping";
655 list named-explicit-paths {
656 key "name";
657 description
658 "A list of explicit paths";
659 leaf name {
660 type string;
661 description
662 "A string name that uniquely identifies an
663 explicit path";
664 }
665 list explicit-route-objects {
666 key "index";
667 description
668 "List of explicit route objects";
669 leaf index {
670 type uint8 {
671 range "0..255";
672 }
673 description
674 "Index of this explicit route object";
675 }
676 leaf explicit-route-usage {
677 type identityref {
678 base te-types:route-usage-type;
679 }
680 description "An explicit-route hop action.";
681 }
682 uses te-types:explicit-route-subobject;
683 }
684 }
685 }
686
687 /* Global named paths constraints configuration data */
688 grouping named-path-constraints_config {
689 description
690 "Global named path constraints configuration
691 grouping";
692 list named-constraints {
693 if-feature te-types:named-path-constraints;
694 key "name";
695 description
696 "A list of named path constraints";
697 leaf name {
698 type string;
699 description
700 "A string name that uniquely identifies a
701 path constraint set";
702 }
703 uses te-types:tunnel-path-selection;
704 }
705 }
706
707 /* TE globals container data */
708 grouping globals-grouping {
709 description
710 "Globals TE system-wide configuration data grouping";
711 container globals {
712 description
713 "Globals TE system-wide configuration data container";
714 container config {
715 description
716 "Configuration parameters for system-wide
717 parameters";
718 uses named-admin-groups_config;
719 uses named-srlgs_config;
720 uses named-explicit-paths_config;
721 uses named-path-constraints_config;
722 }
723 container state {
724 config false;
725 description
726 "State for system-wide parameters";
727 uses named-admin-groups_config;
728 uses named-srlgs_config;
729 uses named-explicit-paths_config;
730 uses named-path-constraints_config;
731 }
732 }
733 }
734
735 /* TE tunnels container data */
736 grouping tunnels-grouping {
737 description
738 "Tunnels TE configuration data grouping";
739 container tunnels {
740 description
741 "Tunnels TE configuration data container";
742
743 list tunnel {
744 key "name type";
745 unique "identifier";
746 description "TE tunnel.";
747 leaf name {
748 type leafref {
749 path "../config/name";
750 }
751 description "TE tunnel name.";
752 }
753 leaf type {
754 type leafref {
755 path "../config/type";
756 }
757 description "TE tunnel type.";
758 }
759 leaf identifier {
760 type leafref {
761 path "../config/identifier";
762 }
763 description
764 "TE tunnel Identifier.";
765 }
766 uses tunnel-properties;
767 }
768 }
769 }
770
771 /* TE LSPs ephemeral state container data */
772 grouping lsps-state-grouping {
773 description
774 "LSPs state operational data grouping";
775 container lsps-state {
776 config "false";
777 description "LSPs operational state data.";
778
779 list lsp {
780 key
781 "source destination tunnel-id lsp-id "+
782 "extended-tunnel-id type";
783 description
784 "List of LSPs associated with the tunnel.";
785 leaf source {
786 type inet:ip-address;
787 description
788 "Tunnel sender address extracted from
789 SENDER_TEMPLATE object";
790 reference "RFC3209";
791 }
792 leaf destination {
793 type inet:ip-address;
794 description
795 "Tunnel endpoint address extracted from
796 SESSION object";
797 reference "RFC3209";
798 }
799 leaf tunnel-id {
800 type uint16;
801 description
802 "Tunnel identifier used in the SESSION
803 that remains constant over the life
804 of the tunnel.";
805 reference "RFC3209";
806 }
807 leaf lsp-id {
808 type uint16;
809 description
810 "Identifier used in the SENDER_TEMPLATE
811 and the FILTER_SPEC that can be changed
812 to allow a sender to share resources with
813 itself.";
814 reference "RFC3209";
815 }
816 leaf extended-tunnel-id {
817 type inet:ip-address;
818 description
819 "Extended Tunnel ID of the LSP.";
820 reference "RFC3209";
821 }
822 leaf type {
823 type identityref {
824 base te-types:tunnel-type;
825 }
826 description "The LSP type P2P or P2MP";
827 }
828 uses lsp-properties_state;
829 uses lsp-record-route-information_state;
830 }
831 }
832 }
833 /*** End of TE global groupings ***/
834
835 /**
836 * TE configurations container
837 */
838 container te {
839 presence "Enable TE feature.";
840 description
841 "TE global container.";
842
843 /* TE Global Configuration Data */
844 uses globals-grouping;
845
846 /* TE Tunnel Configuration Data */
847 uses tunnels-grouping;
848
849 /* TE LSPs State Data */
850 uses lsps-state-grouping;
851 }
852
853 /* TE Global RPCs/execution Data */
854 rpc globals-rpc {
855 description
856 "Execution data for TE global.";
857 }
858
859 /* TE interfaces RPCs/execution Data */
860 rpc interfaces-rpc {
861 description
862 "Execution data for TE interfaces.";
863 }
864
865 /* TE Tunnel RPCs/execution Data */
866 rpc tunnels-rpc {
867 description
868 "TE tunnels RPC nodes";
869 }
870
871 /* TE Global Notification Data */
872 notification globals-notif {
873 description
874 "Notification messages for Global TE.";
875 }
876
877 /* TE Tunnel Notification Data */
878 notification tunnels-notif {
879 description
880 "Notification messages for TE tunnels.";
881 }
882}