diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-03-18 19:08:23 +0200 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-04-22 16:36:22 +0300 |
| commit | 58a8ebc1fca07ba963faf60d54d77336f36e5ded (patch) | |
| tree | 861d58a483ac4907ff4e4c43d3dbdb9cce840cd9 /lib/northbound.h | |
| parent | 7f7bcb1ffa636318659abb16c7690d9875577ef9 (diff) | |
lib: rework northbound RPC callback
Change input/output arguments of the RPC callback from lists of
(xpath/value) tuples to YANG data trees.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/northbound.h')
| -rw-r--r-- | lib/northbound.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/northbound.h b/lib/northbound.h index 3bf1eacd61..34d17a587c 100644 --- a/lib/northbound.h +++ b/lib/northbound.h @@ -274,11 +274,11 @@ struct nb_cb_rpc_args { /* XPath of the YANG RPC or action. */ const char *xpath; - /* Read-only list of input parameters. */ - const struct list *input; + /* Read-only "input" tree of the RPC/action. */ + const struct lyd_node *input; - /* List of output parameters to be populated by the callback. */ - struct list *output; + /* The "output" tree of the RPC/action to be populated by the callback. */ + struct lyd_node *output; /* Buffer to store human-readable error message in case of error. */ char *errmsg; @@ -833,7 +833,7 @@ extern const void *nb_callback_lookup_next(const struct nb_node *nb_node, const void *parent_list_entry, const struct yang_list_keys *keys); extern int nb_callback_rpc(const struct nb_node *nb_node, const char *xpath, - const struct list *input, struct list *output, + const struct lyd_node *input, struct lyd_node *output, char *errmsg, size_t errmsg_len); extern void nb_callback_notify(const struct nb_node *nb_node, const char *xpath, struct lyd_node *dnode); |
