summaryrefslogtreecommitdiff
path: root/mgmtd/mgmt_be_adapter.c
AgeCommit message (Collapse)Author
2025-01-18mgmtd: testc: add listen for datastore notificationsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-14lib: northbound/mgmtd: add backend model supportChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13mgmtd: add notify selectors to filter datastore notificationsChristian Hopps
- Additionally push the selectors down to the backends Signed-off-by: Christian Hopps <chopps@labn.net>
2024-12-21mgmtd: fix compile erroranlan_cs
Compile error with `--disable-ripd`: ``` mgmtd/mgmt_be_adapter.c:86:5: error: "HAVE_RIPD" is not defined, evaluates to 0 [-Werror=undef] 86 | #if HAVE_RIPD | ^~~~~~~~~ ``` I have searched the code, there is only three places need to be fixed. Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-08-28mgmtd: Ensure map is NULLDonald Sharp
Build is complaining: build 27-Aug-2024 05:46:38 mgmtd/mgmt_be_adapter.c: In function ‘mgmt_register_client_xpath’: build 27-Aug-2024 05:46:38 mgmtd/mgmt_be_adapter.c:274:27: warning: ‘maps’ may be used uninitialized [-Wmaybe-uninitialized] build 27-Aug-2024 05:46:38 274 | map = darr_append(*maps); build 27-Aug-2024 05:46:38 | ^ build 27-Aug-2024 05:46:38 mgmtd/mgmt_be_adapter.c:250:36: note: ‘maps’ was declared here build 27-Aug-2024 05:46:38 250 | struct mgmt_be_xpath_map **maps, *map; build 27-Aug-2024 05:46:38 | ^~~~ Let's make the compiler happy, even though there is no problem. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-15*: Fix spelling errors foundDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-06-07mgmtd: add empty notif xpath map for completenessChristian Hopps
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 <chopps@labn.net>
2024-05-09mgmtd: add missing diagnostic show cmd output (notify maps)Christian Hopps
- also add missing rpc client accounting bug in same diagnostic command. Signed-off-by: Christian Hopps <chopps@labn.net>
2024-04-22ripngd: convert RPC commands to mgmtdIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-22ripd: convert RPC commands to mgmtdIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-22mgmtd: add native RPC processingIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-22mgmtd: add backend xpath map for RPCIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-04lib: add keychain northbound supportChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-18lib: mgmtd: add xpath arg to notification messageChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-12mgmtd: fix be_is_client_interestedIgor Ryzhov
Backend "subscribe" API allows daemons to dynamically register xpaths they are interested in. Such xpaths are not stored in hardcoded config/oper xpath arrays so this function fails to understand that a backend daemon is interested in them. Fix by using dynamic xpath maps instead which store both hardcoded and dynamic xpaths. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-10lib, mgmtd: fix processing of yang notificationsIgor Ryzhov
Current code assumes that notification is always sent in stripped JSON format and therefore notification xpath starts at the third symbol of notification data. Assuming JSON is more or less fine, because this representation is internal to FRR, but the assumption about the xpath is wrong, because it won't work for not top-level notifications. YANG allows to define notification as a child for some data node deep into the tree and in this case notification data contains not only the notification node itself, but also all its parents. To fix the issue, parse the notification data and get its xpath from its schema node. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-31mgmtd: convert MGMT_BE_ADAPTER_DBG() to __dbg()Christian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-30mgmtd: backend subscriptions to notificationsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-30lib: mgmtd: add YANG notification supportChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-28zebra: convert to mgmtdIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28Merge pull request #15243 from opensourcerouting/autoconf-dir-messDonald Sharp
*: fix a pile of directory and/or state retention related issues
2024-01-28mgmtd: fix ripngd oper-data xpathsIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-27lib, mgmtd: fix wrong mgmtd socket pathsDavid Lamparter
These paths were ignoring the `-N` namespacing option. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-26ripngd: convert ripngd to mgmtdChristian Hopps
- a couple small fixes for ripd conversion as well. Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26ripd: ripd convert to mgmtdChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26mgmtd: fix commit request overwriteIgor Ryzhov
There are places, where we can receive an existing commit transaction. If we don't check that the request already exists, it gets overwritten and we start having problems with transaction refcounters. Forbid having multiple configuration sessions simultaneously. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-26mgmtd: fix log typeIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-19mgmtd: remove heavy duplication in mgmtd config readChristian Hopps
Previously each container created all it's decendents before descending into the children and repeating the process. Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-13doc: mgmtd: update mgmtd conversion doc to be current.Christian Hopps
Also change `be_client_xpaths` to `be_client_config_xpaths` referred in the doc to make much clearer it's use (since there's a separate `be_client_oper_xpaths`. Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-30lib: mgmtd: increase soft-max msg size to 64KChristian Hopps
- remove unused mgmt client/server constants Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28zebra: add zebra to mgmtd oper-stateChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28lib: add dedicated API functions for native msgsChristian Hopps
- reorg native message header Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28mgmtd: step 6: remove old unfinished get-data codeChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28mgmtd: step 5: add get-tree txn functionalityChristian Hopps
Adds the guts of the get-tree functionality that is called by or calls the FE and BE code for get-tree processing. Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28mgmtd: step 3: BE adapter native message handlingChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-05mgmtd: enable conn debug when user enables mgmtd debugsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-11-12mgmtd, lib: remove batch ids from all messagesIgor Ryzhov
Batch IDs are only used to verify that all messages were received and processed by a backend. It's not necessary to do that as we use reliable stream transport - messages can't be dropped or received out of order. This commit also fixes possible race condition that can happen if one backend process messages slower than other backends. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2023-11-06mgmtd: simplify xpath registriesChristian Hopps
- move from client id indexed array of uints for register info per client to a u64 bitmask. - add bit walking FOREACH macro Walk the client IDs whose bits are set in a mask. Signed-off-by: Christian Hopps <chopps@labn.net>
2023-10-17mgmtd, lib: remove batch ids from cfg apply replyIgor Ryzhov
The config is always applied fully, all batches are included. There's no need to pass a list of applied batches as it always contains all of them. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2023-06-27mgmtd: convert map to darr use allowing dynamic registrationsChristian Hopps
- move from the static allocated and initialize xpath map to using the new darr (dynamic array) code. Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-27mgmtd: remove unused "placeholder" code.Christian Hopps
We don't need un-run/un-tested placeholder code we may never need. Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-18mgmtd: simplify locking, removing read locksChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12lib: mgmtd: fix/stdize debug message macrosChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05mgmtd: rm unused/unneeded code add couple commentsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: address review commentsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: cleanup BE xpath subscription and matching codeChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: simplify early config build removing unused codeChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-28mgmtd: lib: cleanup error and debug messagesChristian Hopps
- always use IDs not a mix of IDs and pointers. - always use PRIu64 not a mix of hex and decimal for IDs Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-28mgmtd: lib: move INIT to after client registersChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-28mgmtd: send reply to SUBSCR_REQ with success or notChristian Hopps
since we don't actually handle xpath subscriptions, reply with fail if they are requested. Signed-off-by: Christian Hopps <chopps@labn.net>