Adding username to all restconf backend calls
This commit is contained in:
parent
36d310de88
commit
278f3de840
7 changed files with 115 additions and 82 deletions
|
|
@ -156,7 +156,7 @@ expand_dbvar(void *h,
|
|||
goto done;
|
||||
|
||||
/* XXX read whole configuration, why not send xpath? */
|
||||
if (clicon_rpc_get_config(h, dbstr, "/", &xt) < 0)
|
||||
if (clicon_rpc_get_config(h, dbstr, "/", NULL, &xt) < 0)
|
||||
goto done;
|
||||
if ((xerr = xpath_first(xt, "/rpc-error")) != NULL){
|
||||
clicon_rpc_generate_error("Get configuration", xerr);
|
||||
|
|
@ -484,7 +484,7 @@ cli_show_config(clicon_handle h,
|
|||
else
|
||||
cprintf(cbxpath, "%s", xpath);
|
||||
/* Get configuration from database */
|
||||
if (clicon_rpc_get_config(h, db, cbuf_get(cbxpath), &xt) < 0)
|
||||
if (clicon_rpc_get_config(h, db, cbuf_get(cbxpath), NULL, &xt) < 0)
|
||||
goto done;
|
||||
if ((xerr = xpath_first(xt, "/rpc-error")) != NULL){
|
||||
clicon_rpc_generate_error("Get configuration", xerr);
|
||||
|
|
@ -568,7 +568,7 @@ show_conf_xpath(clicon_handle h,
|
|||
}
|
||||
cv = cvec_find_var(cvv, "xpath");
|
||||
xpath = cv_string_get(cv);
|
||||
if (clicon_rpc_get_config(h, str, xpath, &xt) < 0)
|
||||
if (clicon_rpc_get_config(h, str, xpath, NULL, &xt) < 0)
|
||||
goto done;
|
||||
if ((xerr = xpath_first(xt, "/rpc-error")) != NULL){
|
||||
clicon_rpc_generate_error("Get configuration", xerr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue