]>
Commit | Line | Data |
---|---|---|
88fa5104 | 1 | /* |
2 | * Copyright (C) 2018 Vmware | |
3 | * Vishal Dhingra | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU General Public License as published by the Free | |
7 | * Software Foundation; either version 2 of the License, or (at your option) | |
8 | * any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
13 | * more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License along | |
16 | * with this program; see the file COPYING; if not, write to the Free Software | |
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | */ | |
1f8031f7 DL |
19 | #include <zebra.h> |
20 | ||
88fa5104 | 21 | #include "northbound.h" |
22 | #include "libfrr.h" | |
23 | #include "static_nb.h" | |
6cc73dad | 24 | #include "static_vty.h" |
88fa5104 | 25 | |
26 | /* clang-format off */ | |
27 | ||
28 | const struct frr_yang_module_info frr_staticd_info = { | |
29 | .name = "frr-staticd", | |
30 | .nodes = { | |
6cc73dad IR |
31 | { |
32 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd", | |
33 | .cbs = { | |
34 | .cli_show = static_cli_show, | |
35 | .cli_show_end = static_cli_show_end, | |
36 | } | |
37 | }, | |
88fa5104 | 38 | { |
39 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list", | |
40 | .cbs = { | |
41 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_create, | |
42 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_destroy, | |
6cc73dad | 43 | .cli_cmp = static_route_list_cli_cmp, |
88fa5104 | 44 | } |
45 | }, | |
46 | { | |
47 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list", | |
48 | .cbs = { | |
49 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_create, | |
50 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_destroy, | |
6cc73dad | 51 | .cli_cmp = static_path_list_cli_cmp, |
88fa5104 | 52 | } |
53 | }, | |
54 | { | |
55 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/tag", | |
56 | .cbs = { | |
57 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_tag_modify, | |
58 | } | |
59 | }, | |
88fa5104 | 60 | { |
61 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop", | |
62 | .cbs = { | |
63 | .apply_finish = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_apply_finish, | |
64 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_create, | |
65 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_destroy, | |
66 | .pre_validate = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate, | |
6cc73dad IR |
67 | .cli_show = static_nexthop_cli_show, |
68 | .cli_cmp = static_nexthop_cli_cmp, | |
88fa5104 | 69 | } |
70 | }, | |
71 | { | |
72 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bh-type", | |
73 | .cbs = { | |
74 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_bh_type_modify, | |
88fa5104 | 75 | } |
76 | }, | |
77 | { | |
78 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/onlink", | |
79 | .cbs = { | |
80 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_onlink_modify, | |
88fa5104 | 81 | } |
82 | }, | |
065276ae SM |
83 | { |
84 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/srte-color", | |
85 | .cbs = { | |
86 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_modify, | |
87 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_destroy, | |
88 | } | |
89 | }, | |
88fa5104 | 90 | { |
91 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry", | |
92 | .cbs = { | |
93 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create, | |
94 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy, | |
95 | ||
96 | } | |
97 | }, | |
98 | { | |
99 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/label", | |
100 | .cbs = { | |
101 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify, | |
102 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy, | |
103 | } | |
104 | }, | |
105 | { | |
106 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/ttl", | |
107 | .cbs = { | |
108 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify, | |
109 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy, | |
110 | } | |
111 | }, | |
112 | { | |
113 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/traffic-class", | |
114 | .cbs = { | |
115 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_modify, | |
116 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_destroy, | |
117 | } | |
118 | }, | |
351ad684 RZ |
119 | { |
120 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bfd-monitoring", | |
121 | .cbs = { | |
122 | .create = route_next_hop_bfd_create, | |
123 | .destroy = route_next_hop_bfd_destroy, | |
124 | } | |
125 | }, | |
126 | { | |
127 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bfd-monitoring/source", | |
128 | .cbs = { | |
129 | .modify = route_next_hop_bfd_source_modify, | |
130 | .destroy = route_next_hop_bfd_source_destroy, | |
131 | } | |
132 | }, | |
133 | { | |
134 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bfd-monitoring/multi-hop", | |
135 | .cbs = { | |
136 | .modify = route_next_hop_bfd_multi_hop_modify, | |
137 | } | |
138 | }, | |
139 | { | |
140 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bfd-monitoring/profile", | |
141 | .cbs = { | |
142 | .modify = route_next_hop_bfd_profile_modify, | |
143 | .destroy = route_next_hop_bfd_profile_destroy, | |
144 | } | |
145 | }, | |
88fa5104 | 146 | { |
147 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list", | |
148 | .cbs = { | |
149 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_create, | |
150 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_destroy, | |
6cc73dad | 151 | .cli_cmp = static_src_list_cli_cmp, |
88fa5104 | 152 | } |
153 | }, | |
154 | { | |
155 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list", | |
156 | .cbs = { | |
157 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_create, | |
158 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_destroy, | |
6cc73dad | 159 | .cli_cmp = static_path_list_cli_cmp, |
88fa5104 | 160 | } |
161 | }, | |
162 | { | |
163 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/tag", | |
164 | .cbs = { | |
165 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_tag_modify, | |
166 | } | |
167 | }, | |
88fa5104 | 168 | { |
169 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop", | |
170 | .cbs = { | |
171 | .apply_finish = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_apply_finish, | |
172 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_create, | |
173 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_destroy, | |
174 | .pre_validate = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate, | |
6cc73dad IR |
175 | .cli_show = static_src_nexthop_cli_show, |
176 | .cli_cmp = static_nexthop_cli_cmp, | |
88fa5104 | 177 | } |
178 | }, | |
179 | { | |
180 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/bh-type", | |
181 | .cbs = { | |
182 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_bh_type_modify, | |
88fa5104 | 183 | } |
184 | }, | |
185 | { | |
186 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/onlink", | |
187 | .cbs = { | |
188 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_onlink_modify, | |
88fa5104 | 189 | } |
190 | }, | |
065276ae SM |
191 | { |
192 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/srte-color", | |
193 | .cbs = { | |
194 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_modify, | |
195 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_destroy, | |
196 | } | |
197 | }, | |
88fa5104 | 198 | { |
199 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry", | |
200 | .cbs = { | |
201 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create, | |
202 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy, | |
203 | } | |
204 | }, | |
205 | { | |
206 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/label", | |
207 | .cbs = { | |
208 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify, | |
209 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy, | |
210 | } | |
211 | }, | |
212 | { | |
213 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/ttl", | |
214 | .cbs = { | |
215 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify, | |
216 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy, | |
217 | } | |
218 | }, | |
219 | { | |
220 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/traffic-class", | |
221 | .cbs = { | |
222 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_modify, | |
223 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_destroy, | |
224 | } | |
225 | }, | |
226 | { | |
227 | .xpath = NULL, | |
228 | }, | |
229 | } | |
230 | }; |