summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--isisd/isis_cli.c20
-rw-r--r--isisd/isis_cli.h2
-rw-r--r--isisd/isis_northbound.c19
-rw-r--r--isisd/isisd.c12
4 files changed, 45 insertions, 8 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 6934c33fc8..3227f41b45 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -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)
{
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, &no_isis_priority_cmd);
+
+ install_element(ISIS_NODE, &log_adj_changes_cmd);
}
#endif /* ifndef FABRICD */
diff --git a/isisd/isis_cli.h b/isisd/isis_cli.h
index 90e31859fc..8dadf60981 100644
--- a/isisd/isis_cli.h
+++ b/isisd/isis_cli.h
@@ -119,5 +119,7 @@ void cli_show_ip_isis_network_type(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
+void cli_show_isis_log_adjacency(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults);
#endif /* ISISD_ISIS_CLI_H_ */
diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c
index c11788a498..93998cda89 100644
--- a/isisd/isis_northbound.c
+++ b/isisd/isis_northbound.c
@@ -1480,7 +1480,14 @@ isis_instance_log_adjacency_changes_create(enum nb_event event,
const struct lyd_node *dnode,
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;
}
@@ -1488,7 +1495,14 @@ static int
isis_instance_log_adjacency_changes_delete(enum nb_event event,
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;
}
@@ -2745,6 +2759,7 @@ const struct frr_yang_module_info frr_isisd_info = {
.xpath = "/frr-isisd:isis/instance/log-adjacency-changes",
.cbs.create = isis_instance_log_adjacency_changes_create,
.cbs.delete = isis_instance_log_adjacency_changes_delete,
+ .cbs.cli_show = cli_show_isis_log_adjacency,
},
{
.xpath = "/frr-isisd:isis/mpls-te",
diff --git a/isisd/isisd.c b/isisd/isisd.c
index b431e3bbdc..9e77303d22 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -1807,6 +1807,7 @@ void isis_area_lsp_refresh_set(struct isis_area *area, int level,
lsp_regenerate_schedule(area, level, 1);
}
+#ifdef FABRICD
DEFUN (log_adj_changes,
log_adj_changes_cmd,
"log-adjacency-changes",
@@ -1831,7 +1832,7 @@ DEFUN (no_log_adj_changes,
return CMD_SUCCESS;
}
-
+#endif /* ifdef FABRICD */
/* IS-IS configuration write function */
int isis_config_write(struct vty *vty)
{
@@ -2189,17 +2190,16 @@ void isis_init()
#ifdef FABRICD
install_element(CONFIG_NODE, &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, &no_net_cmd);
-#endif /* ifdef FABRICD */
-#ifdef FABRICD
+
install_element(ROUTER_NODE, &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, &no_log_adj_changes_cmd);
+#endif /* ifdef FABRICD */
spf_backoff_cmd_init();
}