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