}
}
+/*
+ * 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);
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 */
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_ */
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;
}
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;
}
.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",
lsp_regenerate_schedule(area, level, 1);
}
+#ifdef FABRICD
DEFUN (log_adj_changes,
log_adj_changes_cmd,
"log-adjacency-changes",
return CMD_SUCCESS;
}
-
+#endif /* ifdef FABRICD */
/* IS-IS configuration write function */
int isis_config_write(struct vty *vty)
{
#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();
}