summaryrefslogtreecommitdiffstats
path: root/lib/northbound_cli.h
diff options
context:
space:
mode:
authorChirag Shah <chirag@nvidia.com>2020-10-04 00:34:33 +0200
committerChirag Shah <chirag@nvidia.com>2020-10-05 22:15:59 +0200
commitf63f5f1947c3b4a99e97494198520f03fb6b063e (patch)
tree8c1071614c685dc9d8a68322ecd6cf0ce85b7e37 /lib/northbound_cli.h
parentMerge pull request #6904 from chiragshah6/yang_nb6 (diff)
downloadfrr-f63f5f1947c3b4a99e97494198520f03fb6b063e.tar.xz
frr-f63f5f1947c3b4a99e97494198520f03fb6b063e.zip
*: add errmsg to nb rpc
Display human readable error message in northbound rpc transaction failure. In case of vtysh nb client, the error message will be displayed to user. Testing: bharat# clear evpn dup-addr vni 1002 ip 11.11.11.11 Error type: generic error Error description: Requested IP's associated MAC aa:aa:aa:aa:aa:aa is still in duplicate state Signed-off-by: Chirag Shah <chirag@nvidia.com>
Diffstat (limited to 'lib/northbound_cli.h')
-rw-r--r--lib/northbound_cli.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/northbound_cli.h b/lib/northbound_cli.h
index 112d62efd..2290a76b8 100644
--- a/lib/northbound_cli.h
+++ b/lib/northbound_cli.h
@@ -75,6 +75,9 @@ extern int nb_cli_apply_changes(struct vty *vty, const char *xpath_base_fmt,
/*
* Execute a YANG RPC or Action.
*
+ * vty
+ * The vty terminal to dump any error.
+ *
* xpath
* XPath of the YANG RPC or Action node.
*
@@ -90,7 +93,7 @@ extern int nb_cli_apply_changes(struct vty *vty, const char *xpath_base_fmt,
* Returns:
* CMD_SUCCESS on success, CMD_WARNING otherwise.
*/
-extern int nb_cli_rpc(const char *xpath, struct list *input,
+extern int nb_cli_rpc(struct vty *vty, const char *xpath, struct list *input,
struct list *output);
/*