Bug-5571: The IRO sub-objects should support loose bit
[bgpcep.git] / pcep / api / src / main / yang / pcep-types.yang
index 9e2e0ef85acb20220374e480f8fa67c7faef42c2..6f06e5c995767e4122655627a5e463fd740b1670 100644 (file)
@@ -6,7 +6,7 @@ module pcep-types {
     import ieee754 { prefix ieee754; revision-date 2013-08-19; }
     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
     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.";
@@ -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";
@@ -267,6 +269,7 @@ module pcep-types {
             container "tlvs" {
                 uses order-tlv;
                 uses vendor-information-tlvs;
+                uses path-setup-type-tlv;
             }
 
             leaf priority {
@@ -405,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 bandwidth {
+            uses object;
+            uses bandwidth;
         }
     }
 
@@ -482,16 +497,7 @@ 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;
             }
         }
@@ -506,6 +512,11 @@ module pcep-types {
             uses object;
 
             list subobject {
+                leaf loose {
+                    type boolean;
+                    mandatory true;
+                }
+
                 uses rsvp:explicit-route-subobjects;
                 ordered-by user;
             }
@@ -521,15 +532,7 @@ 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;
             }
         }
@@ -661,20 +664,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";
@@ -690,7 +680,7 @@ module pcep-types {
                     default false;
                 }
 
-                uses path-key-subobject;
+                uses rsvp:path-key-subobject;
                 ordered-by user;
             }
         }
@@ -999,7 +989,7 @@ module pcep-types {
                         container reported-route {
                             uses reported-route-object;
 
-                            uses bandwidth-object;
+                            uses reoptimization-bandwidth-object;
                         }
 
                         uses vendor-information-objects;
@@ -1190,4 +1180,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;
+        }
+    }
 }