summaryrefslogtreecommitdiffstats
path: root/lib/mgmt_be_client.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: northbound/mgmtd: add backend model supportChristian Hopps2025-01-141-0/+2
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: add NOTIF message ops (notification, replace, delete, patch)Christian Hopps2025-01-071-0/+16
| | | | | | - needed for supporting backend datastore notifications Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: common debug status outputIgor Ryzhov2024-08-271-5/+0
| | | | | | | Implement common code for debug status output and remove daemon-specific code that is duplicated everywhere. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* lib: add native RPC processing to mgmt backend clientIgor Ryzhov2024-04-221-0/+2
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* lib: always call new notification hooks tooChristian Hopps2024-02-151-9/+0
| | | | | | | - call the new notification hooks when backends call the old notification posting API. Signed-off-by: Christian Hopps <chopps@labn.net>
* lib, mgmtd: rework processing of yang notificationsIgor Ryzhov2024-02-111-10/+2
| | | | | | | | | | | | | Currently, YANG notification processing is done using a special type of callbacks registered in backend clients. In this commit, we start using regular northbound infrastructure instead, because it already has a convenient way of registering xpath-specific callbacks without the need for creating additional structures for each necessary notification. We also now pass a notification data to the callback, instead of a plain JSON. This allows to use regular YANG library functions for inspecting notification fields, instead of manually parsing the JSON. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* mgmtd: convert MGMTD_BE_CLIENT_DBG() to debug_be_client()Christian Hopps2024-02-011-3/+3
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* mgmtd: backend subscriptions to notificationsChristian Hopps2024-01-301-5/+20
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: mgmtd: add YANG notification supportChristian Hopps2024-01-301-0/+9
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: mgmtd: increase soft-max msg size to 64KChristian Hopps2023-12-301-21/+8
| | | | | | - remove unused mgmt client/server constants Signed-off-by: Christian Hopps <chopps@labn.net>
* lib, mgmtd: move common header to libIgor Ryzhov2023-11-171-1/+1
| | | | | | | The common header included from lib and other daemons should be located in lib, not in mgmt directory. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* mgmtd: simplify xpath registriesChristian Hopps2023-11-061-44/+0
| | | | | | | | | | - 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>
* lib: mgmtd: improvements in logging and commentaryChristian Hopps2023-06-131-0/+10
| | | | | | | | | | - log names of datastores not numbers - improve logging for mgmt_msg_read - Rather than use a bool, instead store the pending const string name of the command being run that has postponed the CLI. This adds some nice information to the logging when enabled. Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: mgmtd: remove abstraction layer and other cleanupChristian Hopps2023-06-041-112/+33
| | | | | | | | | | | | | | Code is no longer using a global FE "client context", and instead creates client objects, rename the structure and it's uses to reflect this. Remove an obfuscating abstraction layer whose existence was entirely based on using a uintptr_t rather than a pointer to an declared-only struct. Change multi-duty "params" structure into a single duty callbacks one. Remove unsupported API code. Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: msg: refactor common connection code from mgmtdChristian Hopps2023-05-281-1/+1
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* mgmtd: fully implement debug flags for mgmtd and clientsChristian Hopps2023-05-011-0/+14
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* *: Convert `struct event_master` to `struct event_loop`Donald Sharp2023-03-241-1/+1
| | | | | | Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert struct thread_master to struct event_master and it's ilkDonald Sharp2023-03-241-3/+2
| | | | | | | Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* mgmtd: lib: utilize msglib constructed from the removed codeChristian Hopps2023-03-221-12/+2
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* mgmtd: Enroll Staticd as a backend client for MGMTDChristian Hopps2023-03-221-2/+0
| | | | | | | | | | | | | | | | | | | This commmit introduces Staticd as a backend client for the MGMTd framework. All the static commands will be diverted to the MGMT daemon and will use the transactional model to make changes to the internal state. Similar mechanism can be used by other daemons to use the MGMT framework in the future. This commit includes the following functionalities in the changeset: 1. Diverts all the staticd (config only) commands to MGMTd. 2. Enrolls staticd as a backend client to use the MGMT framework. 3. Modify the staticd NB config handlers so that they can be compiled into a library and loaded in the MGMTd process context. Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com> Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Co-authored-by: Ujwal P <ujwalp@vmware.com> Signed-off-by: Yash Ranjan <ranjany@vmware.com>
* mgmtd: Add MGMT Backend Interface FrameworkChristian Hopps2023-03-221-0/+273
This commit introduces the MGMT Backend Interface which can be used by back-end management client daemons like BGPd, Staticd, Zebra to connect with new FRR Management daemon (MGMTd) and utilize the new FRR Management Framework to let any Frontend clients to retrieve any operational data or manipulate any configuration data owned by the individual Backend daemon component. This commit includes the following functionalities in the changeset: 1. Add new Backend server for Backend daemons connect to. 2. Add a C-based Backend client library which can be used by daemons to communicate with MGMTd via the Backend interface. 3. Maintain a backend adapter for each connection from an appropriate Backend client to facilitate client requests and track one or more transactions initiated from Frontend client sessions that involves the backend client component. 4. Add the following commands to inspect various Backend client related information a. show mgmt backend-adapter all b. show mgmt backend-yang-xpath-registry c. show mgmt yang-xpath-subscription Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com> Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Co-authored-by: Ujwal P <ujwalp@vmware.com> Signed-off-by: Yash Ranjan <ranjany@vmware.com>