From 66e45e10f1ea725b5acbd2579151e644be80147e Mon Sep 17 00:00:00 2001 From: Emanuele Di Pascale Date: Wed, 14 Nov 2018 10:55:54 +0100 Subject: isisd: retrofit the 'purge-originator' command Signed-off-by: Emanuele Di Pascale --- isisd/isis_northbound.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'isisd/isis_northbound.c') 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", -- cgit v1.2.3