summaryrefslogtreecommitdiff
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2018-11-13 17:33:49 +0100
committerEmanuele Di Pascale <emanuele@voltanet.io>2018-12-18 15:21:15 +0100
commitf084ea552361c94d008ed0bfe5c87224ff06a55d (patch)
treec0a342ca75d92c870b0541f818dccdaf68900c84 /isisd/isis_cli.c
parentaaf2fd21fc3a463496ef3377a63e892d733a403a (diff)
isisd: retrofit the 'net' command
This is a simple command but with a complex callback, the only one in isisd which uses the resource allocation API implemented in the northbound (i.e. the PREPARE phase). Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 2650c5bcb7..41632b0a75 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -302,6 +302,26 @@ void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
yang_dnode_get_string(dnode, "../area-tag"));
}
+/*
+ * XPath: /frr-isisd:isis/instance/area-address
+ */
+DEFPY(net, net_cmd, "[no] net WORD",
+ "Remove an existing Network Entity Title for this process\n"
+ "A Network Entity Title for this process (OSI only)\n"
+ "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
+{
+ nb_cli_enqueue_change(vty, "./area-address",
+ no ? NB_OP_DELETE : NB_OP_CREATE, net);
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_isis_area_address(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults)
+{
+ vty_out(vty, " net %s\n", yang_dnode_get_string(dnode, NULL));
+}
+
void isis_cli_init(void)
{
install_element(CONFIG_NODE, &router_isis_cmd);
@@ -310,6 +330,8 @@ void isis_cli_init(void)
install_element(INTERFACE_NODE, &ip_router_isis_cmd);
install_element(INTERFACE_NODE, &ip6_router_isis_cmd);
install_element(INTERFACE_NODE, &no_ip_router_isis_cmd);
+
+ install_element(ISIS_NODE, &net_cmd);
}
#endif /* ifndef FABRICD */