mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 22:29:23 +00:00
Merge pull request #15512 from FRRouting/mergify/bp/dev/10.0/pr-15510
fix rip/ripng yang rpcs (backport #15510)
This commit is contained in:
commit
e4885819f5
@ -1125,36 +1125,6 @@ void cli_show_ip_rip_bfd_profile(struct vty *vty, const struct lyd_node *dnode,
|
|||||||
yang_dnode_get_string(dnode, NULL));
|
yang_dnode_get_string(dnode, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* XPath: /frr-ripd:clear-rip-route
|
|
||||||
*/
|
|
||||||
DEFPY_YANG (clear_ip_rip,
|
|
||||||
clear_ip_rip_cmd,
|
|
||||||
"clear ip rip [vrf WORD]",
|
|
||||||
CLEAR_STR
|
|
||||||
IP_STR
|
|
||||||
"Clear IP RIP database\n"
|
|
||||||
VRF_CMD_HELP_STR)
|
|
||||||
{
|
|
||||||
struct list *input;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
input = list_new();
|
|
||||||
if (vrf) {
|
|
||||||
struct yang_data *yang_vrf;
|
|
||||||
|
|
||||||
yang_vrf = yang_data_new("/frr-ripd:clear-rip-route/input/vrf",
|
|
||||||
vrf);
|
|
||||||
listnode_add(input, yang_vrf);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = nb_cli_rpc(vty, "/frr-ripd:clear-rip-route", input, NULL);
|
|
||||||
|
|
||||||
list_delete(&input);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFPY_YANG(
|
DEFPY_YANG(
|
||||||
rip_distribute_list, rip_distribute_list_cmd,
|
rip_distribute_list, rip_distribute_list_cmd,
|
||||||
"distribute-list ACCESSLIST4_NAME$name <in|out>$dir [WORD$ifname]",
|
"distribute-list ACCESSLIST4_NAME$name <in|out>$dir [WORD$ifname]",
|
||||||
@ -1325,8 +1295,6 @@ void rip_cli_init(void)
|
|||||||
install_element(INTERFACE_NODE, &ip_rip_bfd_profile_cmd);
|
install_element(INTERFACE_NODE, &ip_rip_bfd_profile_cmd);
|
||||||
install_element(INTERFACE_NODE, &no_ip_rip_bfd_profile_cmd);
|
install_element(INTERFACE_NODE, &no_ip_rip_bfd_profile_cmd);
|
||||||
|
|
||||||
install_element(ENABLE_NODE, &clear_ip_rip_cmd);
|
|
||||||
|
|
||||||
if_rmap_init(RIP_NODE);
|
if_rmap_init(RIP_NODE);
|
||||||
}
|
}
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
|
33
ripd/ripd.c
33
ripd/ripd.c
@ -3254,6 +3254,38 @@ DEFUN (show_ip_rip_status,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "ripd/ripd_clippy.c"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XPath: /frr-ripd:clear-rip-route
|
||||||
|
*/
|
||||||
|
DEFPY_YANG (clear_ip_rip,
|
||||||
|
clear_ip_rip_cmd,
|
||||||
|
"clear ip rip [vrf WORD]",
|
||||||
|
CLEAR_STR
|
||||||
|
IP_STR
|
||||||
|
"Clear IP RIP database\n"
|
||||||
|
VRF_CMD_HELP_STR)
|
||||||
|
{
|
||||||
|
struct list *input;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
input = list_new();
|
||||||
|
if (vrf) {
|
||||||
|
struct yang_data *yang_vrf;
|
||||||
|
|
||||||
|
yang_vrf = yang_data_new("/frr-ripd:clear-rip-route/input/vrf",
|
||||||
|
vrf);
|
||||||
|
listnode_add(input, yang_vrf);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = nb_cli_rpc(vty, "/frr-ripd:clear-rip-route", input, NULL);
|
||||||
|
|
||||||
|
list_delete(&input);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Distribute-list update functions. */
|
/* Distribute-list update functions. */
|
||||||
static void rip_distribute_update(struct distribute_ctx *ctx,
|
static void rip_distribute_update(struct distribute_ctx *ctx,
|
||||||
struct distribute *dist)
|
struct distribute *dist)
|
||||||
@ -3628,6 +3660,7 @@ void rip_init(void)
|
|||||||
/* Install rip commands. */
|
/* Install rip commands. */
|
||||||
install_element(VIEW_NODE, &show_ip_rip_cmd);
|
install_element(VIEW_NODE, &show_ip_rip_cmd);
|
||||||
install_element(VIEW_NODE, &show_ip_rip_status_cmd);
|
install_element(VIEW_NODE, &show_ip_rip_status_cmd);
|
||||||
|
install_element(ENABLE_NODE, &clear_ip_rip_cmd);
|
||||||
|
|
||||||
/* Debug related init. */
|
/* Debug related init. */
|
||||||
rip_debug_init();
|
rip_debug_init();
|
||||||
|
@ -33,6 +33,7 @@ ripd_ripd_SOURCES = \
|
|||||||
clippy_scan += \
|
clippy_scan += \
|
||||||
ripd/rip_bfd.c \
|
ripd/rip_bfd.c \
|
||||||
ripd/rip_cli.c \
|
ripd/rip_cli.c \
|
||||||
|
ripd/ripd.c \
|
||||||
# end
|
# end
|
||||||
|
|
||||||
noinst_HEADERS += \
|
noinst_HEADERS += \
|
||||||
|
@ -512,36 +512,6 @@ void cli_show_ipv6_ripng_split_horizon(struct vty *vty,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* XPath: /frr-ripngd:clear-ripng-route
|
|
||||||
*/
|
|
||||||
DEFPY_YANG (clear_ipv6_rip,
|
|
||||||
clear_ipv6_rip_cmd,
|
|
||||||
"clear ipv6 ripng [vrf WORD]",
|
|
||||||
CLEAR_STR
|
|
||||||
IPV6_STR
|
|
||||||
"Clear IPv6 RIP database\n"
|
|
||||||
VRF_CMD_HELP_STR)
|
|
||||||
{
|
|
||||||
struct list *input;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
input = list_new();
|
|
||||||
if (vrf) {
|
|
||||||
struct yang_data *yang_vrf;
|
|
||||||
|
|
||||||
yang_vrf = yang_data_new(
|
|
||||||
"/frr-ripngd:clear-ripng-route/input/vrf", vrf);
|
|
||||||
listnode_add(input, yang_vrf);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = nb_cli_rpc(vty, "/frr-ripngd:clear-ripng-route", input, NULL);
|
|
||||||
|
|
||||||
list_delete(&input);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFPY_YANG(
|
DEFPY_YANG(
|
||||||
ripng_ipv6_distribute_list, ripng_ipv6_distribute_list_cmd,
|
ripng_ipv6_distribute_list, ripng_ipv6_distribute_list_cmd,
|
||||||
"ipv6 distribute-list ACCESSLIST6_NAME$name <in|out>$dir [WORD$ifname]",
|
"ipv6 distribute-list ACCESSLIST6_NAME$name <in|out>$dir [WORD$ifname]",
|
||||||
@ -693,8 +663,6 @@ void ripng_cli_init(void)
|
|||||||
|
|
||||||
install_element(INTERFACE_NODE, &ipv6_ripng_split_horizon_cmd);
|
install_element(INTERFACE_NODE, &ipv6_ripng_split_horizon_cmd);
|
||||||
|
|
||||||
install_element(ENABLE_NODE, &clear_ipv6_rip_cmd);
|
|
||||||
|
|
||||||
if_rmap_init(RIPNG_NODE);
|
if_rmap_init(RIPNG_NODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2231,6 +2231,38 @@ DEFUN (show_ipv6_ripng_status,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "ripngd/ripngd_clippy.c"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XPath: /frr-ripngd:clear-ripng-route
|
||||||
|
*/
|
||||||
|
DEFPY_YANG (clear_ipv6_rip,
|
||||||
|
clear_ipv6_rip_cmd,
|
||||||
|
"clear ipv6 ripng [vrf WORD]",
|
||||||
|
CLEAR_STR
|
||||||
|
IPV6_STR
|
||||||
|
"Clear IPv6 RIP database\n"
|
||||||
|
VRF_CMD_HELP_STR)
|
||||||
|
{
|
||||||
|
struct list *input;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
input = list_new();
|
||||||
|
if (vrf) {
|
||||||
|
struct yang_data *yang_vrf;
|
||||||
|
|
||||||
|
yang_vrf = yang_data_new(
|
||||||
|
"/frr-ripngd:clear-ripng-route/input/vrf", vrf);
|
||||||
|
listnode_add(input, yang_vrf);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = nb_cli_rpc(vty, "/frr-ripngd:clear-ripng-route", input, NULL);
|
||||||
|
|
||||||
|
list_delete(&input);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Update ECMP routes to zebra when ECMP is disabled. */
|
/* Update ECMP routes to zebra when ECMP is disabled. */
|
||||||
void ripng_ecmp_disable(struct ripng *ripng)
|
void ripng_ecmp_disable(struct ripng *ripng)
|
||||||
{
|
{
|
||||||
@ -2648,6 +2680,7 @@ void ripng_init(void)
|
|||||||
/* Install ripng commands. */
|
/* Install ripng commands. */
|
||||||
install_element(VIEW_NODE, &show_ipv6_ripng_cmd);
|
install_element(VIEW_NODE, &show_ipv6_ripng_cmd);
|
||||||
install_element(VIEW_NODE, &show_ipv6_ripng_status_cmd);
|
install_element(VIEW_NODE, &show_ipv6_ripng_status_cmd);
|
||||||
|
install_element(ENABLE_NODE, &clear_ipv6_rip_cmd);
|
||||||
|
|
||||||
ripng_if_init();
|
ripng_if_init();
|
||||||
ripng_debug_init();
|
ripng_debug_init();
|
||||||
|
@ -27,6 +27,7 @@ ripngd_ripngd_SOURCES = \
|
|||||||
|
|
||||||
clippy_scan += \
|
clippy_scan += \
|
||||||
ripngd/ripng_cli.c \
|
ripngd/ripng_cli.c \
|
||||||
|
ripngd/ripngd.c \
|
||||||
# end
|
# end
|
||||||
|
|
||||||
noinst_HEADERS += \
|
noinst_HEADERS += \
|
||||||
|
Loading…
Reference in New Issue
Block a user