summaryrefslogtreecommitdiff
path: root/lib/vty.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-01-13 22:51:45 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-01-15 10:27:33 +0200
commite1cdb38ee61bcd05b9648d4d60007336e5cffff4 (patch)
tree60a54c48eaa7bcee51964e59f01676895da99da4 /lib/vty.c
parent25d79af9578ba339b105c3d65c9706ae17419527 (diff)
lib, mgmtd: add ability to set content type in get-data request
Like in RESTCONF GET request and NETCONF get-data request, make it possible to request state-only, config-only, or all data. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/vty.c b/lib/vty.c
index f1b7d621b7..3fc7c38083 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -4106,14 +4106,15 @@ int vty_mgmt_send_get_req(struct vty *vty, bool is_config,
}
int vty_mgmt_send_get_data_req(struct vty *vty, LYD_FORMAT result_type,
- const char *xpath)
+ uint8_t flags, const char *xpath)
{
LYD_FORMAT intern_format = result_type;
vty->mgmt_req_id++;
if (mgmt_fe_send_get_data_req(mgmt_fe_client, vty->mgmt_session_id,
- vty->mgmt_req_id, intern_format, xpath)) {
+ vty->mgmt_req_id, intern_format, flags,
+ xpath)) {
zlog_err("Failed to send GET-DATA to MGMTD session-id: %" PRIu64
" req-id %" PRIu64 ".",
vty->mgmt_session_id, vty->mgmt_req_id);