1 module frr-zebra-route-map {
3 namespace "http://frrouting.org/yang/zebra-route-map";
4 prefix frr-zebra-route-map;
6 import ietf-inet-types {
10 import frr-route-map {
14 import frr-route-types {
15 prefix frr-route-types;
21 "FRR Users List: <mailto:frog@lists.frrouting.org>
22 FRR Development List: <mailto:dev@lists.frrouting.org>";
24 "This module defines zebra route map settings";
31 identity ipv4-prefix-length {
32 base frr-route-map:rmap-match-type;
34 "Match IPv4 address prefix length";
37 identity ipv4-next-hop-prefix-length {
38 base frr-route-map:rmap-match-type;
40 "Match IPv4 next-hop address prefix length";
43 identity ipv6-prefix-length {
44 base frr-route-map:rmap-match-type;
46 "Match IPv6 address prefix length";
49 identity source-instance {
50 base frr-route-map:rmap-match-type;
52 "Match the protocol's instance number";
55 identity source-protocol {
56 base frr-route-map:rmap-match-type;
58 "Match protocol via which the route was learnt";
61 identity src-address {
62 base frr-route-map:rmap-set-type;
64 "Set IPv4/IPv6 source address for route";
67 augment "/frr-route-map:lib"
68 + "/frr-route-map:route-map"
69 + "/frr-route-map:entry"
70 + "/frr-route-map:match-condition"
71 + "/frr-route-map:rmap-match-condition"
72 + "/frr-route-map:match-condition" {
73 case ipv4-prefix-length {
74 when "derived-from-or-self(../frr-route-map:condition, 'frr-zebra-route-map:ipv4-prefix-length') or "
75 + "derived-from-or-self(../frr-route-map:condition, 'frr-zebra-route-map:ipv4-next-hop-prefix-length')";
76 leaf ipv4-prefix-length {
83 case ipv6-prefix-length {
84 when "derived-from-or-self(../frr-route-map:condition, 'frr-zebra-route-map:ipv6-prefix-length')";
85 leaf ipv6-prefix-length {
92 case source-instance {
93 when "derived-from-or-self(../frr-route-map:condition, 'frr-zebra-route-map:source-instance')";
94 leaf source-instance {
101 case source-protocol {
102 when "derived-from-or-self(../frr-route-map:condition, 'frr-zebra-route-map:source-protocol')";
103 leaf source-protocol {
104 type frr-route-types:frr-route-types;
109 augment "/frr-route-map:lib"
110 + "/frr-route-map:route-map"
111 + "/frr-route-map:entry"
112 + "/frr-route-map:set-action"
113 + "/frr-route-map:rmap-set-action"
114 + "/frr-route-map:set-action" {
116 when "derived-from-or-self(../frr-route-map:action, 'frr-zebra-route-map:src-address')";
119 "Value of the source address";
120 case ipv4-src-address {
121 leaf ipv4-src-address {
122 type inet:ipv4-address;
127 case ipv6-src-address {
128 leaf ipv6-src-address {
129 type inet:ipv6-address;