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