]> git.puffer.fish Git - mirror/frr.git/commitdiff
yang: use leafref instead of string
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 8 Sep 2020 18:06:46 +0000 (21:06 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 17 Sep 2020 15:00:06 +0000 (18:00 +0300)
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
yang/frr-bfdd.yang
yang/frr-eigrpd.yang
yang/frr-isisd.yang
yang/frr-nexthop.yang
yang/frr-ripd.yang
yang/frr-ripngd.yang
yang/frr-routing.yang
yang/frr-test-module.yang
yang/frr-zebra.yang

index 4b7785e690f2c73dbdbf46c0c2e99dbc23845927..5b434162d0fd739d43efe52d08dbcde768d4f957 100644 (file)
@@ -12,6 +12,9 @@ module frr-bfdd {
   import frr-interface {
     prefix frr-interface;
   }
+  import frr-vrf {
+    prefix frr-vrf;
+  }
   import frr-route-types {
     prefix frr-route-types;
   }
@@ -396,14 +399,12 @@ module frr-bfdd {
           }
 
           leaf interface {
-            type string {
-              length "0..16";
-            }
+            type frr-interface:interface-ref;
             description "Interface to use to contact peer";
           }
 
           leaf vrf {
-            type string;
+            type frr-vrf:vrf-ref;
             description "Virtual Routing Domain name";
           }
 
@@ -441,14 +442,12 @@ module frr-bfdd {
           }
 
           leaf interface {
-            type string {
-              length "0..16";
-            }
+            type frr-interface:interface-ref;
             description "Interface to use to contact peer";
           }
 
           leaf vrf {
-            type string;
+            type frr-vrf:vrf-ref;
             description "Virtual Routing Domain name";
           }
 
index 3d1bf3baa5f84f9321a1fb2f5e3bbbad28753283..2127ac498866803038f0ecba0bb4b667aafb75c1 100644 (file)
@@ -12,6 +12,12 @@ module frr-eigrpd {
   import frr-interface {
     prefix frr-interface;
   }
+  import frr-vrf {
+    prefix frr-vrf;
+  }
+  import frr-route-map {
+    prefix frr-route-map;
+  }
   import frr-route-types {
     prefix frr-route-types;
   }
@@ -109,9 +115,7 @@ module frr-eigrpd {
 
       leaf vrf {
         description "Virtual Routing Domain name";
-        type string {
-          length "0..16";
-        }
+        type frr-vrf:vrf-ref;
       }
 
       /*
@@ -235,9 +239,7 @@ module frr-eigrpd {
             "Applies the conditions of the specified route-map to
              routes that are redistributed into the EIGRP routing
              instance";
-          type string {
-            length "1..max";
-          }
+          type frr-route-map:route-map-ref;
         }
 
         container metrics {
index cc959bd9fe28d6de0539e46fab14995ac5f79beb..79941a50e7d15b0507b53652260f3015b4ed9ad2 100644 (file)
@@ -15,6 +15,14 @@ module frr-isisd {
     prefix frr-interface;
   }
 
+  import frr-vrf {
+    prefix frr-vrf;
+  }
+
+  import frr-route-map {
+    prefix frr-route-map;
+  }
+
   import frr-route-types {
     prefix frr-route-types;
   }
@@ -240,9 +248,7 @@ module frr-isisd {
     description
       "Common optional attributes of any redistribute entry.";
     leaf route-map {
-      type string {
-        length "1..max";
-      }
+      type frr-route-map:route-map-ref;
       description
         "Applies the conditions of the specified route-map to routes that
          are redistributed into this routing instance.";
@@ -341,7 +347,7 @@ module frr-isisd {
     }
 
     leaf vrf {
-      type string;
+      type frr-vrf:vrf-ref;
       default "default";
       description
         "VRF NAME.";
@@ -830,7 +836,7 @@ module frr-isisd {
       }
 
       leaf vrf {
-        type string;
+        type frr-vrf:vrf-ref;
         description
           "VRF NAME.";
       }
index 0cb0f93ee41504c8e6bb90f0e0d3728e915f82a5..52155dcd1664796ace6c7bc2f691d1c4b35b1b08 100644 (file)
@@ -156,7 +156,7 @@ module frr-nexthop {
     }
 
     leaf vrf {
-      type string;
+      type frr-vrf:vrf-ref;
       description
         "The nexthop vrf name, if different from the route.";
     }
@@ -167,7 +167,7 @@ module frr-nexthop {
     }
 
     leaf interface {
-      type string;
+      type frr-interface:interface-ref;
       description
         "The nexthop egress interface.";
     }
@@ -275,7 +275,7 @@ module frr-nexthop {
       description
         "List of nexthop groups, each contains group of nexthops";
       leaf name {
-        type string;
+        type nexthop-group-ref;
         description
           "The nexthop-group name.";
       }
index f5775ab9685cd34b4cb3b1ba9f1bf5624ac7598c..929c916069b318398818893e5b020f776480f93e 100644 (file)
@@ -12,6 +12,12 @@ module frr-ripd {
   import frr-interface {
     prefix frr-interface;
   }
+  import frr-vrf {
+    prefix frr-vrf;
+  }
+  import frr-route-map {
+    prefix frr-route-map;
+  }
   import frr-route-types {
     prefix frr-route-types;
   }
@@ -72,7 +78,7 @@ module frr-ripd {
         "RIP routing instance.";
 
       leaf vrf {
-        type string;
+        type frr-vrf:vrf-ref;
         description
           "VRF name.";
       }
@@ -227,9 +233,7 @@ module frr-ripd {
           must '. != "rip"';
         }
         leaf route-map {
-          type string {
-            length "1..max";
-          }
+          type frr-route-map:route-map-ref;
           description
             "Applies the conditions of the specified route-map to
              routes that are redistributed into the RIP routing
@@ -396,7 +400,7 @@ module frr-ripd {
                 "Next hop IPv4 address.";
             }
             leaf interface {
-              type string;
+              type frr-interface:interface-ref;
               description
                 "The interface that the route uses.";
             }
@@ -587,7 +591,7 @@ module frr-ripd {
 
     input {
       leaf vrf {
-        type string;
+        type frr-vrf:vrf-ref;
         description
           "VRF name identifying a specific RIP instance.
            This leaf is optional for the rpc.
@@ -608,7 +612,7 @@ module frr-ripd {
        receives a PDU with the wrong authentication type
        field.";
     leaf interface-name {
-      type string;
+      type frr-interface:interface-ref;
       description
         "Describes the name of the RIP interface.";
     }
@@ -624,7 +628,7 @@ module frr-ripd {
        receives a PDU with the wrong authentication
        information.";
     leaf interface-name {
-      type string;
+      type frr-interface:interface-ref;
       description
         "Describes the name of the RIP interface.";
     }
index 52e208b2c9c8d9a4f1862407ea7fa2c1342f3537..07d38bd4167e0f238beda2d8fb2059223f1823b7 100644 (file)
@@ -12,6 +12,12 @@ module frr-ripngd {
   import frr-interface {
     prefix frr-interface;
   }
+  import frr-vrf {
+    prefix frr-vrf;
+  }
+  import frr-route-map {
+    prefix frr-route-map;
+  }
   import frr-route-types {
     prefix frr-route-types;
   }
@@ -71,7 +77,7 @@ module frr-ripngd {
         "RIPng routing instance.";
 
       leaf vrf {
-        type string;
+        type frr-vrf:vrf-ref;
         description
           "VRF name.";
       }
@@ -170,9 +176,7 @@ module frr-ripngd {
           must '. != "ripng"';
         }
         leaf route-map {
-          type string {
-            length "1..max";
-          }
+          type frr-route-map:route-map-ref;
           description
             "Applies the conditions of the specified route-map to
              routes that are redistributed into the RIPng routing
@@ -298,7 +302,7 @@ module frr-ripngd {
                 "Next hop IPv6 address.";
             }
             leaf interface {
-              type string;
+              type frr-interface:interface-ref;
               description
                 "The interface that the route uses.";
             }
@@ -359,7 +363,7 @@ module frr-ripngd {
 
     input {
       leaf vrf {
-        type string;
+        type frr-vrf:vrf-ref;
         description
           "VRF name identifying a specific RIPng instance.
            This leaf is optional for the rpc.
index 52607f9ad03bb2f8286dd0abc1468ab37c5cd4d2..f8441669afb90c092837d7c37cbd2a0f01355df9 100644 (file)
@@ -249,7 +249,7 @@ module frr-routing {
              instance.";
         }
         leaf vrf {
-          type string;
+          type frr-vrf:vrf-ref;
           description
             "vrf for control-plane protocol";
         }
index 61915b1349830a1d4e472e06d05a7c4a032b6dc7..2f89ebca886d26854fd8f7433da2234a32c64682 100644 (file)
@@ -57,7 +57,7 @@ module frr-test-module {
         }
         container interfaces {
           leaf-list interface {
-            type string;
+            type frr-interface:interface-ref;
           }
         }
         container routes {
@@ -69,7 +69,7 @@ module frr-test-module {
               type inet:ipv4-address;
             }
             leaf interface {
-              type string;
+              type frr-interface:interface-ref;
             }
             leaf metric {
               type uint8;
index 2efc45c1464b1b756547097d710703d56475304b..782e0a4b7422c99af5bdbcc8128f9ebfb369ca92 100644 (file)
@@ -2137,7 +2137,7 @@ module frr-zebra {
           "The admin distance to use for imported routes.";
       }
       leaf route-map {
-        type string;
+        type frr-route-map:route-map-ref;
         description
           "A route-map to filter imported routes.";
       }