NACM RFC341 datanode paths, read operation
This commit is contained in:
parent
58c36decef
commit
ba59e22fd7
26 changed files with 689 additions and 325 deletions
|
|
@ -474,7 +474,7 @@ client_get_config_only(clicon_handle h,
|
|||
if (xpath_vec(xret, nsc, "%s", &xvec, &xlen, xpath?xpath:"/") < 0)
|
||||
goto done;
|
||||
/* NACM datanode/module read validation */
|
||||
if (nacm_datanode_read(xret, xvec, xlen, username, xnacm) < 0)
|
||||
if (nacm_datanode_read(h, xret, xvec, xlen, username, xnacm) < 0)
|
||||
goto done;
|
||||
}
|
||||
cprintf(cbret, "<rpc-reply>");
|
||||
|
|
@ -1174,7 +1174,7 @@ from_client_get(clicon_handle h,
|
|||
if (xpath_vec(xret, nsc, "%s", &xvec, &xlen, xpath?xpath:"/") < 0)
|
||||
goto done;
|
||||
/* NACM datanode/module read validation */
|
||||
if (nacm_datanode_read(xret, xvec, xlen, username, xnacm) < 0)
|
||||
if (nacm_datanode_read(h, xret, xvec, xlen, username, xnacm) < 0)
|
||||
goto done;
|
||||
}
|
||||
cprintf(cbret, "<rpc-reply>"); /* OK */
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ clixon_plugin_statedata(clicon_handle h,
|
|||
if (debug)
|
||||
clicon_log_xml(LOG_DEBUG, x, "%s STATE:", __FUNCTION__);
|
||||
#endif
|
||||
/* XXX: ret == 0 invalid yang binding should be handled as internal error */
|
||||
if (xml_bind_yang(x, YB_MODULE, yspec, NULL) < 0)
|
||||
goto done;
|
||||
if (xml_apply(x, CX_ELMNT, xml_sort, h) < 0)
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ leafstring(cxobj *x)
|
|||
return xml_value(c);
|
||||
}
|
||||
|
||||
/*! Internal recursive part where configuration xml tree is pruned frim filter
|
||||
/*! Internal recursive part where configuration xml tree is pruned from filter
|
||||
* assume parent has been selected and filter match (same name) as parent
|
||||
* parent is pruned according to selection.
|
||||
* @param[in] xfilter Filter xml
|
||||
|
|
|
|||
|
|
@ -738,9 +738,11 @@ restconf_insert_attributes(cxobj *xdata,
|
|||
}
|
||||
/* Add prefix/namespaces used in attributes */
|
||||
cv = NULL;
|
||||
while ((cv = cvec_each(nsc, cv)) != NULL)
|
||||
if (xmlns_set(xdata, cv_name_get(cv), cv_string_get(cv)) < 0)
|
||||
while ((cv = cvec_each(nsc, cv)) != NULL){
|
||||
char *ns = cv_string_get(cv);
|
||||
if (xmlns_set(xdata, cv_name_get(cv), ns) < 0)
|
||||
goto done;
|
||||
}
|
||||
if (nsc)
|
||||
xml_sort(xdata, NULL); /* Ensure attr is first */
|
||||
cprintf(cb, "/>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue