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