mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
ripngd: convert RPC commands to mgmtd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
dbaf05ae3d
commit
6e0e84491b
|
@ -117,6 +117,10 @@ static const char *const ripngd_oper_xpaths[] = {
|
||||||
"/frr-ripngd:ripngd",
|
"/frr-ripngd:ripngd",
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
static const char *const ripngd_rpc_xpaths[] = {
|
||||||
|
"/frr-ripngd",
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_STATICD
|
#if HAVE_STATICD
|
||||||
|
@ -155,6 +159,9 @@ static const char *const *be_client_rpc_xpaths[MGMTD_BE_CLIENT_ID_MAX] = {
|
||||||
#ifdef HAVE_RIPD
|
#ifdef HAVE_RIPD
|
||||||
[MGMTD_BE_CLIENT_ID_RIPD] = ripd_rpc_xpaths,
|
[MGMTD_BE_CLIENT_ID_RIPD] = ripd_rpc_xpaths,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_RIPNGD
|
||||||
|
[MGMTD_BE_CLIENT_ID_RIPNGD] = ripngd_rpc_xpaths,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -624,6 +624,23 @@ DEFPY_YANG(no_ripng_ipv6_distribute_list_prefix,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
{
|
||||||
|
if (vrf)
|
||||||
|
nb_cli_rpc_enqueue(vty, "vrf", vrf);
|
||||||
|
|
||||||
|
return nb_cli_rpc(vty, "/frr-ripngd:clear-ripng-route", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/* RIPng node structure. */
|
/* RIPng node structure. */
|
||||||
static struct cmd_node cmd_ripng_node = {
|
static struct cmd_node cmd_ripng_node = {
|
||||||
.name = "ripng",
|
.name = "ripng",
|
||||||
|
@ -663,6 +680,8 @@ 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,25 +2231,6 @@ 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)
|
|
||||||
{
|
|
||||||
if (vrf)
|
|
||||||
nb_cli_rpc_enqueue(vty, "vrf", vrf);
|
|
||||||
|
|
||||||
return nb_cli_rpc(vty, "/frr-ripngd:clear-ripng-route", NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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)
|
||||||
{
|
{
|
||||||
|
@ -2667,7 +2648,6 @@ 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,7 +27,6 @@ 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 a new issue