summaryrefslogtreecommitdiffstats
path: root/isisd/isis_northbound.c
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2018-11-14 10:55:54 +0100
committerEmanuele Di Pascale <emanuele@voltanet.io>2018-12-18 15:23:49 +0100
commit66e45e10f1ea725b5acbd2579151e644be80147e (patch)
treeea3a4d18d0e6907609029dcf56bfe6406415c739 /isisd/isis_northbound.c
parentisisd: retrofit the 'spf-delay-ietf' command (diff)
downloadfrr-66e45e10f1ea725b5acbd2579151e644be80147e.tar.xz
frr-66e45e10f1ea725b5acbd2579151e644be80147e.zip
isisd: retrofit the 'purge-originator' command
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'isisd/isis_northbound.c')
-rw-r--r--isisd/isis_northbound.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c
index 454299c3d..f55a0ccf3 100644
--- a/isisd/isis_northbound.c
+++ b/isisd/isis_northbound.c
@@ -343,14 +343,28 @@ static int isis_instance_purge_originator_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->purge_originator = true;
+
return NB_OK;
}
static int isis_instance_purge_originator_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->purge_originator = false;
+
return NB_OK;
}
@@ -1976,6 +1990,7 @@ const struct frr_yang_module_info frr_isisd_info = {
.xpath = "/frr-isisd:isis/instance/purge-originator",
.cbs.create = isis_instance_purge_originator_create,
.cbs.delete = isis_instance_purge_originator_delete,
+ .cbs.cli_show = cli_show_isis_purge_origin,
},
{
.xpath = "/frr-isisd:isis/instance/lsp/mtu",