]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-zebra-route-map.yang
Merge pull request #12424 from opensourcerouting/static-route-bfd
[mirror_frr.git] / yang / frr-zebra-route-map.yang
1 module frr-zebra-route-map {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/zebra-route-map";
4 prefix frr-zebra-route-map;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9
10 import frr-route-map {
11 prefix frr-route-map;
12 }
13
14 import frr-route-types {
15 prefix frr-route-types;
16 }
17
18 organization
19 "Free Range Routing";
20 contact
21 "FRR Users List: <mailto:frog@lists.frrouting.org>
22 FRR Development List: <mailto:dev@lists.frrouting.org>";
23 description
24 "This module defines zebra route map settings";
25
26 revision 2020-01-02 {
27 description
28 "Initial revision";
29 }
30
31 identity ipv4-prefix-length {
32 base frr-route-map:rmap-match-type;
33 description
34 "Match IPv4 address prefix length";
35 }
36
37 identity ipv4-next-hop-prefix-length {
38 base frr-route-map:rmap-match-type;
39 description
40 "Match IPv4 next-hop address prefix length";
41 }
42
43 identity ipv6-prefix-length {
44 base frr-route-map:rmap-match-type;
45 description
46 "Match IPv6 address prefix length";
47 }
48
49 identity source-instance {
50 base frr-route-map:rmap-match-type;
51 description
52 "Match the protocol's instance number";
53 }
54
55 identity source-protocol {
56 base frr-route-map:rmap-match-type;
57 description
58 "Match protocol via which the route was learnt";
59 }
60
61 identity src-address {
62 base frr-route-map:rmap-set-type;
63 description
64 "Set IPv4/IPv6 source address for route";
65 }
66
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 {
77 type uint8 {
78 range "0..32";
79 }
80 }
81 }
82
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 {
86 type uint8 {
87 range "0..128";
88 }
89 }
90 }
91
92 case source-instance {
93 when "derived-from-or-self(../frr-route-map:condition, 'frr-zebra-route-map:source-instance')";
94 leaf source-instance {
95 type uint8 {
96 range "0..255";
97 }
98 }
99 }
100
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;
105 }
106 }
107 }
108
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" {
115 case src-address {
116 when "derived-from-or-self(../frr-route-map:action, 'frr-zebra-route-map:src-address')";
117 choice src-address {
118 description
119 "Value of the source address";
120 case ipv4-src-address {
121 leaf ipv4-src-address {
122 type inet:ipv4-address;
123 mandatory true;
124 }
125 }
126
127 case ipv6-src-address {
128 leaf ipv6-src-address {
129 type inet:ipv6-address;
130 mandatory true;
131 }
132 }
133 }
134 }
135 }
136 }