From a1dd57b64984ea64cb1f03d85b74229d6d2257db Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 6 Jun 2024 14:08:00 -0400 Subject: [PATCH] mgmtd: add empty notif xpath map for completeness New back-end clients may need to add notification static allocations so we should have it available for those users, rather than requiring the new user delve into the mgmtd infra and modify it themselves. Signed-off-by: Christian Hopps --- mgmtd/mgmt_be_adapter.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c index 81574d1a56..c7f4fb9d84 100644 --- a/mgmtd/mgmt_be_adapter.c +++ b/mgmtd/mgmt_be_adapter.c @@ -155,6 +155,9 @@ static const char *const *be_client_oper_xpaths[MGMTD_BE_CLIENT_ID_MAX] = { [MGMTD_BE_CLIENT_ID_ZEBRA] = zebra_oper_xpaths, }; +static const char *const *be_client_notif_xpaths[MGMTD_BE_CLIENT_ID_MAX] = { +}; + static const char *const *be_client_rpc_xpaths[MGMTD_BE_CLIENT_ID_MAX] = { #ifdef HAVE_RIPD [MGMTD_BE_CLIENT_ID_RIPD] = ripd_rpc_xpaths, @@ -298,6 +301,13 @@ static void mgmt_be_xpath_map_init(void) MGMT_BE_XPATH_SUBSCR_TYPE_OPER); } + /* Initialize the common NOTIF init map */ + for (init = be_client_notif_xpaths[id]; init && *init; init++) { + __dbg(" - NOTIF XPATH: '%s'", *init); + mgmt_register_client_xpath(id, *init, + MGMT_BE_XPATH_SUBSCR_TYPE_NOTIF); + } + /* Initialize the common RPC init map */ for (init = be_client_rpc_xpaths[id]; init && *init; init++) { __dbg(" - RPC XPATH: '%s'", *init); @@ -308,6 +318,7 @@ static void mgmt_be_xpath_map_init(void) __dbg("Total Cfg XPath Maps: %u", darr_len(be_cfg_xpath_map)); __dbg("Total Oper XPath Maps: %u", darr_len(be_oper_xpath_map)); + __dbg("Total Noitf XPath Maps: %u", darr_len(be_notif_xpath_map)); __dbg("Total RPC XPath Maps: %u", darr_len(be_rpc_xpath_map)); }