diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-02-10 02:11:13 +0200 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-02-11 13:26:52 +0200 | 
| commit | 3ac3a6605d550d7ffb2535e1a90c7ebc04e940be (patch) | |
| tree | 38497c7f296518fab21800211d2366013c2d9d11 /vtysh/vtysh.c | |
| parent | d94f80fbc4347cbbf5ee6ecbdf3682329db832dc (diff) | |
lib, mgmtd: rework processing of yang notifications
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>
Diffstat (limited to 'vtysh/vtysh.c')
| -rw-r--r-- | vtysh/vtysh.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 3290c8d54a..f90f8983d4 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -3169,7 +3169,7 @@ DEFUNSH(VTYSH_ALL, debug_nb,  	debug_nb_cmd,  	"[no] debug northbound\  	   [<\ -	    callbacks [{configuration|state|rpc}]\ +	    callbacks [{configuration|state|rpc|notify}]\  	    |notifications\  	    |events\  	    |libyang\ @@ -3182,6 +3182,7 @@ DEFUNSH(VTYSH_ALL, debug_nb,  	"State\n"  	"RPC\n"  	"Notifications\n" +	"Notifications\n"  	"Events\n"  	"libyang debugging\n")  {  | 
