diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-07-07 22:04:33 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 16:16:12 -0200 |
| commit | a4bed468f9603da8199fdd828f5523c3b29ca15c (patch) | |
| tree | e23e6d612e1a790fb0e109eed7b8e78cf63f926e /lib/if.c | |
| parent | a7ca2199b709e268196878554e01c9e78bc1c60f (diff) | |
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 <renato@opensourcerouting.org>
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 58 |
1 files changed, 58 insertions, 0 deletions
@@ -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, + }, + } +}; |
