Event stream discovery support
Added config options CLICON_MODULE_LIBRARY_RFC7895, CLICON_STREAM_DISCOVERY_RFC5277, LICON_STREAM_DISCOVERY_RFC804
This commit is contained in:
parent
74fc0800ae
commit
07542269ec
19 changed files with 345 additions and 164 deletions
|
|
@ -60,6 +60,8 @@
|
|||
#include "clixon_yang.h"
|
||||
#include "clixon_log.h"
|
||||
#include "clixon_xml.h"
|
||||
#include "clixon_options.h"
|
||||
#include "clixon_xml_map.h"
|
||||
#include "clixon_netconf_lib.h"
|
||||
|
||||
/*! Create Netconf in-use error XML tree according to RFC 6241 Appendix A
|
||||
|
|
@ -934,3 +936,37 @@ netconf_malformed_message_xml(cxobj **xret,
|
|||
done:
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*! Help function: merge - check yang - if error make netconf errmsg
|
||||
* @param[in] x XML tree
|
||||
* @param[in] yspec Yang spec
|
||||
* @param[in,out] xret Existing XML tree, merge x into this
|
||||
* @retval -1 Error (fatal)
|
||||
* @retval 0 OK
|
||||
* @retval 1 Statedata callback failed
|
||||
*/
|
||||
int
|
||||
netconf_trymerge(cxobj *x,
|
||||
yang_spec *yspec,
|
||||
cxobj **xret)
|
||||
{
|
||||
int retval = -1;
|
||||
char *reason = NULL;
|
||||
cxobj *xc;
|
||||
|
||||
if (xml_merge(*xret, x, yspec, &reason) < 0)
|
||||
goto done;
|
||||
if (reason){
|
||||
while ((xc = xml_child_i(*xret, 0)) != NULL)
|
||||
xml_purge(xc);
|
||||
if (netconf_operation_failed_xml(xret, "rpc", reason)< 0)
|
||||
goto done;
|
||||
retval = 1;
|
||||
goto done;
|
||||
}
|
||||
retval = 0;
|
||||
done:
|
||||
if (reason)
|
||||
free(reason);
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue