forked from Mirror/frr
lib: cleanup yang lint warnings
Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
parent
18257b521a
commit
dc8f136064
|
@ -45,114 +45,112 @@ module frr-filter {
|
||||||
|
|
||||||
revision 2019-07-04 {
|
revision 2019-07-04 {
|
||||||
description "Initial revision";
|
description "Initial revision";
|
||||||
|
reference "FRRouting";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Types.
|
* Types.
|
||||||
*/
|
*/
|
||||||
typedef access-list-name {
|
typedef access-list-name {
|
||||||
description "Access list name formatting";
|
|
||||||
type string {
|
type string {
|
||||||
length 1..128;
|
length 1..128;
|
||||||
}
|
}
|
||||||
|
description "Access list name formatting";
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef access-list-sequence {
|
typedef access-list-sequence {
|
||||||
description "Access list sequence number";
|
|
||||||
type uint32 {
|
type uint32 {
|
||||||
range "1..4294967295";
|
range "1..4294967295";
|
||||||
}
|
}
|
||||||
|
description "Access list sequence number";
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef access-list-action {
|
typedef access-list-action {
|
||||||
description "Access list return action on match";
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum deny {
|
enum deny {
|
||||||
description "Deny an entry";
|
|
||||||
value 0;
|
value 0;
|
||||||
|
description "Deny an entry";
|
||||||
}
|
}
|
||||||
enum permit {
|
enum permit {
|
||||||
description "Accept an entry";
|
|
||||||
value 1;
|
value 1;
|
||||||
|
description "Accept an entry";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
description "Access list return action on match";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Configuration data.
|
* Configuration data.
|
||||||
*/
|
*/
|
||||||
container lib {
|
container lib {
|
||||||
|
description "Filter library";
|
||||||
list access-list {
|
list access-list {
|
||||||
|
key "type name";
|
||||||
description "Access list instance";
|
description "Access list instance";
|
||||||
|
|
||||||
key "type name";
|
|
||||||
|
|
||||||
leaf type {
|
leaf type {
|
||||||
description "Access list content type";
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum ipv4 {
|
enum ipv4 {
|
||||||
description "Internet Protocol address version 4";
|
|
||||||
value 0;
|
value 0;
|
||||||
|
description "Internet Protocol address version 4";
|
||||||
}
|
}
|
||||||
enum ipv6 {
|
enum ipv6 {
|
||||||
description "Internet Protocol address version 6";
|
|
||||||
value 1;
|
value 1;
|
||||||
|
description "Internet Protocol address version 6";
|
||||||
}
|
}
|
||||||
enum mac {
|
enum mac {
|
||||||
description "Media Access Control address";
|
|
||||||
value 2;
|
value 2;
|
||||||
|
description "Media Access Control address";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
description "Access list content type";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf name {
|
leaf name {
|
||||||
description "Access list name";
|
|
||||||
type access-list-name;
|
type access-list-name;
|
||||||
|
description "Access list name";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf remark {
|
leaf remark {
|
||||||
description "Access list remark";
|
|
||||||
type string;
|
type string;
|
||||||
|
description "Access list remark";
|
||||||
}
|
}
|
||||||
|
|
||||||
list entry {
|
list entry {
|
||||||
description "Access list entry";
|
|
||||||
|
|
||||||
key "sequence";
|
key "sequence";
|
||||||
|
description "Access list entry";
|
||||||
leaf sequence {
|
leaf sequence {
|
||||||
description "Access list sequence value";
|
|
||||||
type access-list-sequence;
|
type access-list-sequence;
|
||||||
|
description "Access list sequence value";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf action {
|
leaf action {
|
||||||
description "Access list action on match";
|
|
||||||
type access-list-action;
|
type access-list-action;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Access list action on match";
|
||||||
}
|
}
|
||||||
|
|
||||||
choice value {
|
choice value {
|
||||||
description "Access list value to match";
|
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Access list value to match";
|
||||||
|
|
||||||
case ipv4-prefix {
|
case ipv4-prefix {
|
||||||
when "../type = 'ipv4'";
|
when "../type = 'ipv4'";
|
||||||
|
|
||||||
choice style {
|
choice style {
|
||||||
description "Access list entry style selection: zebra or cisco.";
|
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Access list entry style selection: zebra or cisco.";
|
||||||
|
|
||||||
case zebra {
|
case zebra {
|
||||||
leaf ipv4-prefix {
|
leaf ipv4-prefix {
|
||||||
description "Configure IPv4 prefix to match";
|
|
||||||
type inet:ipv4-prefix;
|
type inet:ipv4-prefix;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Configure IPv4 prefix to match";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf ipv4-exact-match {
|
leaf ipv4-exact-match {
|
||||||
description "Exact match of prefix";
|
|
||||||
type boolean;
|
type boolean;
|
||||||
default false;
|
default false;
|
||||||
|
description "Exact match of prefix";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case cisco {
|
case cisco {
|
||||||
|
@ -160,19 +158,20 @@ module frr-filter {
|
||||||
description "Source value to match";
|
description "Source value to match";
|
||||||
|
|
||||||
leaf host {
|
leaf host {
|
||||||
description "Host to match";
|
|
||||||
type inet:ipv4-address;
|
type inet:ipv4-address;
|
||||||
|
description "Host to match";
|
||||||
}
|
}
|
||||||
container network {
|
container network {
|
||||||
|
description "Network to match";
|
||||||
leaf address {
|
leaf address {
|
||||||
|
type inet:ipv4-address;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
description "Network address part.";
|
description "Network address part.";
|
||||||
type inet:ipv4-address;
|
|
||||||
}
|
}
|
||||||
leaf mask {
|
leaf mask {
|
||||||
|
type inet:ipv4-address;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
description "Network mask/wildcard part.";
|
description "Network mask/wildcard part.";
|
||||||
type inet:ipv4-address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
leaf source-any {
|
leaf source-any {
|
||||||
|
@ -180,8 +179,8 @@ module frr-filter {
|
||||||
* Was `any`, however it conflicts with `any` leaf
|
* Was `any`, however it conflicts with `any` leaf
|
||||||
* outside this choice.
|
* outside this choice.
|
||||||
*/
|
*/
|
||||||
description "Match any";
|
|
||||||
type empty;
|
type empty;
|
||||||
|
description "Match any";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,24 +188,25 @@ module frr-filter {
|
||||||
description "Destination value to match";
|
description "Destination value to match";
|
||||||
|
|
||||||
leaf destination-host {
|
leaf destination-host {
|
||||||
description "Host to match";
|
|
||||||
type inet:ipv4-address;
|
type inet:ipv4-address;
|
||||||
|
description "Host to match";
|
||||||
}
|
}
|
||||||
container destination-network {
|
container destination-network {
|
||||||
|
description "Destination network to match";
|
||||||
leaf address {
|
leaf address {
|
||||||
|
type inet:ipv4-address;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
description "Network address part.";
|
description "Network address part.";
|
||||||
type inet:ipv4-address;
|
|
||||||
}
|
}
|
||||||
leaf mask {
|
leaf mask {
|
||||||
|
type inet:ipv4-address;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
description "Network mask/wildcard part.";
|
description "Network mask/wildcard part.";
|
||||||
type inet:ipv4-address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
leaf destination-any {
|
leaf destination-any {
|
||||||
description "Match any";
|
|
||||||
type empty;
|
type empty;
|
||||||
|
description "Match any";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,29 +216,29 @@ module frr-filter {
|
||||||
when "../type = 'ipv6'";
|
when "../type = 'ipv6'";
|
||||||
|
|
||||||
leaf ipv6-prefix {
|
leaf ipv6-prefix {
|
||||||
description "Configure IPv6 prefix to match";
|
|
||||||
type inet:ipv6-prefix;
|
type inet:ipv6-prefix;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Configure IPv6 prefix to match";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf ipv6-exact-match {
|
leaf ipv6-exact-match {
|
||||||
description "Exact match of prefix";
|
|
||||||
type boolean;
|
type boolean;
|
||||||
default false;
|
default false;
|
||||||
|
description "Exact match of prefix";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case mac {
|
case mac {
|
||||||
when "../type = 'mac'";
|
when "../type = 'mac'";
|
||||||
|
|
||||||
leaf mac {
|
leaf mac {
|
||||||
description "Configure MAC address to match";
|
|
||||||
type yang:mac-address;
|
type yang:mac-address;
|
||||||
|
description "Configure MAC address to match";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case any {
|
case any {
|
||||||
leaf any {
|
leaf any {
|
||||||
description "Match anything";
|
|
||||||
type empty;
|
type empty;
|
||||||
|
description "Match anything";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,108 +246,104 @@ module frr-filter {
|
||||||
}
|
}
|
||||||
|
|
||||||
list prefix-list {
|
list prefix-list {
|
||||||
description "Prefix list instance";
|
|
||||||
|
|
||||||
key "type name";
|
key "type name";
|
||||||
|
description "Prefix list instance";
|
||||||
leaf type {
|
leaf type {
|
||||||
description "Prefix list type";
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum ipv4 {
|
enum ipv4 {
|
||||||
description "Internet Protocol address version 4";
|
|
||||||
value 0;
|
value 0;
|
||||||
|
description "Internet Protocol address version 4";
|
||||||
}
|
}
|
||||||
enum ipv6 {
|
enum ipv6 {
|
||||||
description "Internet Protocol address version 6";
|
|
||||||
value 1;
|
value 1;
|
||||||
|
description "Internet Protocol address version 6";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
description "Prefix list type";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf name {
|
leaf name {
|
||||||
description "Prefix list name";
|
|
||||||
type access-list-name;
|
type access-list-name;
|
||||||
|
description "Prefix list name";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf remark {
|
leaf remark {
|
||||||
description "Prefix list user description";
|
|
||||||
type string;
|
type string;
|
||||||
|
description "Prefix list user description";
|
||||||
}
|
}
|
||||||
|
|
||||||
list entry {
|
list entry {
|
||||||
description "Prefix list entry";
|
|
||||||
|
|
||||||
key "sequence";
|
key "sequence";
|
||||||
|
description "Prefix list entry";
|
||||||
leaf sequence {
|
leaf sequence {
|
||||||
description "Prefix list sequence value";
|
|
||||||
type access-list-sequence;
|
type access-list-sequence;
|
||||||
|
description "Prefix list sequence value";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf action {
|
leaf action {
|
||||||
description "Prefix list action on match";
|
|
||||||
type access-list-action;
|
type access-list-action;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Prefix list action on match";
|
||||||
}
|
}
|
||||||
|
|
||||||
choice value {
|
choice value {
|
||||||
description "Prefix list value to match";
|
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Prefix list value to match";
|
||||||
|
|
||||||
case ipv4-prefix {
|
case ipv4-prefix {
|
||||||
leaf ipv4-prefix {
|
leaf ipv4-prefix {
|
||||||
description "Configure IPv4 prefix to match";
|
|
||||||
type inet:ipv4-prefix;
|
type inet:ipv4-prefix;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Configure IPv4 prefix to match";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf ipv4-prefix-length-greater-or-equal {
|
leaf ipv4-prefix-length-greater-or-equal {
|
||||||
|
type uint8 {
|
||||||
|
range "0..32";
|
||||||
|
}
|
||||||
description
|
description
|
||||||
"Specifies if matching prefixes with length greater than
|
"Specifies if matching prefixes with length greater than
|
||||||
or equal to value";
|
or equal to value";
|
||||||
type uint8 {
|
|
||||||
range "0..32";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf ipv4-prefix-length-lesser-or-equal {
|
leaf ipv4-prefix-length-lesser-or-equal {
|
||||||
description
|
|
||||||
"Specifies if matching prefixes with length lesser than
|
|
||||||
or equal to value";
|
|
||||||
type uint8 {
|
type uint8 {
|
||||||
range "0..32";
|
range "0..32";
|
||||||
}
|
}
|
||||||
|
description
|
||||||
|
"Specifies if matching prefixes with length lesser than
|
||||||
|
or equal to value";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case ipv6-prefix {
|
case ipv6-prefix {
|
||||||
leaf ipv6-prefix {
|
leaf ipv6-prefix {
|
||||||
description "Configure IPv6 prefix to match";
|
|
||||||
type inet:ipv6-prefix;
|
type inet:ipv6-prefix;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description "Configure IPv6 prefix to match";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf ipv6-prefix-length-greater-or-equal {
|
leaf ipv6-prefix-length-greater-or-equal {
|
||||||
|
type uint8 {
|
||||||
|
range "0..128";
|
||||||
|
}
|
||||||
description
|
description
|
||||||
"Specifies if matching prefixes with length greater than
|
"Specifies if matching prefixes with length greater than
|
||||||
or equal to value";
|
or equal to value";
|
||||||
type uint8 {
|
|
||||||
range "0..128";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf ipv6-prefix-length-lesser-or-equal {
|
leaf ipv6-prefix-length-lesser-or-equal {
|
||||||
description
|
|
||||||
"Specifies if matching prefixes with length lesser than
|
|
||||||
or equal to value";
|
|
||||||
type uint8 {
|
type uint8 {
|
||||||
range "0..128";
|
range "0..128";
|
||||||
}
|
}
|
||||||
|
description
|
||||||
|
"Specifies if matching prefixes with length lesser than
|
||||||
|
or equal to value";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case any {
|
case any {
|
||||||
leaf any {
|
leaf any {
|
||||||
description "Match anything";
|
|
||||||
type empty;
|
type empty;
|
||||||
|
description "Match anything";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -380,9 +380,9 @@ module frr-ripd {
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf default-bfd-profile {
|
leaf default-bfd-profile {
|
||||||
|
type frr-bfdd:profile-ref;
|
||||||
description
|
description
|
||||||
"Use this BFD profile for all peers by default.";
|
"Use this BFD profile for all peers by default.";
|
||||||
type frr-bfdd:profile-ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -691,12 +691,13 @@ module frr-ripd {
|
||||||
container bfd-monitoring {
|
container bfd-monitoring {
|
||||||
presence
|
presence
|
||||||
"Present if BFD is configured for RIP peers in this interface.";
|
"Present if BFD is configured for RIP peers in this interface.";
|
||||||
|
description "Configure BFD use in RIPD";
|
||||||
|
|
||||||
leaf enable {
|
leaf enable {
|
||||||
type boolean;
|
type boolean;
|
||||||
|
default false;
|
||||||
description
|
description
|
||||||
"Enable/disable BFD monitoring.";
|
"Enable/disable BFD monitoring.";
|
||||||
default false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf profile {
|
leaf profile {
|
||||||
|
|
Loading…
Reference in a new issue