Add model of graceful-restart capability
[bgpcep.git] / pcep / api / src / main / yang / pcep-types.yang
1 module pcep-types {
2         yang-version 1;
3         namespace "urn:opendaylight:params:xml:ns:yang:pcep:types";
4         prefix "pcep-t";
5
6         import ieee754 { prefix ieee754; revision-date 2013-08-19; }
7         import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
8         import nps-concepts { prefix nps-c; }
9         import rsvp { prefix rsvp; revision-date 2013-08-20; }
10
11         organization "Cisco Systems, Inc.";
12         contact "Robert Varga <rovarga@cisco.com>";
13
14         description
15                 "This module contains the base data model of a PCEP message.
16                 It rolls up the definitions contained in RFC5440, RFC5520
17                 and RFC6006.
18
19                 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
20
21                 This program and the accompanying materials are made available
22                 under the terms of the Eclipse Public License v1.0 which
23                 accompanies this distribution, and is available at
24                 http://www.eclipse.org/legal/epl-v10.html";
25
26         revision "2013-10-05" {
27                 description
28                         "Initial revision.";
29                 reference "RFC5440";
30         }
31
32         // NOTE: this model uses counts bits in fields from left to right,
33         //       just as IANA does for PCEP protocol.
34
35         // Types
36         typedef protocol-version {
37                 type uint8 {
38                         range 1..7;
39                 }
40         }
41
42         typedef request-id {
43                 type uint32 {
44                         range 1..max;
45                 }
46         }
47
48         typedef plsp-id {
49                 type uint32 {
50                         range 0..1048576;
51                 }
52         }
53
54         typedef srp-id-number {
55                 type uint32 {
56                         range 1..4294967294;
57                 }
58         }
59
60         typedef of-id {
61                 type uint16;
62         }
63
64         typedef path-key {
65                 type uint16;
66         }
67
68         typedef pce-id {
69                 type union {
70                         type binary {
71                                 length 4;
72                         }
73                         type binary {
74                                 length 16;
75                         }
76                 }
77         }
78
79         typedef symbolic-path-name {
80                 type binary;
81         }
82
83         typedef operational-status {
84                 type enumeration {
85                         enum down {
86                                 value 0;
87                         }
88                         enum up {
89                                 value 1;
90                         }
91                         enum active {
92                                 value 2;
93                         }
94                         enum going-down {
95                                 value 3;
96                         }
97                         enum going-up {
98                                 value 4;
99                         }
100                 }
101         }
102
103         // TLVs
104         grouping tlv {
105                 description "Marker grouping for TLV groupings.";
106         }
107
108         grouping no-path-vector-tlv {
109                 description "NO-PATH-VECTOR TLV";
110                 reference "https://tools.ietf.org/html/rfc5440#section-7.5";
111
112                 uses tlv;
113                 leaf flags {
114                         type bits {
115                                 bit p2mp-unreachable {
116                                         position 24;
117                                 }
118                                 bit no-gco-solution {
119                                         position 25;
120                                 }
121                                 bit no-gco-migration {
122                                         position 26;
123                                 }
124                                 bit path-key {
125                                         reference "https://tools.ietf.org/html/rfc5520#section-7.4";
126                                         position 27;
127                                 }
128                                 bit chain-unavailable {
129                                         position 28;
130                                 }
131                                 bit unknown-source {
132                                         position 29;
133                                 }
134                                 bit unknown-destination {
135                                         position 30;
136                                 }
137                                 bit pce-unavailable {
138                                         position 31;
139                                 }
140                         }
141                         mandatory true;
142                 }
143         }
144
145         grouping overload-duration-tlv {
146                 description "OVERLOAD-DURATION TLV";
147                 reference "https://tools.ietf.org/html/rfc5440#section-7.14";
148                 container overload-duration {
149                         uses tlv;
150                         leaf duration {
151                                 type uint32;
152                                 units seconds;
153                         }
154                 }
155         }
156
157         grouping req-missing-tlv {
158                 description "REQ-MISSING TLV";
159                 reference "https://tools.ietf.org/html/rfc5440#section-7.5";
160                 container req-missing {
161                         uses tlv;
162                         leaf request-id {
163                                 type request-id;
164                         }
165                 }
166         }
167
168         grouping stateful-capability-tlv {
169                 description "Stateful PCE Capability TLV";
170                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.1";
171
172                 container stateful {
173                         uses tlv;
174                         leaf flags {
175                                 type bits {
176                                         bit lsp-update-capability {
177                                                 position 31;
178                                         }
179                                         bit include-db-version {
180                                                 position 30;
181                                         }
182                                         bit initiation {
183                                                 position 29;
184                                         }
185                                 }
186                         }
187                 }
188         }
189
190         grouping lsp-db-version-tlv {
191                 description "LSP State Database Version TLV";
192                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.2";
193
194                 container lsp-db-version {
195                         uses tlv;
196                         leaf version {
197                                 type uint64;
198                                 mandatory true;
199                         }
200                 }
201         }
202
203         grouping predundancy-group-id-tlv {
204                 description "PCE Redundancy Group Identifier TLV";
205                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.3";
206
207                 container predundancy-group-id {
208                         uses tlv;
209                         leaf identifier {
210                                 type binary;
211                                 mandatory true;
212                         }
213                 }
214         }
215
216         grouping lsp-identifiers-tlv {
217                 description "LSP Identifiers TLV";
218                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.1";
219                 container lsp-identifiers {
220                         uses tlv;
221                         leaf lsp-id {
222                                 type rsvp:lsp-id;
223                                 mandatory true;
224                         }
225
226                         leaf tunnel-id {
227                                 type rsvp:tunnel-id;
228                                 mandatory true;
229                         }
230
231                         choice address-family {
232                                 case ipv4 {
233                                         leaf ipv4-tunnel-sender-address {
234                                                 type inet:ipv4-address;
235                                                 mandatory true;
236                                         }
237                                         leaf ipv4-extended-tunnel-id {
238                                                 type rsvp:ipv4-extended-tunnel-id;
239                                                 mandatory true;
240                                         }
241                                 }
242                                 case ipv6 {
243                                         leaf ipv6-tunnel-sender-address {
244                                                 type inet:ipv6-address;
245                                                 mandatory true;
246                                         }
247                                         leaf ipv6-extended-tunnel-id {
248                                                 type rsvp:ipv6-extended-tunnel-id;
249                                                 mandatory true;
250                                         }
251                                 }
252                         }
253                         // FIXME: add tunnel endpoint (from stateful-07)
254                 }
255         }
256
257         grouping symbolic-path-name-tlv {
258                 description "Symbolic Path Name TLV";
259                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.2";
260                 container symbolic-path-name {
261                         uses tlv;
262                         leaf path-name {
263                                 type symbolic-path-name;
264                                 mandatory true;
265                         }
266                 }
267         }
268
269         grouping lsp-error-code-tlv {
270                 description "LSP Error Code TLV";
271                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.3";
272                 container lsp-error-code {
273                         uses tlv;
274                         leaf error-code {
275                                 type uint32;
276                                 mandatory true;
277                         }
278                 }
279         }
280
281         grouping rsvp-error-spec-tlv {
282                 description "RSVP Error Spec TLV";
283                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.4";
284                 container rsvp-error-spec {
285                         uses tlv;
286                         choice error-type {
287                                 case rsvp {
288                                         container rsvp-error {
289                                                 uses rsvp:error-spec;
290                                         }
291                                 }
292                                 case user {
293                                         container user-error {
294                                                 uses rsvp:user-error-spec;
295                                         }
296                                 }
297                         }
298                 }
299         }
300
301         grouping of-list-tlv {
302                 description "OF-List TLV";
303                 reference "https://tools.ietf.org/html/rfc5541#section-2.1";
304                 container of-list {
305                         uses tlv;
306                         leaf-list codes {
307                                 type of-id;
308                         }
309                 }
310         }
311
312         grouping order-tlv {
313                 description "Order TLV";
314                 reference "https://tools.ietf.org/html/rfc5557#section-5.4";
315                 container order {
316                         uses tlv;
317                         leaf delete {
318                                 type uint32;
319                                 mandatory true;
320                         }
321
322                         leaf setup {
323                                 type uint32;
324                                 mandatory true;
325                         }
326                 }
327         }
328
329         // Objects
330         grouping object-header {
331                 description "Common Object Header";
332                 reference "https://tools.ietf.org/html/rfc5440#section-7.2";
333
334                 leaf processing-rule {
335                         type boolean;
336                         default false;
337                 }
338
339                 leaf ignore {
340                         type boolean;
341                         default false;
342                 }
343         }
344
345         grouping object {
346                 description "Core object structure with optional TLVs";
347                 uses object-header;
348         }
349
350         grouping open-object {
351                 description "OPEN Object";
352                 reference "https://tools.ietf.org/html/rfc5440#section-7.3";
353
354                 container open {
355                         uses object;
356                         container "tlvs" {
357                                 uses of-list-tlv;
358
359                                 uses stateful-capability-tlv;
360
361                                 uses predundancy-group-id-tlv;
362
363                                 uses lsp-db-version-tlv;
364                         }
365
366                         leaf version {
367                                 type protocol-version;
368                                 default 1;
369                         }
370
371                         leaf keepalive {
372                                 // Note: non-presence is equal to '0'
373                                 type uint8 {
374                                         range 1..255;
375                                 }
376                                 mandatory true;
377                         }
378
379                         leaf dead-timer {
380                                 // Note: non-presence is equal to '0'
381                                 type uint8 {
382                                         range 1..255;
383                                 }
384                                 mandatory true;
385                         }
386
387                         leaf session-id {
388                                 type uint8;
389                         }
390                 }
391         }
392
393         grouping rp-object {
394                 description "RP Object";
395                 reference "https://tools.ietf.org/html/rfc5440#section-7.4";
396                 container rp {
397                         uses object;
398                         container "tlvs" {
399                                 uses order-tlv;
400                         }
401
402                         leaf priority {
403                                 type uint8 {
404                                         range 1..7;
405                                 }
406                         }
407
408                         leaf request-id {
409                                 type request-id;
410                                 mandatory true;
411                         }
412
413                         leaf reoptimization {
414                                 type boolean;
415                                 default false;
416                         }
417
418                         leaf bi-directional {
419                                 type boolean;
420                                 default false;
421                         }
422
423                         leaf loose {
424                                 type boolean;
425                                 default false;
426                         }
427
428                         leaf path-key {
429                                 type boolean;
430                                 default false;
431                                 reference "https://tools.ietf.org/html/rfc5520#section-3.2.1";
432                         }
433
434                         leaf fragmentation {
435                                 type boolean;
436                                 default false;
437                                 reference "https://tools.ietf.org/html/rfc6006#section-3.3.1";
438                         }
439
440                         leaf p2mp {
441                                 type boolean;
442                                 default false;
443                                 reference "https://tools.ietf.org/html/rfc6006#section-3.3.1";
444                         }
445
446                         leaf ero-compression {
447                                 type boolean;
448                                 default false;
449                                 reference "https://tools.ietf.org/html/rfc6006#section-3.3.1";
450                         }
451
452                         leaf supply-of {
453                                 type boolean;
454                                 default false;
455                                 reference "https://tools.ietf.org/html/rfc5541#section-3.3";
456                         }
457
458                         leaf order {
459                                 type boolean;
460                                 default false;
461                                 reference "https://tools.ietf.org/html/rfc5557#section-5.3";
462                         }
463
464                         leaf make-before-break {
465                                 type boolean;
466                                 default false;
467                                 reference "https://tools.ietf.org/html/rfc5557#section-5.3";
468                         }
469                 }
470         }
471
472         grouping no-path-object {
473                 description "NO-PATH Object";
474                 reference "https://tools.ietf.org/html/rfc5440#section-7.5";
475
476                 uses object;
477
478                 leaf nature-of-issue {
479                         type uint8;
480                         mandatory true;
481                 }
482
483                 leaf unsatisfied-constraints {
484                         when "nature-of-issue = 0" {
485                                 description
486                                         "The C flag has no meaning
487                                         and is ignored unless the NI
488                                         field is set to 0x00.";
489                         }
490                         type boolean;
491                         default false;
492                 }
493         }
494
495         grouping endpoints {
496                 choice address-family {
497                         mandatory true;
498
499                         case ipv4 {
500                                 leaf source-ipv4-address {
501                                         type inet:ipv4-address;
502                                         mandatory true;
503                                 }
504
505                                 leaf destination-ipv4-address {
506                                         type inet:ipv4-address;
507                                         mandatory true;
508                                 }
509                         }
510                         case ipv6 {
511                                 leaf source-ipv6-address {
512                                         type inet:ipv6-address;
513                                         mandatory true;
514                                 }
515
516                                 leaf destination-ipv6-address {
517                                         type inet:ipv6-address;
518                                         mandatory true;
519                                 }
520                         }
521                 }
522         }
523
524         grouping endpoints-object {
525                 description "END-POINTS Object";
526                 reference "https://tools.ietf.org/html/rfc5440#section-7.6";
527
528                 container endpoints-obj {
529                         uses object;
530                         uses endpoints;
531                 }
532         }
533
534         grouping bandwidth-object {
535                 description "BANDWIDTH Object";
536                 reference "https://tools.ietf.org/html/rfc5440#section-7.7";
537                 container bandwidth {
538                         uses object;
539
540                         // No possibility to carry TLVs
541                         leaf bandwidth {
542                                 type nps-c:bandwidth;
543                         }
544                 }
545         }
546
547         grouping metric-object {
548                 description "METRIC Object";
549                 reference "https://tools.ietf.org/html/rfc5440#section-7.8";
550                 container metric {
551                         uses object;
552
553                         leaf metric-type {
554                                 type uint8;
555                                 mandatory true;
556                         }
557
558                         leaf bound {
559                                 type boolean;
560                                 default false;
561                         }
562
563                         leaf computed {
564                                 type boolean;
565                                 default false;
566                         }
567
568                         leaf value {
569                                 type ieee754:float32;
570                         }
571                 }
572         }
573
574         grouping exclude-route-object {
575                 description "Exclude Route Object";
576                 reference "https://tools.ietf.org/html/rfc5521#section-2.1.1";
577
578                 container xro {
579                         uses object;
580
581                         leaf flags {
582                                 type bits {
583                                         bit fail {
584                                                 position 31;
585                                         }
586                                 }
587                                 mandatory true;
588                         }
589
590                         list subobjects {
591                                 uses rsvp:exclude-route-subobjects;
592                         }
593                 }
594         }
595
596         grouping explicit-route-object {
597                 description "Explicit Route Object";
598                 reference "https://tools.ietf.org/html/rfc5440#section-7.9";
599
600                 container ero {
601                         // No possibility of TLVs
602                         uses object;
603
604                         list subobjects {
605                                 leaf loose {
606                                         type boolean;
607                                         mandatory true;
608                                 }
609
610                                 uses rsvp:explicit-route-subobjects {
611                                         augment "subobject-type" {
612                                                 case path-key {
613                                                         container path-key {
614                                                                 uses path-key-subobject;
615                                                         }
616                                                 }
617                                         }
618                                 }
619                         }
620                 }
621         }
622
623         grouping include-route-object {
624                 description "Include Route Object";
625                 reference "https://tools.ietf.org/html/rfc5440#section-7.12";
626
627                 container iro {
628                         // No possibility of TLVs
629                         uses object;
630
631                         list subobjects {
632                                 uses rsvp:explicit-route-subobjects;
633                         }
634                 }
635         }
636
637         grouping reported-route-object {
638                 description "Reported Route Object";
639                 reference "https://tools.ietf.org/html/rfc5440#section-7.10";
640
641                 container rro {
642                         // No possibility of TLVs
643                         uses object;
644
645                         list subobjects {
646                                 uses rsvp:record-route-subobjects {
647                                         augment "subobject-type" {
648                                                 case path-key {
649                                                         container path-key {
650                                                                 uses path-key-subobject;
651                                                         }
652                                                 }
653                                         }
654                                 }
655                         }
656                 }
657         }
658
659         grouping lspa-object {
660                 description "LSPA Object";
661                 reference "https://tools.ietf.org/html/rfc5440#section-7.11";
662
663                 container lspa {
664                         uses object;
665
666                         leaf hold-priority {
667                                 type uint8;
668                                 mandatory true;
669                         }
670
671                         leaf setup-priority {
672                                 type uint8;
673                                 mandatory true;
674                         }
675
676                         leaf local-protection-desired {
677                                 type boolean;
678                                 default false;
679                         }
680
681                         uses rsvp:attribute-filters;
682                 }
683         }
684
685         grouping svec-object {
686                 description "Synchronization Vector Object";
687                 reference "https://tools.ietf.org/html/rfc5440#section-7.13";
688
689                 container svec {
690                         // No possibility of TLVs
691                         uses object;
692
693                         leaf link-diverse {
694                                 type boolean;
695                                 default false;
696                         }
697
698                         leaf node-diverse {
699                                 type boolean;
700                                 default false;
701                         }
702
703                         leaf srlg-diverse {
704                                 type boolean;
705                                 default false;
706                         }
707
708                         leaf-list requests-ids {
709                                 type request-id;
710                         }
711                 }
712         }
713
714         grouping notification-object {
715                 description "NOTIFICATION Object";
716                 reference "https://tools.ietf.org/html/rfc5440#section-7.14";
717                 container c-notification {
718                         uses object;
719                         container "tlvs" {
720                                 when "../type = 2 and ../value = 1";
721
722                                 uses overload-duration-tlv;
723                         }
724
725                         leaf type {
726                                 type uint8;
727                                 mandatory true;
728                         }
729
730                         leaf value {
731                                 type uint8;
732                                 mandatory true;
733                         }
734                 }
735         }
736
737         grouping pcep-error-object {
738                 description "PCEP-ERROR Object";
739                 reference "https://tools.ietf.org/html/rfc5440#section-7.15";
740                 container error-object {
741                         uses object;
742                         container "tlvs" {
743                                 when "../type = 7";
744                                 uses req-missing-tlv;
745                         }
746
747                         leaf type {
748                                 type uint8;
749                                 mandatory true;
750                         }
751
752                         leaf value {
753                                 type uint8;
754                                 mandatory true;
755                         }
756                 }
757         }
758
759         grouping load-balancing-object {
760                 description "LOAD-BALANCING Object";
761                 reference "https://tools.ietf.org/html/rfc5440#section-7.16";
762
763                 container load-balancing {
764                         // No possibility of TLVs
765                         uses object;
766
767                         leaf max-lsp {
768                                 type uint8;
769                                 mandatory true;
770                         }
771
772                         leaf min-bandwidth {
773                                 type nps-c:bandwidth;
774                         }
775                 }
776         }
777
778         grouping close-object {
779                 description "CLOSE Object";
780                 reference "https://tools.ietf.org/html/rfc5440#section-7.17";
781
782                 container c-close {
783                         uses object;
784
785                         leaf reason {
786                                 type uint8;
787                                 mandatory true;
788                         }
789
790                         container tlvs {
791
792                         }
793                 }
794         }
795
796         grouping path-key-subobject {
797                 reference "https://tools.ietf.org/html/rfc5520#section-3.1";
798                 uses rsvp:c-subobject;
799
800                 leaf pce-id {
801                         type pce-id;
802                         mandatory true;
803                 }
804
805                 leaf path-key {
806                         type path-key;
807                         mandatory true;
808                 }
809         }
810
811         grouping path-key-object {
812                 description "PATH-KEY Object";
813                 reference "https://tools.ietf.org/html/rfc5520#section-3.2.2";
814                 container path-key {
815                         uses object;
816
817                         list path-keys {
818                                 min-elements 1;
819
820                                 leaf loose {
821                                         type boolean;
822                                         default false;
823                                 }
824
825                                 uses path-key-subobject;
826                         }
827                 }
828         }
829
830         grouping srp-object {
831                 description "SRP Object";
832                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.2";
833
834                 container srp {
835                         uses object;
836
837                         leaf operation-id {
838                                 type srp-id-number;
839                                 mandatory true;
840                         }
841
842                         leaf flags {
843                                 type bits {
844                                         bit lsp-remove {
845                                                 position 31;
846                                         }
847                                 }
848                         }
849                 }
850         }
851
852         grouping lsp-object {
853                 description "LSP Object";
854                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3";
855
856                 container lsp {
857                         uses object;
858                         container "tlvs" {
859                                 uses lsp-error-code-tlv;
860
861                                 uses lsp-identifiers-tlv;
862
863                                 uses rsvp-error-spec-tlv;
864
865                                 uses symbolic-path-name-tlv;
866                         }
867
868                         leaf plsp-id {
869                                 type plsp-id;
870                                 mandatory true;
871                         }
872
873                         leaf delegate {
874                                 type boolean;
875                                 default false;
876                         }
877
878                         leaf sync {
879                                 type boolean;
880                                 default false;
881                         }
882
883                         leaf remove {
884                                 type boolean;
885                                 default false;
886                         }
887
888                         leaf administrative {
889                                 type boolean;
890                                 default false;
891                         }
892
893                         leaf operational {
894                                 type operational-status;
895                                 mandatory true;
896                         }
897                 }
898         }
899
900         grouping of-object {
901                 description "OF Object";
902                 reference "https://tools.ietf.org/html/rfc5541#section-3.1";
903                 container of {
904                         uses object;
905
906                         leaf code {
907                                 type of-id;
908                                 mandatory true;
909                         }
910                 }
911         }
912
913         typedef class-type {
914                 type uint8 {
915                         range 1..7;
916                 }
917         }
918
919         grouping classtype-object {
920                 description "CLASSTYPE Object";
921                 reference "https://tools.ietf.org/html/rfc5455#section-3";
922
923                 container class-type {
924                         uses object;
925
926                         leaf class-type {
927                                 type class-type;
928                                 mandatory true;
929                         }
930                 }
931         }
932
933         grouping gc-object {
934                 description "GLOBAL CONSTRAINTS (GC) Object";
935                 reference "https://tools.ietf.org/html/rfc5557#section-5.5";
936                 container gc {
937                         uses object;
938
939                         leaf max-hop {
940                                 type uint8;
941                                 mandatory true;
942                         }
943
944                         leaf max-utilization {
945                                 type uint8 {
946                                         range 0..100;
947                                 }
948                                 units percent;
949                                 mandatory true;
950                         }
951
952                         leaf min-utilization {
953                                 type uint8 {
954                                         range 0..100;
955                                 }
956                                 units percent;
957                                 mandatory true;
958                         }
959
960                         leaf over-booking-factor {
961                                 type uint8 {
962                                         range 0..100;
963                                 }
964                                 units percent;
965                                 mandatory true;
966                         }
967                 }
968         }
969
970         // Messages
971         grouping message {
972                 description "Marker grouping for message groupings.";
973         }
974
975         grouping message-header {
976                 description "Common Header";
977                 reference "https://tools.ietf.org/html/rfc5440#section-6.1";
978
979                 leaf version {
980                         type protocol-version;
981                         default 1;
982                 }
983         }
984
985         grouping open-message {
986                 uses message;
987
988                 container open-message {
989                         description "Open Message";
990                         reference "https://tools.ietf.org/html/rfc5440#section-6.2";
991
992                         uses message-header;
993
994                         uses open-object;
995                 }
996         }
997
998         grouping keepalive-message {
999                 uses message;
1000
1001                 container keepalive-message {
1002                         description "Keepalive Message";
1003                         reference "https://tools.ietf.org/html/rfc5440#section-6.3";
1004
1005                         uses message-header;
1006                 }
1007         }
1008
1009         grouping lsp-attributes {
1010                 uses lspa-object;
1011
1012                 uses bandwidth-object;
1013
1014                 list metrics {
1015                         uses metric-object;
1016                 }
1017
1018                 uses exclude-route-object;
1019
1020                 uses include-route-object;
1021
1022                 uses of-object;
1023
1024                 uses classtype-object;
1025         }
1026
1027         grouping pcreq-message {
1028                 uses message;
1029
1030                 container pcreq-message {
1031                         description "Path Computation Request Message";
1032                         reference "https://tools.ietf.org/html/rfc5440#section-6.4";
1033
1034                         uses message-header;
1035
1036                         list requests {
1037                                 uses rp-object;
1038
1039                                 container path-key-expansion {
1040                                         when "rp/path-key = true";
1041                                         uses path-key-object;
1042                                 }
1043
1044                                 container segment-computation {
1045                                         when "rp/path-key = false";
1046
1047                                         container p2p {
1048                                                 when "../rp/p2mp = false";
1049
1050                                                 uses endpoints-object;
1051
1052                                                 container reported-route {
1053                                                         uses reported-route-object;
1054
1055                                                         uses bandwidth-object;
1056                                                 }
1057
1058                                                 uses load-balancing-object;
1059
1060                                                 uses lsp-attributes;
1061
1062                                                 uses lsp-object;
1063                                         }
1064                                 }
1065                         }
1066
1067                         list svec {
1068                                 uses svec-object;
1069
1070                                 uses of-object;
1071
1072                                 uses gc-object;
1073
1074                                 uses exclude-route-object;
1075
1076                                 list metric {
1077                                         uses metric-object;
1078                                 }
1079                         }
1080                 }
1081         }
1082
1083         grouping path-definition {
1084                 uses explicit-route-object;
1085
1086                 uses lsp-attributes;
1087         }
1088
1089         grouping pcrep-message {
1090                 uses message;
1091
1092                 container pcrep-message {
1093                         description "Path Computation Reply Message";
1094                         reference "https://tools.ietf.org/html/rfc5440#section-6.5";
1095
1096                         uses message-header;
1097
1098                         list replies {
1099                                 uses rp-object;
1100
1101                                 uses lsp-object;
1102
1103                                 choice result {
1104                                         case success {
1105                                                 uses lsp-attributes;
1106
1107                                                 list paths {
1108                                                         uses path-definition;
1109                                                 }
1110                                         }
1111                                         case failure {
1112                                                 container no-path {
1113                                                         uses no-path-object;
1114                                                         container "tlvs" {
1115                                                                 container no-path-vector {
1116                                                                         uses no-path-vector-tlv;
1117                                                                 }
1118                                                         }
1119                                                 }
1120                                         }
1121                                 }
1122                         }
1123                 }
1124         }
1125
1126         grouping pcntf-message {
1127                 uses message;
1128
1129                 container pcntf-message {
1130                         description "Notification Message";
1131                         reference "https://tools.ietf.org/html/rfc5440#section-6.6";
1132
1133                         uses message-header;
1134
1135                         list notifications {
1136                                 list rps {
1137                                         uses rp-object;
1138                                 }
1139
1140                                 list notifications {
1141                                         uses notification-object;
1142                                 }
1143                         }
1144                 }
1145         }
1146
1147         grouping pcerr-message {
1148                 uses message;
1149
1150                 container pcerr-message {
1151                         description "Error Message";
1152                         reference "https://tools.ietf.org/html/rfc5440#section-6.7";
1153
1154                         uses message-header;
1155
1156                         list errors {
1157                                 uses pcep-error-object;
1158                         }
1159
1160                         choice error-type {
1161                                 case request {
1162                                         list rps {
1163                                                 uses rp-object;
1164                                         }
1165                                 }
1166
1167                                 case session {
1168                                         uses open-object;
1169                                 }
1170
1171                                 case stateful {
1172                                         reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-6.3";
1173                                         uses srp-object;
1174                                 }
1175                         }
1176                 }
1177         }
1178
1179         grouping close-message {
1180                 uses message;
1181
1182                 container c-close-message {
1183                         description "Close Message";
1184                         reference "https://tools.ietf.org/html/rfc5440#section-6.8";
1185
1186                         uses message-header;
1187
1188                         uses close-object;
1189                 }
1190         }
1191
1192         grouping pcupd-message {
1193                 uses message;
1194
1195                 container pcupd-message {
1196                         description "State Update Request Message";
1197                         reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-6.2";
1198
1199                         uses message-header;
1200
1201                         list updates {
1202                                 uses srp-object;
1203
1204                                 uses lsp-object;
1205
1206                                 container path {
1207                                         uses path-definition;
1208                                 }
1209                         }
1210                 }
1211         }
1212
1213         grouping pcrpt-message {
1214                 uses message;
1215
1216                 container pcrpt-message {
1217                         description "State Report Message";
1218                         reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-6.1";
1219
1220                         uses message-header;
1221
1222                         list reports {
1223                                 uses srp-object;
1224
1225                                 uses lsp-object;
1226
1227                                 container path {
1228                                         uses path-definition;
1229                                 }
1230                         }
1231                 }
1232         }
1233
1234         grouping pcinitiate-message {
1235                 uses message;
1236
1237                 container pcinitiate-message {
1238                         description "LSP Initiate Message";
1239                         reference "https://tools.ietf.org/html/draft-crabbe-pce-pce-initiated-lsp-02#section-5.1";
1240
1241                         uses message-header;
1242
1243                         list requests {
1244                                 uses srp-object;
1245
1246                                 uses lsp-object;
1247
1248                                 uses endpoints-object;
1249
1250                                 uses explicit-route-object;
1251
1252                                 uses lsp-attributes;
1253                         }
1254                 }
1255         }
1256 }