mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-29 21:57:15 +00:00
yang: route-map style format
Align to yanglint format Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
This commit is contained in:
parent
37746447c1
commit
1cbba4b0bd
@ -6,14 +6,17 @@ module frr-route-map {
|
|||||||
import ietf-inet-types {
|
import ietf-inet-types {
|
||||||
prefix inet;
|
prefix inet;
|
||||||
}
|
}
|
||||||
|
|
||||||
import frr-filter {
|
import frr-filter {
|
||||||
prefix filter;
|
prefix filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
import frr-interface {
|
import frr-interface {
|
||||||
prefix frr-interface;
|
prefix frr-interface;
|
||||||
}
|
}
|
||||||
|
|
||||||
organization "FRRouting";
|
organization
|
||||||
|
"FRRouting";
|
||||||
contact
|
contact
|
||||||
"FRR Users List: <mailto:frog@lists.frrouting.org>
|
"FRR Users List: <mailto:frog@lists.frrouting.org>
|
||||||
FRR Development List: <mailto:dev@lists.frrouting.org>";
|
FRR Development List: <mailto:dev@lists.frrouting.org>";
|
||||||
@ -46,22 +49,25 @@ module frr-route-map {
|
|||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
|
||||||
|
|
||||||
revision 2019-07-01 {
|
revision 2019-07-01 {
|
||||||
description "Initial revision";
|
description
|
||||||
|
"Initial revision";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Types.
|
* Types.
|
||||||
*/
|
*/
|
||||||
typedef route-map-sequence {
|
typedef route-map-sequence {
|
||||||
description "Route map valid sequence numbers";
|
|
||||||
type uint16 {
|
type uint16 {
|
||||||
range "1..65535";
|
range "1..65535";
|
||||||
}
|
}
|
||||||
|
description
|
||||||
|
"Route map valid sequence numbers";
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef route-map-name {
|
typedef route-map-name {
|
||||||
description "Route map name format";
|
|
||||||
type string;
|
type string;
|
||||||
|
description
|
||||||
|
"Route map name format";
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef route-map-ref {
|
typedef route-map-ref {
|
||||||
@ -78,20 +84,19 @@ module frr-route-map {
|
|||||||
*/
|
*/
|
||||||
container lib {
|
container lib {
|
||||||
list route-map {
|
list route-map {
|
||||||
description "Route map instance";
|
|
||||||
|
|
||||||
key "name";
|
key "name";
|
||||||
|
description
|
||||||
|
"Route map instance";
|
||||||
leaf name {
|
leaf name {
|
||||||
description "Route map instance name";
|
|
||||||
type route-map-name;
|
type route-map-name;
|
||||||
|
description
|
||||||
|
"Route map instance name";
|
||||||
}
|
}
|
||||||
|
|
||||||
list entry {
|
list entry {
|
||||||
description "Route map entry";
|
|
||||||
|
|
||||||
key "sequence";
|
key "sequence";
|
||||||
|
description
|
||||||
|
"Route map entry";
|
||||||
leaf sequence {
|
leaf sequence {
|
||||||
description
|
description
|
||||||
"Route map instance priority (low number means higher priority)";
|
"Route map instance priority (low number means higher priority)";
|
||||||
@ -163,10 +168,9 @@ module frr-route-map {
|
|||||||
}
|
}
|
||||||
|
|
||||||
list match-condition {
|
list match-condition {
|
||||||
description "Route map match conditions";
|
|
||||||
|
|
||||||
key "condition";
|
key "condition";
|
||||||
|
description
|
||||||
|
"Route map match conditions";
|
||||||
leaf condition {
|
leaf condition {
|
||||||
description "Match condition";
|
description "Match condition";
|
||||||
type enumeration {
|
type enumeration {
|
||||||
@ -248,6 +252,7 @@ module frr-route-map {
|
|||||||
type string;
|
type string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case list-name {
|
case list-name {
|
||||||
when "./condition = 'ipv4-address-list' or
|
when "./condition = 'ipv4-address-list' or
|
||||||
./condition = 'ipv4-prefix-list' or
|
./condition = 'ipv4-prefix-list' or
|
||||||
@ -259,6 +264,7 @@ module frr-route-map {
|
|||||||
type filter:access-list-name;
|
type filter:access-list-name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case ipv4-next-hop-type {
|
case ipv4-next-hop-type {
|
||||||
when "./condition = 'ipv4-next-hop-type'";
|
when "./condition = 'ipv4-next-hop-type'";
|
||||||
leaf ipv4-next-hop-type {
|
leaf ipv4-next-hop-type {
|
||||||
@ -269,6 +275,7 @@ module frr-route-map {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case ipv6-next-hop-type {
|
case ipv6-next-hop-type {
|
||||||
when "./condition = 'ipv6-next-hop-type'";
|
when "./condition = 'ipv6-next-hop-type'";
|
||||||
leaf ipv6-next-hop-type {
|
leaf ipv6-next-hop-type {
|
||||||
@ -279,6 +286,7 @@ module frr-route-map {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case metric {
|
case metric {
|
||||||
when "./condition = 'metric'";
|
when "./condition = 'metric'";
|
||||||
leaf metric {
|
leaf metric {
|
||||||
@ -287,6 +295,7 @@ module frr-route-map {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case tag {
|
case tag {
|
||||||
when "./condition = 'tag'";
|
when "./condition = 'tag'";
|
||||||
leaf tag {
|
leaf tag {
|
||||||
@ -340,6 +349,7 @@ module frr-route-map {
|
|||||||
type inet:ipv4-address;
|
type inet:ipv4-address;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case ipv6-address {
|
case ipv6-address {
|
||||||
when "./action = 'ipv6-next-hop'";
|
when "./action = 'ipv6-next-hop'";
|
||||||
leaf ipv6-address {
|
leaf ipv6-address {
|
||||||
@ -347,6 +357,7 @@ module frr-route-map {
|
|||||||
type inet:ipv6-address;
|
type inet:ipv6-address;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case metric {
|
case metric {
|
||||||
when "./action = 'metric'";
|
when "./action = 'metric'";
|
||||||
choice metric-value {
|
choice metric-value {
|
||||||
@ -359,30 +370,35 @@ module frr-route-map {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case add-metric {
|
case add-metric {
|
||||||
leaf add-metric {
|
leaf add-metric {
|
||||||
description "Add unit to metric";
|
description "Add unit to metric";
|
||||||
type boolean;
|
type boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case subtract-metric {
|
case subtract-metric {
|
||||||
leaf subtract-metric {
|
leaf subtract-metric {
|
||||||
description "Subtract unit from metric";
|
description "Subtract unit from metric";
|
||||||
type boolean;
|
type boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case use-round-trip-time {
|
case use-round-trip-time {
|
||||||
leaf use-round-trip-time {
|
leaf use-round-trip-time {
|
||||||
description "Use the round trip time as metric";
|
description "Use the round trip time as metric";
|
||||||
type boolean;
|
type boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case add-round-trip-time {
|
case add-round-trip-time {
|
||||||
leaf add-round-trip-time {
|
leaf add-round-trip-time {
|
||||||
description "Add round trip time to metric";
|
description "Add round trip time to metric";
|
||||||
type boolean;
|
type boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case subtract-round-trip-time {
|
case subtract-round-trip-time {
|
||||||
leaf subtract-round-trip-time {
|
leaf subtract-round-trip-time {
|
||||||
description "Subtract round trip time to metric";
|
description "Subtract round trip time to metric";
|
||||||
@ -391,6 +407,7 @@ module frr-route-map {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case tag {
|
case tag {
|
||||||
when "./action = 'tag'";
|
when "./action = 'tag'";
|
||||||
leaf tag {
|
leaf tag {
|
||||||
|
Loading…
Reference in New Issue
Block a user