forked from Mirror/frr
pim6d: Adding "ipv6 pim dr-priority" CLI
This cli used to configure PIMV6 dr-priority on interface. Signed-off-by: sarita patra <saritap@vmware.com>
This commit is contained in:
parent
a1caf7a88f
commit
bb387611c6
|
@ -229,6 +229,29 @@ DEFPY (interface_no_ipv6_pim,
|
|||
return pim_process_no_ip_pim_cmd(vty);
|
||||
}
|
||||
|
||||
DEFPY (interface_ipv6_pim_drprio,
|
||||
interface_ipv6_pim_drprio_cmd,
|
||||
"ipv6 pim drpriority (1-4294967295)",
|
||||
IPV6_STR
|
||||
PIM_STR
|
||||
"Set the Designated Router Election Priority\n"
|
||||
"Value of the new DR Priority\n")
|
||||
{
|
||||
return pim_process_ip_pim_drprio_cmd(vty, drpriority_str);
|
||||
}
|
||||
|
||||
DEFPY (interface_no_ipv6_pim_drprio,
|
||||
interface_no_ipv6_pim_drprio_cmd,
|
||||
"no ip pim drpriority [(1-4294967295)]",
|
||||
NO_STR
|
||||
IPV6_STR
|
||||
PIM_STR
|
||||
"Revert the Designated Router Priority to default\n"
|
||||
"Old Value of the Priority\n")
|
||||
{
|
||||
return pim_process_no_ip_pim_drprio_cmd(vty);
|
||||
}
|
||||
|
||||
void pim_cmd_init(void)
|
||||
{
|
||||
if_cmd_init(pim_interface_config_write);
|
||||
|
@ -249,4 +272,6 @@ void pim_cmd_init(void)
|
|||
install_element(CONFIG_NODE, &no_ipv6_pim_register_suppress_cmd);
|
||||
install_element(INTERFACE_NODE, &interface_ipv6_pim_cmd);
|
||||
install_element(INTERFACE_NODE, &interface_no_ipv6_pim_cmd);
|
||||
install_element(INTERFACE_NODE, &interface_ipv6_pim_drprio_cmd);
|
||||
install_element(INTERFACE_NODE, &interface_no_ipv6_pim_drprio_cmd);
|
||||
}
|
||||
|
|
|
@ -7959,11 +7959,7 @@ DEFUN (interface_ip_pim_drprio,
|
|||
{
|
||||
int idx_number = 3;
|
||||
|
||||
nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_MODIFY,
|
||||
argv[idx_number]->arg);
|
||||
|
||||
return nb_cli_apply_changes(vty, FRR_PIM_INTERFACE_XPATH,
|
||||
"frr-routing:ipv4");
|
||||
return pim_process_ip_pim_drprio_cmd(vty, argv[idx_number]->arg);
|
||||
}
|
||||
|
||||
DEFUN (interface_no_ip_pim_drprio,
|
||||
|
@ -7975,10 +7971,7 @@ DEFUN (interface_no_ip_pim_drprio,
|
|||
"Revert the Designated Router Priority to default\n"
|
||||
"Old Value of the Priority\n")
|
||||
{
|
||||
nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_DESTROY, NULL);
|
||||
|
||||
return nb_cli_apply_changes(vty, FRR_PIM_INTERFACE_XPATH,
|
||||
"frr-routing:ipv4");
|
||||
return pim_process_no_ip_pim_drprio_cmd(vty);
|
||||
}
|
||||
|
||||
DEFPY_HIDDEN (interface_ip_igmp_query_generate,
|
||||
|
|
|
@ -371,3 +371,20 @@ int pim_process_no_ip_pim_cmd(struct vty *vty)
|
|||
return nb_cli_apply_changes(vty, FRR_PIM_INTERFACE_XPATH,
|
||||
FRR_PIM_AF_XPATH_VAL);
|
||||
}
|
||||
|
||||
int pim_process_ip_pim_drprio_cmd(struct vty *vty, const char *drpriority_str)
|
||||
{
|
||||
nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_MODIFY,
|
||||
drpriority_str);
|
||||
|
||||
return nb_cli_apply_changes(vty, FRR_PIM_INTERFACE_XPATH,
|
||||
FRR_PIM_AF_XPATH_VAL);
|
||||
}
|
||||
|
||||
int pim_process_no_ip_pim_drprio_cmd(struct vty *vty)
|
||||
{
|
||||
nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_DESTROY, NULL);
|
||||
|
||||
return nb_cli_apply_changes(vty, FRR_PIM_INTERFACE_XPATH,
|
||||
FRR_PIM_AF_XPATH_VAL);
|
||||
}
|
||||
|
|
|
@ -38,5 +38,7 @@ int pim_process_no_register_suppress_cmd(struct vty *vty);
|
|||
|
||||
int pim_process_ip_pim_cmd(struct vty *vty);
|
||||
int pim_process_no_ip_pim_cmd(struct vty *vty);
|
||||
int pim_process_ip_pim_drprio_cmd(struct vty *vty, const char *drpriority_str);
|
||||
int pim_process_no_ip_pim_drprio_cmd(struct vty *vty);
|
||||
|
||||
#endif /* PIM_CMD_COMMON_H */
|
||||
|
|
Loading…
Reference in a new issue