]> git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_routemap_nb.c
Merge pull request #8506 from ranjanyash54/route_json_change
[mirror_frr.git] / zebra / zebra_routemap_nb.c
1 /*
2 * Copyright (C) 2020 Vmware
3 * Sarita Patra
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 */
19
20 #include <zebra.h>
21
22 #include "northbound.h"
23 #include "libfrr.h"
24 #include "zebra_routemap_nb.h"
25
26 /* clang-format off */
27 const struct frr_yang_module_info frr_zebra_route_map_info = {
28 .name = "frr-zebra-route-map",
29 .nodes = {
30 {
31 .xpath = "/frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-zebra-route-map:ipv4-prefix-length",
32 .cbs = {
33 .modify = lib_route_map_entry_match_condition_rmap_match_condition_ipv4_prefix_length_modify,
34 .destroy = lib_route_map_entry_match_condition_rmap_match_condition_ipv4_prefix_length_destroy,
35 }
36 },
37 {
38 .xpath = "/frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-zebra-route-map:ipv6-prefix-length",
39 .cbs = {
40 .modify = lib_route_map_entry_match_condition_rmap_match_condition_ipv6_prefix_length_modify,
41 .destroy = lib_route_map_entry_match_condition_rmap_match_condition_ipv6_prefix_length_destroy,
42 }
43 },
44 {
45 .xpath = "/frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-zebra-route-map:source-instance",
46 .cbs = {
47 .modify = lib_route_map_entry_match_condition_rmap_match_condition_source_instance_modify,
48 .destroy = lib_route_map_entry_match_condition_rmap_match_condition_source_instance_destroy,
49 }
50 },
51 {
52 .xpath = "/frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-zebra-route-map:source-protocol",
53 .cbs = {
54 .modify = lib_route_map_entry_match_condition_rmap_match_condition_source_protocol_modify,
55 .destroy = lib_route_map_entry_match_condition_rmap_match_condition_source_protocol_destroy,
56 }
57 },
58 {
59 .xpath = "/frr-route-map:lib/route-map/entry/set-action/rmap-set-action/frr-zebra-route-map:ipv4-src-address",
60 .cbs = {
61 .modify = lib_route_map_entry_set_action_rmap_set_action_ipv4_src_address_modify,
62 .destroy = lib_route_map_entry_set_action_rmap_set_action_ipv4_src_address_destroy,
63 }
64 },
65 {
66 .xpath = "/frr-route-map:lib/route-map/entry/set-action/rmap-set-action/frr-zebra-route-map:ipv6-src-address",
67 .cbs = {
68 .modify = lib_route_map_entry_set_action_rmap_set_action_ipv6_src_address_modify,
69 .destroy = lib_route_map_entry_set_action_rmap_set_action_ipv6_src_address_destroy,
70 }
71 },
72 {
73 .xpath = NULL,
74 },
75 }
76 };