Revert "BUG-47 : unfinished PCEP migration to generated DTOs."
[bgpcep.git] / pcep / api / src / main / yang / pcep-types.yang
index 56ac4c63aa95291621643d360fac8774f8e2eff3..8c0bff6c60638c6a0cf196b50a37544940bd856f 100644 (file)
@@ -80,7 +80,6 @@ module pcep-types {
                description "NO-PATH-VECTOR TLV";
                reference "https://tools.ietf.org/html/rfc5440#section-7.5";
 
-               uses tlv;
                leaf flags {
                        type bits {
                                bit p2mp-unreachable {
@@ -117,7 +116,6 @@ module pcep-types {
                description "OVERLOAD-DURATION TLV";
                reference "https://tools.ietf.org/html/rfc5440#section-7.14";
 
-               uses tlv;
                leaf duration {
                        type uint32;
                        units seconds;
@@ -128,13 +126,12 @@ module pcep-types {
                description "REQ-MISSING TLV";
                reference "https://tools.ietf.org/html/rfc5440#section-7.5";
 
-               uses tlv;
                leaf request-id {
                        type request-id;
                }
        }
-       
-    grouping p2mp-capable-tlv {
+
+       grouping p2mp-capable-tlv {
                description "P2MP CAPABLE TLV";
                reference "https://tools.ietf.org/html/rfc6006#section-3.1.2";
 
@@ -143,13 +140,11 @@ module pcep-types {
                        mandatory true;
                }
        }
-       
 
        grouping stateful-capability-tlv {
                description "Stateful PCE Capability TLV";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.1";
 
-               uses tlv;
                leaf flags {
                        type bits {
                                bit lsp-update-capability {
@@ -170,7 +165,6 @@ module pcep-types {
                description "LSP State Database Version TLV";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.2";
 
-               uses tlv;
                leaf version {
                        type uint64;
                        mandatory true;
@@ -181,7 +175,6 @@ module pcep-types {
                description "PCE Redundancy Group Identifier TLV";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.3";
 
-               uses tlv;
                leaf identifier {
                        type binary;
                        mandatory true;
@@ -192,7 +185,6 @@ module pcep-types {
                description "LSP Identifiers TLV";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.1";
 
-               uses tlv;
                leaf lsp-id {
                        type rsvp:lsp-id;
                        mandatory true;
@@ -231,7 +223,6 @@ module pcep-types {
                description "Symbolic Path Name TLV";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.2";
 
-               uses tlv;
                leaf path-name {
                        type binary;
                        mandatory true;
@@ -242,7 +233,6 @@ module pcep-types {
                description "LSP Error Code TLV";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.3";
 
-               uses tlv;
                leaf error-code {
                        type uint32;
                        mandatory true;
@@ -253,7 +243,6 @@ module pcep-types {
                description "RSVP Error Spec TLV";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.4";
 
-               uses tlv;
                choice error-type {
                        case rsvp {
                                container rsvp-error {
@@ -272,7 +261,6 @@ module pcep-types {
                description "OF-List TLV";
                reference "https://tools.ietf.org/html/rfc5541#section-2.1";
 
-               uses tlv;
                leaf-list codes {
                        type of-id;
                }
@@ -282,7 +270,6 @@ module pcep-types {
                description "Order TLV";
                reference "https://tools.ietf.org/html/rfc5557#section-5.4";
 
-               uses tlv;
                leaf delete {
                        type uint32;
                        mandatory true;
@@ -506,10 +493,10 @@ module pcep-types {
        grouping bandwidth-object {
                description "BANDWIDTH Object";
                reference "https://tools.ietf.org/html/rfc5440#section-7.7";
-               
-               uses object;
 
                // No possibility to carry TLVs
+               uses object-header;
+
                leaf bandwidth {
                        type ieee754:float32;
                }
@@ -541,32 +528,12 @@ module pcep-types {
                }
        }
 
-       grouping exclude-route-object {
-               description "Exclude Route Object";
-               reference "https://tools.ietf.org/html/rfc5521#section-2.1.1";
-
-               uses object;
-
-               leaf flags {
-                       type bits {
-                               bit fail {
-                                       position 31;
-                               }
-                       }
-                       mandatory true;
-               }
-
-               list subobjects {
-                       uses rsvp:exclude-route-subobjects;
-               }
-       }
-
        grouping explicit-route-object {
                description "Explicit Route Object";
                reference "https://tools.ietf.org/html/rfc5440#section-7.9";
 
                // No possibility of TLVs
-               uses object;
+               uses object-header;
 
                list subobjects {
                        leaf loose {
@@ -583,16 +550,10 @@ module pcep-types {
                reference "https://tools.ietf.org/html/rfc5440#section-7.12";
 
                // No possibility of TLVs
-               uses object;
+               uses object-header;
 
                list subobjects {
-                       uses rsvp:route-subobjects {
-                               augment subobject-type {
-                                       case explicit-exclusion-route {
-                                               uses rsvp:exclude-route-subobjects;
-                                       }
-                               }
-                       }
+                       uses rsvp:route-subobjects;
                }
        }
 
@@ -601,7 +562,7 @@ module pcep-types {
                reference "https://tools.ietf.org/html/rfc5440#section-7.10";
 
                // No possibility of TLVs
-               uses object;
+               uses object-header;
 
                list subobjects {
                        uses rsvp:record-route-subobjects;
@@ -637,7 +598,7 @@ module pcep-types {
                reference "https://tools.ietf.org/html/rfc5440#section-7.13";
 
                // No possibility of TLVs
-               uses object;
+               uses object-header;
 
                leaf link-diverse {
                        type boolean;
@@ -713,7 +674,7 @@ module pcep-types {
                reference "https://tools.ietf.org/html/rfc5440#section-7.16";
 
                // No possibility of TLVs
-               uses object;
+               uses object-header;
 
                leaf max-lsp {
                        type uint8;
@@ -729,22 +690,20 @@ module pcep-types {
                description "CLOSE Object";
                reference "https://tools.ietf.org/html/rfc5440#section-7.17";
 
+               // No possibility of TLVs
                uses object;
 
                leaf reason {
                        type uint8;
                        mandatory true;
                }
-               
-               container tlvs {
-               }
        }
 
        grouping path-key-object {
                description "PATH-KEY Object";
                reference "https://tools.ietf.org/html/rfc5520#section-3.2.2";
 
-               uses object;
+               uses object-header;
 
                list path-keys {
                        min-elements 1;
@@ -878,7 +837,7 @@ module pcep-types {
                description "CLASSTYPE Object";
                reference "https://tools.ietf.org/html/rfc5455#section-3";
 
-               uses object;
+               uses object-header;
 
                leaf class-type {
                        type class-type;
@@ -1039,6 +998,18 @@ module pcep-types {
                                                        uses lsp-object;
                                                }
                                        }
+
+                                       container p2mp {
+                                               when "../rp/p2mp = true";
+
+                                               list trees {
+                                                       container endpoints {
+                                                               uses endpoints-object;
+                                                       }
+
+                                                       // FIXME: finish this
+                                               }
+                                       }
                                }
                        }
 
@@ -1170,13 +1141,13 @@ module pcep-types {
        grouping close-message {
                uses message;
 
-               container c-close-message {
+               container close-message {
                        description "Close Message";
                        reference "https://tools.ietf.org/html/rfc5440#section-6.8";
 
                        uses message-header;
 
-                       container c-close {
+                       container close {
                                uses close-object;
                        }
                }