mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 03:53:38 +00:00
isisd: retrofit the 'log-adjacency-changes' command
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This commit is contained in:
parent
d59c2d6be6
commit
2adf66ff35
@ -1878,6 +1878,24 @@ void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XPath: /frr-isisd:isis/instance/log-adjacency-changes
|
||||||
|
*/
|
||||||
|
DEFPY(log_adj_changes, log_adj_changes_cmd, "[no] log-adjacency-changes",
|
||||||
|
NO_STR "Log changes in adjacency state\n")
|
||||||
|
{
|
||||||
|
nb_cli_enqueue_change(vty, "./log-adjacency-changes",
|
||||||
|
no ? NB_OP_DELETE : NB_OP_CREATE, NULL);
|
||||||
|
|
||||||
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cli_show_isis_log_adjacency(struct vty *vty, struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
vty_out(vty, " log-adjacency-changes\n");
|
||||||
|
}
|
||||||
|
|
||||||
void isis_cli_init(void)
|
void isis_cli_init(void)
|
||||||
{
|
{
|
||||||
install_element(CONFIG_NODE, &router_isis_cmd);
|
install_element(CONFIG_NODE, &router_isis_cmd);
|
||||||
@ -1963,6 +1981,8 @@ void isis_cli_init(void)
|
|||||||
|
|
||||||
install_element(INTERFACE_NODE, &isis_priority_cmd);
|
install_element(INTERFACE_NODE, &isis_priority_cmd);
|
||||||
install_element(INTERFACE_NODE, &no_isis_priority_cmd);
|
install_element(INTERFACE_NODE, &no_isis_priority_cmd);
|
||||||
|
|
||||||
|
install_element(ISIS_NODE, &log_adj_changes_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ifndef FABRICD */
|
#endif /* ifndef FABRICD */
|
||||||
|
@ -119,5 +119,7 @@ void cli_show_ip_isis_network_type(struct vty *vty, struct lyd_node *dnode,
|
|||||||
bool show_defaults);
|
bool show_defaults);
|
||||||
void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
|
void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
|
||||||
bool show_defaults);
|
bool show_defaults);
|
||||||
|
void cli_show_isis_log_adjacency(struct vty *vty, struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
|
|
||||||
#endif /* ISISD_ISIS_CLI_H_ */
|
#endif /* ISISD_ISIS_CLI_H_ */
|
||||||
|
@ -1480,7 +1480,14 @@ isis_instance_log_adjacency_changes_create(enum nb_event event,
|
|||||||
const struct lyd_node *dnode,
|
const struct lyd_node *dnode,
|
||||||
union nb_resource *resource)
|
union nb_resource *resource)
|
||||||
{
|
{
|
||||||
/* TODO: implement me. */
|
struct isis_area *area;
|
||||||
|
|
||||||
|
if (event != NB_EV_APPLY)
|
||||||
|
return NB_OK;
|
||||||
|
|
||||||
|
area = yang_dnode_get_entry(dnode, true);
|
||||||
|
area->log_adj_changes = 1;
|
||||||
|
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1488,7 +1495,14 @@ static int
|
|||||||
isis_instance_log_adjacency_changes_delete(enum nb_event event,
|
isis_instance_log_adjacency_changes_delete(enum nb_event event,
|
||||||
const struct lyd_node *dnode)
|
const struct lyd_node *dnode)
|
||||||
{
|
{
|
||||||
/* TODO: implement me. */
|
struct isis_area *area;
|
||||||
|
|
||||||
|
if (event != NB_EV_APPLY)
|
||||||
|
return NB_OK;
|
||||||
|
|
||||||
|
area = yang_dnode_get_entry(dnode, true);
|
||||||
|
area->log_adj_changes = 0;
|
||||||
|
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2745,6 +2759,7 @@ const struct frr_yang_module_info frr_isisd_info = {
|
|||||||
.xpath = "/frr-isisd:isis/instance/log-adjacency-changes",
|
.xpath = "/frr-isisd:isis/instance/log-adjacency-changes",
|
||||||
.cbs.create = isis_instance_log_adjacency_changes_create,
|
.cbs.create = isis_instance_log_adjacency_changes_create,
|
||||||
.cbs.delete = isis_instance_log_adjacency_changes_delete,
|
.cbs.delete = isis_instance_log_adjacency_changes_delete,
|
||||||
|
.cbs.cli_show = cli_show_isis_log_adjacency,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-isisd:isis/mpls-te",
|
.xpath = "/frr-isisd:isis/mpls-te",
|
||||||
|
@ -1807,6 +1807,7 @@ void isis_area_lsp_refresh_set(struct isis_area *area, int level,
|
|||||||
lsp_regenerate_schedule(area, level, 1);
|
lsp_regenerate_schedule(area, level, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FABRICD
|
||||||
DEFUN (log_adj_changes,
|
DEFUN (log_adj_changes,
|
||||||
log_adj_changes_cmd,
|
log_adj_changes_cmd,
|
||||||
"log-adjacency-changes",
|
"log-adjacency-changes",
|
||||||
@ -1831,7 +1832,7 @@ DEFUN (no_log_adj_changes,
|
|||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
#endif /* ifdef FABRICD */
|
||||||
/* IS-IS configuration write function */
|
/* IS-IS configuration write function */
|
||||||
int isis_config_write(struct vty *vty)
|
int isis_config_write(struct vty *vty)
|
||||||
{
|
{
|
||||||
@ -2189,17 +2190,16 @@ void isis_init()
|
|||||||
#ifdef FABRICD
|
#ifdef FABRICD
|
||||||
install_element(CONFIG_NODE, &router_openfabric_cmd);
|
install_element(CONFIG_NODE, &router_openfabric_cmd);
|
||||||
install_element(CONFIG_NODE, &no_router_openfabric_cmd);
|
install_element(CONFIG_NODE, &no_router_openfabric_cmd);
|
||||||
#endif /* ifdef FABRICD */
|
|
||||||
#ifdef FABRICD
|
|
||||||
install_element(ROUTER_NODE, &net_cmd);
|
install_element(ROUTER_NODE, &net_cmd);
|
||||||
install_element(ROUTER_NODE, &no_net_cmd);
|
install_element(ROUTER_NODE, &no_net_cmd);
|
||||||
#endif /* ifdef FABRICD */
|
|
||||||
#ifdef FABRICD
|
|
||||||
install_element(ROUTER_NODE, &isis_topology_cmd);
|
install_element(ROUTER_NODE, &isis_topology_cmd);
|
||||||
install_element(ROUTER_NODE, &no_isis_topology_cmd);
|
install_element(ROUTER_NODE, &no_isis_topology_cmd);
|
||||||
#endif /* ifdef FABRICD */
|
|
||||||
install_element(ROUTER_NODE, &log_adj_changes_cmd);
|
install_element(ROUTER_NODE, &log_adj_changes_cmd);
|
||||||
install_element(ROUTER_NODE, &no_log_adj_changes_cmd);
|
install_element(ROUTER_NODE, &no_log_adj_changes_cmd);
|
||||||
|
#endif /* ifdef FABRICD */
|
||||||
|
|
||||||
spf_backoff_cmd_init();
|
spf_backoff_cmd_init();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user