]> git.proxmox.com Git - mirror_frr.git/commitdiff
yang: fix YANG lint
authorChristian Hopps <chopps@labn.net>
Thu, 6 Apr 2023 10:39:06 +0000 (06:39 -0400)
committerChristian Hopps <chopps@labn.net>
Fri, 7 Apr 2023 01:47:20 +0000 (21:47 -0400)
Signed-off-by: Christian Hopps <chopps@labn.net>
yang/frr-ripd.yang

index 746bf35d28fe286b80ba87c67cd67f6dc87d22d8..18abbf2f76998123418fc4bc72a3ad879b677d83 100644 (file)
@@ -60,6 +60,7 @@ module frr-ripd {
     description
       "Changed interface references to use
       frr-interface:interface-ref typedef";
+    reference "FRRouting";
   }
   revision 2017-12-06 {
     description
@@ -70,9 +71,7 @@ module frr-ripd {
   }
 
   container ripd {
-    /*
-     * Routing instance configuration.
-     */
+    description "rip routing instance data";
     list instance {
       key "vrf";
       description
@@ -229,9 +228,9 @@ module frr-ripd {
           "Redistributes routes learned from other routing protocols.";
         leaf protocol {
           type frr-route-types:frr-route-types-v4;
+          must '. != "rip"';
           description
             "Routing protocol.";
-          must '. != "rip"';
         }
         leaf route-map {
           type frr-route-map:route-map-ref;
@@ -291,11 +290,8 @@ module frr-ripd {
         }
       }
       container version {
+        description "version of rip";
         leaf receive {
-          must
-            '(. = "1" and ../send = "1") or ' +
-            '(. = "2" and ../send = "2") or ' +
-            '(. = "1-2" and ../send = "2")';
           type enumeration {
             enum "1" {
               value 1;
@@ -313,15 +309,15 @@ module frr-ripd {
                 "Accept both RIPv1 and RIPv2 updates.";
             }
           }
+          must
+            '(. = "1" and ../send = "1") or ' +
+            '(. = "2" and ../send = "2") or ' +
+            '(. = "1-2" and ../send = "2")';
           default "1-2";
           description
             "Advertisement reception - Version control.";
         }
         leaf send {
-          must
-            '(../receive = "1" and . = "1") or ' +
-            '(../receive = "2" and . = "2") or ' +
-            '(../receive = "1-2" and . = "2")';
           type enumeration {
             enum "1" {
               value 1;
@@ -334,6 +330,10 @@ module frr-ripd {
                 "Send RIPv2 updates only.";
             }
           }
+          must
+            '(../receive = "1" and . = "1") or ' +
+            '(../receive = "2" and . = "2") or ' +
+            '(../receive = "1-2" and . = "2")';
           default "2";
           description
             "Advertisement transmission - Version control.";
@@ -426,6 +426,7 @@ module frr-ripd {
    * Per-interface configuration data
    */
   augment "/frr-interface:lib/frr-interface:interface" {
+    description "rip interface data";
     container rip {
       description
         "RIP interface parameters.";