- Misc documentation

- Test: move pid file from tmp to global storage to prevent multiple instances
This commit is contained in:
Olof hagsand 2022-04-14 15:20:31 +02:00
parent 8c60d81ed2
commit 580396d32f
9 changed files with 14 additions and 10 deletions

View file

@ -168,6 +168,9 @@ Users may have to change how they access the system
### Corrected Bugs
* Disabled xpath optimization for hierarchical list
* When `XPATH_LIST_OPTIMIZE` is set, patterns like `y[k='3']` is optimized
* But hierarchical lists should not be, ie when `a/y[k='3']` and `a` is a list
* Fixed: [Validate error when appending module B grouping to module A item use augment statement #308](https://github.com/clicon/clixon/issues/308)
* Fixed: [Restconf PATCH method request failed on item defined by submodule #306](https://github.com/clicon/clixon/issues/306)
* Fixed: [restconf GET json response does not encode top level node with namespace as per rfc #303](https://github.com/clicon/clixon/issues/303)

View file

@ -59,9 +59,9 @@
#define IDENTITYREF_KLUDGE
/*! Optimize special list key searches in XPATH finds
* Identify xpaths that search for exactly a list key, eg: "y[k=3]" and then call
* Identify xpaths that search for exactly a list key, eg: "y[k='3']" and then call
* binary search. This only works if "y" has proper yang binding and is sorted by system
* Dont optimize on "hierarchical" lists such as: a/b/y[k=3], where a or b is another list.
* Dont optimize on "hierarchical" lists such as: a/y[k='3'], where a is another list.
*/
#define XPATH_LIST_OPTIMIZE

View file

@ -473,7 +473,9 @@ clixon_module_upgrade(clicon_handle h,
}
if (msd->md_status == 0) /* No modstate in startup */
goto ok;
/* Iterate through xml modified module state */
/* Iterate through xml modified module state
* Note top-level here is typically module-set
*/
xmod = NULL;
while ((xmod = xml_child_each(msd->md_diff, xmod, CX_ELMNT)) != NULL) {
/* Extract namespace */

View file

@ -34,7 +34,7 @@ cat <<EOF > $cfg
<CLICON_SOCK>/usr/local/var/$APPNAME/$APPNAME.sock</CLICON_SOCK>
<CLICON_BACKEND_DIR>/usr/local/lib/$APPNAME/backend</CLICON_BACKEND_DIR>
<CLICON_BACKEND_REGEXP>example_backend.so$</CLICON_BACKEND_REGEXP>
<CLICON_BACKEND_PIDFILE>$dir/restconf.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_BACKEND_PIDFILE>/usr/local/var/$APPNAME/$APPNAME.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_XMLDB_DIR>/usr/local/var/$APPNAME</CLICON_XMLDB_DIR>
<CLICON_CLISPEC_DIR>/usr/local/lib/$APPNAME/clispec</CLICON_CLISPEC_DIR>
<CLICON_CLI_DIR>/usr/local/lib/$APPNAME/cli</CLICON_CLI_DIR>

View file

@ -36,7 +36,7 @@ cat <<EOF > $cfg
<CLICON_YANG_MAIN_DIR>$dir</CLICON_YANG_MAIN_DIR>
<CLICON_SOCK>/usr/local/var/$APPNAME/$APPNAME.sock</CLICON_SOCK>
<CLICON_BACKEND_DIR>/usr/local/lib/$APPNAME/backend</CLICON_BACKEND_DIR>
<CLICON_BACKEND_PIDFILE>$dir/restconf.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_BACKEND_PIDFILE>/usr/local/var/$APPNAME/$APPNAME.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_XMLDB_DIR>$dir</CLICON_XMLDB_DIR>
<CLICON_XMLDB_FORMAT>xml</CLICON_XMLDB_FORMAT>
<CLICON_STREAM_DISCOVERY_RFC8040>true</CLICON_STREAM_DISCOVERY_RFC8040>

View file

@ -31,7 +31,7 @@ cat <<EOF > $cfg
<CLICON_YANG_MAIN_DIR>$dir</CLICON_YANG_MAIN_DIR>
<CLICON_SOCK>/usr/local/var/$APPNAME/$APPNAME.sock</CLICON_SOCK>
<CLICON_BACKEND_DIR>/usr/local/lib/$APPNAME/backend</CLICON_BACKEND_DIR>
<CLICON_BACKEND_PIDFILE>$dir/restconf.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_BACKEND_PIDFILE>/usr/local/var/$APPNAME/$APPNAME.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_XMLDB_DIR>$dir</CLICON_XMLDB_DIR>
<CLICON_XMLDB_FORMAT>json</CLICON_XMLDB_FORMAT>
<CLICON_STREAM_DISCOVERY_RFC8040>true</CLICON_STREAM_DISCOVERY_RFC8040>

View file

@ -39,7 +39,7 @@ cat <<EOF > $cfg
<CLICON_YANG_MAIN_DIR>$dir</CLICON_YANG_MAIN_DIR>
<CLICON_SOCK>/usr/local/var/$APPNAME/$APPNAME.sock</CLICON_SOCK>
<CLICON_BACKEND_DIR>/usr/local/lib/$APPNAME/backend</CLICON_BACKEND_DIR>
<CLICON_BACKEND_PIDFILE>$dir/restconf.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_BACKEND_PIDFILE>/usr/local/var/$APPNAME/$APPNAME.pidfile</CLICON_BACKEND_PIDFILE>
<CLICON_XMLDB_DIR>$dir</CLICON_XMLDB_DIR>
<CLICON_XMLDB_FORMAT>json</CLICON_XMLDB_FORMAT>
<CLICON_STREAM_DISCOVERY_RFC8040>true</CLICON_STREAM_DISCOVERY_RFC8040>

View file

@ -301,7 +301,6 @@ main(int argc,
cvec_print(stdout, nsc);
goto ok; /* need a switch to continue, now just print and quit */
}
/*
* If fp=stdin, then continue reading from stdin (after CR)
* XXX Note 0 above, stdin here
@ -317,7 +316,7 @@ main(int argc,
if ((ret = xml_bind_yang(x0, YB_MODULE, yspec, &xerr)) < 0)
goto done;
if (ret == 0){
if ((cb = cbuf_new()) ==NULL){
if ((cbret = cbuf_new()) ==NULL){
clicon_err(OE_XML, errno, "cbuf_new");
goto done;
}

View file

@ -845,7 +845,7 @@ module clixon-config {
type boolean;
default false;
description
"If set, tag datastores with RFC 7895 YANG Module Library
"If set, tag datastores with RFC 8525 YANG Module Library
info. When loaded at startup, a check is made if the system
yang modules match.
See also CLICON_MODULE_LIBRARY_RFC7895";