From: Christian Hopps Date: Sat, 20 Jan 2024 00:33:09 +0000 (+0000) Subject: lib: cleanup yang lint warnings X-Git-Tag: base_10.0~99^2~4 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=dc8f1360641596bf7e88f983fbeaafed332d88cf;p=matthieu%2Ffrr.git lib: cleanup yang lint warnings Signed-off-by: Christian Hopps --- diff --git a/yang/frr-filter.yang b/yang/frr-filter.yang index a1946d8342..867e59826c 100644 --- a/yang/frr-filter.yang +++ b/yang/frr-filter.yang @@ -45,114 +45,112 @@ module frr-filter { revision 2019-07-04 { description "Initial revision"; + reference "FRRouting"; } /* * Types. */ typedef access-list-name { - description "Access list name formatting"; type string { length 1..128; } + description "Access list name formatting"; } typedef access-list-sequence { - description "Access list sequence number"; type uint32 { range "1..4294967295"; } + description "Access list sequence number"; } typedef access-list-action { - description "Access list return action on match"; type enumeration { enum deny { - description "Deny an entry"; value 0; + description "Deny an entry"; } enum permit { - description "Accept an entry"; value 1; + description "Accept an entry"; } } + description "Access list return action on match"; } /* * Configuration data. */ container lib { + description "Filter library"; list access-list { - description "Access list instance"; - key "type name"; + description "Access list instance"; leaf type { - description "Access list content type"; type enumeration { enum ipv4 { - description "Internet Protocol address version 4"; value 0; + description "Internet Protocol address version 4"; } enum ipv6 { - description "Internet Protocol address version 6"; value 1; + description "Internet Protocol address version 6"; } enum mac { - description "Media Access Control address"; value 2; + description "Media Access Control address"; } } + description "Access list content type"; } leaf name { - description "Access list name"; type access-list-name; + description "Access list name"; } leaf remark { - description "Access list remark"; type string; + description "Access list remark"; } list entry { - description "Access list entry"; - key "sequence"; - + description "Access list entry"; leaf sequence { - description "Access list sequence value"; type access-list-sequence; + description "Access list sequence value"; } - leaf action { - description "Access list action on match"; type access-list-action; mandatory true; + description "Access list action on match"; } choice value { - description "Access list value to match"; mandatory true; + description "Access list value to match"; case ipv4-prefix { when "../type = 'ipv4'"; choice style { - description "Access list entry style selection: zebra or cisco."; mandatory true; + description "Access list entry style selection: zebra or cisco."; case zebra { leaf ipv4-prefix { - description "Configure IPv4 prefix to match"; type inet:ipv4-prefix; mandatory true; + description "Configure IPv4 prefix to match"; } leaf ipv4-exact-match { - description "Exact match of prefix"; type boolean; default false; + description "Exact match of prefix"; } } case cisco { @@ -160,19 +158,20 @@ module frr-filter { description "Source value to match"; leaf host { - description "Host to match"; type inet:ipv4-address; + description "Host to match"; } container network { + description "Network to match"; leaf address { + type inet:ipv4-address; mandatory true; description "Network address part."; - type inet:ipv4-address; } leaf mask { + type inet:ipv4-address; mandatory true; description "Network mask/wildcard part."; - type inet:ipv4-address; } } leaf source-any { @@ -180,8 +179,8 @@ module frr-filter { * Was `any`, however it conflicts with `any` leaf * outside this choice. */ - description "Match any"; type empty; + description "Match any"; } } @@ -189,24 +188,25 @@ module frr-filter { description "Destination value to match"; leaf destination-host { - description "Host to match"; type inet:ipv4-address; + description "Host to match"; } container destination-network { + description "Destination network to match"; leaf address { + type inet:ipv4-address; mandatory true; description "Network address part."; - type inet:ipv4-address; } leaf mask { + type inet:ipv4-address; mandatory true; description "Network mask/wildcard part."; - type inet:ipv4-address; } } leaf destination-any { - description "Match any"; type empty; + description "Match any"; } } } @@ -216,29 +216,29 @@ module frr-filter { when "../type = 'ipv6'"; leaf ipv6-prefix { - description "Configure IPv6 prefix to match"; type inet:ipv6-prefix; mandatory true; + description "Configure IPv6 prefix to match"; } leaf ipv6-exact-match { - description "Exact match of prefix"; type boolean; default false; + description "Exact match of prefix"; } } case mac { when "../type = 'mac'"; leaf mac { - description "Configure MAC address to match"; type yang:mac-address; + description "Configure MAC address to match"; } } case any { leaf any { - description "Match anything"; type empty; + description "Match anything"; } } } @@ -246,108 +246,104 @@ module frr-filter { } list prefix-list { - description "Prefix list instance"; - key "type name"; - + description "Prefix list instance"; leaf type { - description "Prefix list type"; type enumeration { enum ipv4 { - description "Internet Protocol address version 4"; value 0; + description "Internet Protocol address version 4"; } enum ipv6 { - description "Internet Protocol address version 6"; value 1; + description "Internet Protocol address version 6"; } } + description "Prefix list type"; } leaf name { - description "Prefix list name"; type access-list-name; + description "Prefix list name"; } leaf remark { - description "Prefix list user description"; type string; + description "Prefix list user description"; } list entry { - description "Prefix list entry"; - key "sequence"; - + description "Prefix list entry"; leaf sequence { - description "Prefix list sequence value"; type access-list-sequence; + description "Prefix list sequence value"; } leaf action { - description "Prefix list action on match"; type access-list-action; mandatory true; + description "Prefix list action on match"; } choice value { - description "Prefix list value to match"; mandatory true; + description "Prefix list value to match"; case ipv4-prefix { leaf ipv4-prefix { - description "Configure IPv4 prefix to match"; type inet:ipv4-prefix; mandatory true; + description "Configure IPv4 prefix to match"; } leaf ipv4-prefix-length-greater-or-equal { - description - "Specifies if matching prefixes with length greater than - or equal to value"; type uint8 { range "0..32"; } + description + "Specifies if matching prefixes with length greater than + or equal to value"; } leaf ipv4-prefix-length-lesser-or-equal { - description - "Specifies if matching prefixes with length lesser than - or equal to value"; type uint8 { range "0..32"; } + description + "Specifies if matching prefixes with length lesser than + or equal to value"; } } case ipv6-prefix { leaf ipv6-prefix { - description "Configure IPv6 prefix to match"; type inet:ipv6-prefix; mandatory true; + description "Configure IPv6 prefix to match"; } leaf ipv6-prefix-length-greater-or-equal { - description - "Specifies if matching prefixes with length greater than - or equal to value"; type uint8 { range "0..128"; } + description + "Specifies if matching prefixes with length greater than + or equal to value"; } leaf ipv6-prefix-length-lesser-or-equal { - description - "Specifies if matching prefixes with length lesser than - or equal to value"; type uint8 { range "0..128"; } + description + "Specifies if matching prefixes with length lesser than + or equal to value"; } } case any { leaf any { - description "Match anything"; type empty; + description "Match anything"; } } } diff --git a/yang/frr-ripd.yang b/yang/frr-ripd.yang index 5f85a4cabc..756e70b292 100644 --- a/yang/frr-ripd.yang +++ b/yang/frr-ripd.yang @@ -380,9 +380,9 @@ module frr-ripd { } leaf default-bfd-profile { + type frr-bfdd:profile-ref; description "Use this BFD profile for all peers by default."; - type frr-bfdd:profile-ref; } /* @@ -691,12 +691,13 @@ module frr-ripd { container bfd-monitoring { presence "Present if BFD is configured for RIP peers in this interface."; + description "Configure BFD use in RIPD"; leaf enable { type boolean; + default false; description "Enable/disable BFD monitoring."; - default false; } leaf profile {