* Netconf as default namespace has been disabled by default.
* Only requests on the form: `<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config>...` will be accepted * All replies will be on the form: `<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">...` * Requests such as: `<rpc><edit-config>...` will not be accepted. * You can revert this behaviour (to clixon pre-4.6 behaviour) by enabling `CLICON_NAMESPACE_NETCONF_DEFAULT` * This API change is a consequence of: [copy-config's RPC cxobj parameter does not contain namespace #131](https://github.com/clicon/clixon/issues/131)
This commit is contained in:
parent
a01fe04613
commit
81fc7f742b
81 changed files with 976 additions and 830 deletions
|
|
@ -369,7 +369,8 @@ api_data_post(clicon_handle h,
|
|||
/* For internal XML protocol: add username attribute for access control
|
||||
*/
|
||||
username = clicon_username_get(h);
|
||||
cprintf(cbx, "<rpc username=\"%s\" xmlns:%s=\"%s\">",
|
||||
cprintf(cbx, "<rpc xmlns=\"%s\" username=\"%s\" xmlns:%s=\"%s\">",
|
||||
NETCONF_BASE_NAMESPACE,
|
||||
username?username:"",
|
||||
NETCONF_BASE_PREFIX,
|
||||
NETCONF_BASE_NAMESPACE); /* bind nc to netconf namespace */
|
||||
|
|
@ -632,6 +633,10 @@ api_operations_post_output(clicon_handle h,
|
|||
if (clicon_debug_get())
|
||||
clicon_log_xml(LOG_DEBUG, xoutput, "%s xoutput:", __FUNCTION__);
|
||||
#endif
|
||||
/* Remove original netconf default namespace. Somewhat unsure what "output" belongs to? */
|
||||
if ((xa = xml_find_type(xoutput, NULL, "xmlns", CX_ATTR)) != NULL)
|
||||
if (xml_purge(xa) < 0)
|
||||
goto done;
|
||||
|
||||
/* Sanity check of outgoing XML
|
||||
* For now, skip outgoing checks.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue