]>
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" | |
24 | ||
25 | ||
26 | /* clang-format off */ | |
27 | ||
28 | const struct frr_yang_module_info frr_staticd_info = { | |
29 | .name = "frr-staticd", | |
30 | .nodes = { | |
31 | { | |
32 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list", | |
33 | .cbs = { | |
34 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_create, | |
35 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_destroy, | |
36 | } | |
37 | }, | |
38 | { | |
39 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list", | |
40 | .cbs = { | |
41 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_create, | |
42 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_destroy, | |
43 | } | |
44 | }, | |
45 | { | |
46 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/tag", | |
47 | .cbs = { | |
48 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_tag_modify, | |
49 | } | |
50 | }, | |
88fa5104 | 51 | { |
52 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop", | |
53 | .cbs = { | |
54 | .apply_finish = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_apply_finish, | |
55 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_create, | |
56 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_destroy, | |
57 | .pre_validate = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate, | |
58 | } | |
59 | }, | |
60 | { | |
61 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bh-type", | |
62 | .cbs = { | |
63 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_bh_type_modify, | |
88fa5104 | 64 | } |
65 | }, | |
66 | { | |
67 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/onlink", | |
68 | .cbs = { | |
69 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_onlink_modify, | |
88fa5104 | 70 | } |
71 | }, | |
065276ae SM |
72 | { |
73 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/srte-color", | |
74 | .cbs = { | |
75 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_modify, | |
76 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_destroy, | |
77 | } | |
78 | }, | |
88fa5104 | 79 | { |
80 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry", | |
81 | .cbs = { | |
82 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create, | |
83 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy, | |
84 | ||
85 | } | |
86 | }, | |
87 | { | |
88 | .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", | |
89 | .cbs = { | |
90 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify, | |
91 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy, | |
92 | } | |
93 | }, | |
94 | { | |
95 | .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", | |
96 | .cbs = { | |
97 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify, | |
98 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy, | |
99 | } | |
100 | }, | |
101 | { | |
102 | .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", | |
103 | .cbs = { | |
104 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_modify, | |
105 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_destroy, | |
106 | } | |
107 | }, | |
108 | { | |
109 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list", | |
110 | .cbs = { | |
111 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_create, | |
112 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_destroy, | |
113 | } | |
114 | }, | |
115 | { | |
116 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list", | |
117 | .cbs = { | |
118 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_create, | |
119 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_destroy, | |
120 | } | |
121 | }, | |
122 | { | |
123 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/tag", | |
124 | .cbs = { | |
125 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_tag_modify, | |
126 | } | |
127 | }, | |
88fa5104 | 128 | { |
129 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop", | |
130 | .cbs = { | |
131 | .apply_finish = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_apply_finish, | |
132 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_create, | |
133 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_destroy, | |
134 | .pre_validate = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate, | |
135 | } | |
136 | }, | |
137 | { | |
138 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/bh-type", | |
139 | .cbs = { | |
140 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_bh_type_modify, | |
88fa5104 | 141 | } |
142 | }, | |
143 | { | |
144 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/onlink", | |
145 | .cbs = { | |
146 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_onlink_modify, | |
88fa5104 | 147 | } |
148 | }, | |
065276ae SM |
149 | { |
150 | .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/srte-color", | |
151 | .cbs = { | |
152 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_modify, | |
153 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_destroy, | |
154 | } | |
155 | }, | |
88fa5104 | 156 | { |
157 | .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", | |
158 | .cbs = { | |
159 | .create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create, | |
160 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy, | |
161 | } | |
162 | }, | |
163 | { | |
164 | .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", | |
165 | .cbs = { | |
166 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify, | |
167 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy, | |
168 | } | |
169 | }, | |
170 | { | |
171 | .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", | |
172 | .cbs = { | |
173 | .modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify, | |
174 | .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy, | |
175 | } | |
176 | }, | |
177 | { | |
178 | .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", | |
179 | .cbs = { | |
180 | .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, | |
181 | .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, | |
182 | } | |
183 | }, | |
184 | { | |
185 | .xpath = NULL, | |
186 | }, | |
187 | } | |
188 | }; |