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