From a4bed468f9603da8199fdd828f5523c3b29ca15c Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Sat, 7 Jul 2018 22:04:33 -0300 Subject: yang, lib: add 'frr-interface.yang' and associated stub callbacks Introduce frr-interface.yang, which defines a model for managing FRR interfaces. Update the 'frr_yang_module_info' array of all daemons that will implement this module. Add automatically generated stub callbacks in if.c. These callbacks will be implemented in the following commit. Signed-off-by: Renato Westphal --- lib/if.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'lib/if.c') diff --git a/lib/if.c b/lib/if.c index e952313e8e..6cf5678554 100644 --- a/lib/if.c +++ b/lib/if.c @@ -1211,3 +1211,61 @@ void if_link_params_free(struct interface *ifp) XFREE(MTYPE_IF_LINK_PARAMS, ifp->link_params); ifp->link_params = NULL; } + +/* ------- Northbound callbacks ------- */ + +/* + * XPath: /frr-interface:lib/interface + */ +static int lib_interface_create(enum nb_event event, + const struct lyd_node *dnode, + union nb_resource *resource) +{ + /* TODO: implement me. */ + return NB_OK; +} + +static int lib_interface_delete(enum nb_event event, + const struct lyd_node *dnode) +{ + /* TODO: implement me. */ + return NB_OK; +} + +/* + * XPath: /frr-interface:lib/interface/description + */ +static int lib_interface_description_modify(enum nb_event event, + const struct lyd_node *dnode, + union nb_resource *resource) +{ + /* TODO: implement me. */ + return NB_OK; +} + +static int lib_interface_description_delete(enum nb_event event, + const struct lyd_node *dnode) +{ + /* TODO: implement me. */ + return NB_OK; +} + +/* clang-format off */ +const struct frr_yang_module_info frr_interface_info = { + .name = "frr-interface", + .nodes = { + { + .xpath = "/frr-interface:lib/interface", + .cbs.create = lib_interface_create, + .cbs.delete = lib_interface_delete, + }, + { + .xpath = "/frr-interface:lib/interface/description", + .cbs.modify = lib_interface_description_modify, + .cbs.delete = lib_interface_description_delete, + }, + { + .xpath = NULL, + }, + } +}; -- cgit v1.2.3