SERO & SRRO
[bgpcep.git] / pcep / api / src / main / yang / pcep-types.yang
index 5aaa39090151a78d777d6ce5f06827e017e3c82b..b6b8c0fa92bc21110fd31166b6f3f36fb1a49296 100644 (file)
@@ -4,9 +4,9 @@ module pcep-types {
     prefix "pcep-t";
 
     import ieee754 { prefix ieee754; revision-date 2013-08-19; }
-    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+    import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
     import network-concepts { prefix netc; revision-date 2013-11-25; }
-    import rsvp { prefix rsvp; revision-date 2013-08-20; }
+    import rsvp { prefix rsvp; revision-date 2015-08-20; }
     import iana { prefix iana; revision-date 2013-08-16; }
 
     organization "Cisco Systems, Inc.";
@@ -14,8 +14,8 @@ module pcep-types {
 
     description
         "This module contains the base data model of a PCEP message.
-        It rolls up the definitions contained in RFC5440, RFC5520
-        and RFC6006.
+        It rolls up the definitions contained in RFC5440, RFC7896, RFC5520
+        and RFC8306, RFC5886.
 
         Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
 
@@ -50,21 +50,6 @@ module pcep-types {
         type uint16;
     }
 
-    typedef path-key {
-        type uint16;
-    }
-
-    typedef pce-id {
-        type union {
-            type binary {
-                length 4;
-            }
-            type binary {
-                length 16;
-            }
-        }
-    }
-
     grouping vendor-information {
         description "VENDOR-INFORMATION format";
         reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-4";
@@ -173,6 +158,9 @@ module pcep-types {
     grouping vs-tlv {
         description "Vendor-specific TLV.";
         container vs-tlv {
+                status obsolete;
+                description "This model is obsolete, please use vendor-information-tlvs instead";
+
                 uses tlv;
 
                 leaf enterprise-number {
@@ -184,6 +172,20 @@ module pcep-types {
         }
     }
 
+    grouping path-setup-type-tlv {
+        description "PATH-SETUP-TYPE TLV";
+        reference "https://tools.ietf.org/html/draft-ietf-pce-lsp-setup-type-00#section-3";
+
+        container path-setup-type {
+            uses tlv;
+            leaf pst {
+                description "PST=0: Path is setup via RSVP-TE signaling protocol(default).";
+                type uint8;
+                default 0;
+            }
+        }
+    }
+
     // Objects
     grouping object-header {
         description "Common Object Header";
@@ -214,6 +216,15 @@ module pcep-types {
         }
     }
 
+    grouping vendor-information-objects {
+        list vendor-information-object {
+            description "VENDOR-INFORMATION-OBJECT";
+            reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-2";
+            uses object;
+            uses vendor-information;
+        }
+    }
+
     grouping open-object {
         description "OPEN Object";
         reference "https://tools.ietf.org/html/rfc5440#section-7.3";
@@ -258,6 +269,7 @@ module pcep-types {
             container "tlvs" {
                 uses order-tlv;
                 uses vendor-information-tlvs;
+                uses path-setup-type-tlv;
             }
 
             leaf priority {
@@ -360,12 +372,12 @@ module pcep-types {
             case ipv4-case {
                 container ipv4 {
                     leaf source-ipv4-address {
-                        type inet:ipv4-address;
+                        type inet:ipv4-address-no-zone;
                         mandatory true;
                     }
 
                     leaf destination-ipv4-address {
-                        type inet:ipv4-address;
+                        type inet:ipv4-address-no-zone;
                         mandatory true;
                     }
                 }
@@ -373,12 +385,12 @@ module pcep-types {
             case ipv6-case {
                 container ipv6 {
                     leaf source-ipv6-address {
-                        type inet:ipv6-address;
+                        type inet:ipv6-address-no-zone;
                         mandatory true;
                     }
 
                     leaf destination-ipv6-address {
-                        type inet:ipv6-address;
+                        type inet:ipv6-address-no-zone;
                         mandatory true;
                     }
                 }
@@ -396,16 +408,28 @@ module pcep-types {
         }
     }
 
+    grouping bandwidth {
+        // No possibility to carry TLVs
+        leaf bandwidth {
+            type netc:bandwidth;
+        }
+    }
+
     grouping bandwidth-object {
         description "BANDWIDTH Object";
         reference "https://tools.ietf.org/html/rfc5440#section-7.7";
         container bandwidth {
             uses object;
+            uses bandwidth;
+        }
+    }
 
-            // No possibility to carry TLVs
-            leaf bandwidth {
-                type netc:bandwidth;
-            }
+    grouping reoptimization-bandwidth-object {
+        description "BANDWIDTH Object";
+        reference "https://tools.ietf.org/html/rfc5440#section-7.7";
+        container reoptimization-bandwidth {
+            uses object;
+            uses bandwidth;
         }
     }
 
@@ -473,16 +497,26 @@ module pcep-types {
                     mandatory true;
                 }
 
-                uses rsvp:explicit-route-subobjects {
-                    augment "subobject-type" {
-                        case path-key-case {
-                            container path-key {
-                                uses path-key-subobject;
-                            }
-                        }
-                    }
+                uses rsvp:explicit-route-subobjects;
+                ordered-by user;
+            }
+        }
+    }
+
+    grouping secondary-explicit-route-object {
+        description "Secondary Explicit Route Object";
+        reference "https://tools.ietf.org/html/rfc8306#section-3.2";
+        container sero {
+            // No possibility of TLVs
+            uses object;
+
+            list subobject {
+                leaf loose {
+                    type boolean;
+                    mandatory true;
                 }
 
+                uses rsvp:secondary-explicit-route-subobjects;
                 ordered-by user;
             }
         }
@@ -490,13 +524,18 @@ module pcep-types {
 
     grouping include-route-object {
         description "Include Route Object";
-        reference "https://tools.ietf.org/html/rfc5440#section-7.12";
+        reference "https://tools.ietf.org/html/rfc7896#section-2.1";
 
         container iro {
             // No possibility of TLVs
             uses object;
 
             list subobject {
+                leaf loose {
+                    type boolean;
+                    mandatory true;
+                }
+
                 uses rsvp:explicit-route-subobjects;
                 ordered-by user;
             }
@@ -512,15 +551,22 @@ module pcep-types {
             uses object;
 
             list subobject {
-                uses rsvp:record-route-subobjects {
-                    augment "subobject-type" {
-                        case path-key-case {
-                            container path-key {
-                                uses path-key-subobject;
-                            }
-                        }
-                    }
-                }
+                uses rsvp:record-route-subobjects;
+                ordered-by user;
+            }
+        }
+    }
+
+    grouping secondary-reported-route-object {
+        description "Reported Route Object";
+        reference "https://tools.ietf.org/html/rfc8306#section-3.2";
+
+        container srro {
+            // No possibility of TLVs
+            uses object;
+
+            list subobject {
+                uses rsvp:secondary-record-route-subobjects;
                 ordered-by user;
             }
         }
@@ -652,20 +698,7 @@ module pcep-types {
         }
     }
 
-    grouping path-key-subobject {
-        reference "https://tools.ietf.org/html/rfc5520#section-3.1";
-        uses rsvp:c-subobject;
 
-        leaf pce-id {
-            type pce-id;
-            mandatory true;
-        }
-
-        leaf path-key {
-            type path-key;
-            mandatory true;
-        }
-    }
 
     grouping path-key-object {
         description "PATH-KEY Object";
@@ -681,7 +714,7 @@ module pcep-types {
                     default false;
                 }
 
-                uses path-key-subobject;
+                uses rsvp:path-key-subobject;
                 ordered-by user;
             }
         }
@@ -704,6 +737,145 @@ module pcep-types {
         }
     }
 
+    grouping monitoring-object {
+        description "The MONITORING object is used to specify the
+        set of requested PCEP state metrics.";
+        reference "https://tools.ietf.org/html/rfc5886#section-4.1";
+        container monitoring {
+            uses object;
+
+            leaf flags {
+                type bits {
+                    bit incomplete {
+                        description "Indicates that PCE cannot provide any of
+                        the set of requested performance metrics for unspecified reasons.";
+                        position 19;
+                    }
+                    bit overload {
+                        description "Indicates that the overload status is
+                        a metric of interest.";
+                        position 20;
+                    }
+                    bit processing-time {
+                        description "Indicates that the processing times is
+                        a metric of interest.";
+                        position 21;
+                    }
+                    bit general {
+                        description "Indicates that the monitoring
+                        request is a general monitoring request.";
+                        position 22;
+                    }
+                    bit liveness {
+                        description "Indicates that the state metric
+                        of interest is the PCE's liveness.";
+                        position 23;
+                    }
+                }
+            }
+
+            leaf monitoring-id {
+                description "The Monitoring-id-number combined with
+                the PCC-REQ-ID identifying the requesting PCC uniquely
+                identifies the monitoring request context.";
+                type uint32;
+                mandatory true;
+            }
+
+            container tlvs {
+                description "Optional TLV(s).";
+                uses vendor-information-tlvs;
+            }
+        }
+    }
+
+    grouping pcc-id-req-object {
+        description "The PCC-ID-REQ object is used to specify the IP
+        address of the requesting PCC.";
+        reference "https://tools.ietf.org/html/rfc5886#section-4.2";
+        container pcc-id-req {
+            uses object;
+            leaf ip-address {
+                type inet:ip-address-no-zone;
+            }
+        }
+    }
+
+    grouping pce-id-object {
+        description "The PCE-ID object is used to specify a PCE's IP address.";
+        reference "https://tools.ietf.org/html/rfc5886#section-4.3";
+        container pce-id {
+            uses object;
+            leaf ip-address {
+                type inet:ip-address-no-zone;
+            }
+        }
+    }
+
+    grouping proc-time-object {
+        description "The PROC-TIME object is used to report various processing time
+        related metrics.";
+        reference "https://tools.ietf.org/html/rfc5886#section-4.4";
+        container proc-time {
+            uses object;
+
+            leaf estimated {
+                description "Indicates that the reported metric value is
+                based on estimated processing time as opposed to
+                actual computations.";
+                type boolean;
+                mandatory true;
+            }
+
+            leaf current-proc-time {
+                description "Indicates, in milliseconds, the
+                processing time for the path computation of interest
+                characterized in the corresponding PCMonReq message.";
+                type uint32;
+            }
+
+            leaf min-proc-time {
+                description "The minimum processing time in milliseconds";
+                type uint32;
+                mandatory true;
+            }
+
+            leaf max-proc-time {
+                description "The maximum processing time in milliseconds";
+                type uint32;
+                mandatory true;
+            }
+
+            leaf average-proc-time {
+                description "The average processing time in milliseconds";
+                type uint32;
+                mandatory true;
+            }
+
+            leaf variance-proc-time {
+                description "The variance of processing times in milliseconds";
+                type uint32;
+                mandatory true;
+            }
+        }
+    }
+
+    grouping overload-object {
+        description "The OVERLOAD object is used to report a PCE processing
+        congestion state.";
+        reference "https://tools.ietf.org/html/rfc5886#section-4.5";
+        container overload {
+            uses object;
+            leaf duration {
+                description "This field indicates the amount of time,
+                in seconds, that the responding PCE expects that it may continue to
+                be overloaded from the time that the response message was generated.";
+                type uint16;
+                mandatory true;
+            }
+        }
+    }
+
     typedef class-type {
         type uint8 {
             range 1..7;
@@ -808,6 +980,7 @@ module pcep-types {
         uses lspa-object;
 
         uses bandwidth-object;
+        uses reoptimization-bandwidth-object;
 
         list metrics {
             uses metric-object;
@@ -851,14 +1024,18 @@ module pcep-types {
                         container reported-route {
                             uses reported-route-object;
 
-                            uses bandwidth-object;
+                            uses reoptimization-bandwidth-object;
                         }
 
+                        uses vendor-information-objects;
+
                         uses load-balancing-object;
 
                         uses lsp-attributes;
                     }
                 }
+
+                uses vendor-information-objects;
             }
 
             list svec {
@@ -873,6 +1050,16 @@ module pcep-types {
                 list metric {
                     uses metric-object;
                 }
+
+                uses vendor-information-objects;
+            }
+
+            container monitoring-request {
+                uses monitoring;
+
+                list pce-id-list {
+                    uses pce-id-object;
+                }
             }
         }
     }
@@ -883,6 +1070,46 @@ module pcep-types {
         uses lsp-attributes;
     }
 
+    grouping monitoring {
+        uses monitoring-object;
+        uses pcc-id-req-object;
+    }
+
+    grouping monitoring-metrics {
+        list metric-pce {
+            uses pce-id-object;
+            uses proc-time-object;
+            uses overload-object;
+        }
+    }
+
+    grouping monitoring-response {
+        uses monitoring;
+        choice monitoring-metrics-list {
+            case specific-metrics-list {
+                list specific-metrics {
+                    uses rp-object;
+                    uses monitoring-metrics;
+                }
+            }
+
+            case general-metrics-list {
+                uses monitoring-metrics;
+            }
+        }
+    }
+
+    grouping pcmonrep-message {
+        description "The PCMonRep message is used to provide PCE
+        state metrics back to the requester for out-of-band monitoring requests.";
+        reference "https://tools.ietf.org/html/rfc5886#section-9.2";
+
+        uses message;
+        container pcmonrep-message {
+            uses monitoring-response;
+        }
+    }
+
     grouping pcrep-message {
         uses message;
 
@@ -894,6 +1121,9 @@ module pcep-types {
 
             list replies {
                 uses rp-object;
+                uses vendor-information-objects;
+                uses monitoring;
+                uses monitoring-metrics;
 
                 choice result {
                     case success-case {
@@ -901,6 +1131,7 @@ module pcep-types {
                             list paths {
                                 uses path-definition;
                             }
+                            uses vendor-information-objects;
                         }
                     }
                     case failure-case {
@@ -984,4 +1215,15 @@ module pcep-types {
             uses close-object;
         }
     }
+
+    grouping start-tls-message {
+        uses message;
+
+        container start-tls-message {
+            description "StartTLS Message";
+            reference "https://tools.ietf.org/html/draft-ietf-pce-pceps-02#section-3.3";
+
+            uses message-header;
+        }
+    }
 }