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