diff --git a/CHANGELOG.md b/CHANGELOG.md index 25cedf06..4afe193a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,32 +3,35 @@ ## 3.5.0 (Upcoming) ### Major changes: -* Added a "user" parameter to plugin_credentials() restconf callback. To enable authentication and in preparation for access control a la RFC 6536. * Major Restconf feature update to compy to RFC 8040. Thanks Stephen Jones for getting right. - * GET well-known, top-level resource, yang library version, - * PUT whole datastore, check for different keys in put lists. + * GET: Always return object referenced (and nothing else). ie, GET /restconf/data/X returns X. + * GET Added support for the following resources: Well-known, top-level resource, and yang library version, * GET Single element JSON lists use {list:[element]}, not {list:element}. + * PUT Whole datastore ### Minor changes: +* Changed signature of plugin_credentials() restconf callback. Added a "user" parameter. To enable authentication and in preparation for access control a la RFC 6536. * Added RFC 6536 ietf-netconf-acm@2012-02-22.yang access control (but not implemented). -* The following backward compatible options to configure have been obsoleted. If you havent already migrated this code you must do this now. - * Backend startup modes prior to 3.3.3. As enabled with `configure --with-startup-compat`. Configure option CLICON_USE_STARTUP_CONFIG is also obsoleted. - * Configuration files (non-XML) prior to 3.3.3. As enabled with `configure --with-config-compat`. The template clicon.conf.cpp files are also removed. - * Clixon XML C-lib prior to 3.4.0. As enabled with `configure --with-xml-compat` +* The following backward compatible options to configure have been _obsoleted_. If you havent already migrated this code you must do this now. + * `configure --with-startup-compat`. Configure option CLICON_USE_STARTUP_CONFIG is also obsoleted. + * `configure --with-config-compat`. The template clicon.conf.cpp files are also removed. + * `configure --with-xml-compat` -* New configuration option: CLICON_RESTCONF_PRETTY -* Changed restconf GET to return object referenced. ie, GET /restconf/data/X returns X. Thanks Stephen Jones for getting this right. +* New configuration option: CLICON_RESTCONF_PRETTY. Default true. Set to false to get more compact Restconf output. -* Default configure file added by Matt Smith. Config file is selected in the following priority order: - * Provide -f option when starting a program. + +* Default configure file handling generalized by Renato Botelho/Matt Smith. Config file FILE is selected in the following priority order: + * Provide -f FILE option when starting a program (eg clixon_backend -F FILE) * Provide --with-configfile=FILE when configuring - * /etc/clixon.xml + * Provide --with-sysconfig= when configuring, then FILE is /clixon.xml + * Provide --sysconfig= when configuring then FILE is /etc/clixon.xml + * FILE is /usr/local/etc/clixon.xml ### Corrected Bugs -* yang string length "max" keyword set to MAXPATHLEN -* Corrected "No yang spec" printed on tty on leafref CLI usage -* xml2cvec: range error (eg 1000 for int8) is not treated as error, just log and skip. +* yang max keyword was not supported for string type. Corrected by setting "max" to MAXPATHLEN +* Corrected "No yang spec" printed on tty when using leafref in CLI. +* Fixed error in xml2cvec. If a (for example) int8 value has range error (eg 1000), it was treated as an error and the program terminated. Now this is just logged and skipped. Reported by Fredrik Pettai. ### Known issues diff --git a/test/lib.sh b/test/lib.sh index 00eec2d7..8f991c39 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -5,6 +5,18 @@ testnr=0 testname= +# For memcheck +#clixon_cli="valgrind --leak-check=full --show-leak-kinds=all clixon_cli" +clixon_cli=clixon_cli + +# For memcheck / performance +#clixon_netconf="valgrind --leak-check=full --show-leak-kinds=all clixon_netconf" +# clixon_netconf="valgrind --tool=callgrind clixon_netconf +clixon_netconf=clixon_netconf + +#clixon_backend="valgrind --leak-check=full --show-leak-kinds=all clixon_backend" +clixon_backend=clixon_backend + dir=/var/tmp/$0 if [ ! -d $dir ]; then mkdir $dir diff --git a/test/test_cli.sh b/test/test_cli.sh index 75f596eb..496b9d95 100755 --- a/test/test_cli.sh +++ b/test/test_cli.sh @@ -28,10 +28,6 @@ cat < $cfg EOF -# For memcheck -#clixon_cli="valgrind --leak-check=full --show-leak-kinds=all clixon_cli" -clixon_cli=clixon_cli - # kill old backend (if any) new "kill old backend" sudo clixon_backend -z -f $cfg @@ -39,7 +35,7 @@ if [ $? -ne 0 ]; then err fi new "start backend -s init -f $cfg" -sudo clixon_backend -s init -f $cfg +sudo $clixon_backend -s init -f $cfg if [ $? -ne 0 ]; then err fi diff --git a/test/test_leafref.sh b/test/test_leafref.sh index f31893af..bb5649ff 100755 --- a/test/test_leafref.sh +++ b/test/test_leafref.sh @@ -22,11 +22,6 @@ cat < $cfg EOF -# For memcheck -# clixon_netconf="valgrind --leak-check=full --show-leak-kinds=all clixon_netconf" -clixon_netconf=clixon_netconf -clixon_cli=clixon_cli - cat < $fyang module example{ import ietf-ip { diff --git a/test/test_netconf.sh b/test/test_netconf.sh index 5b6798ec..78070864 100755 --- a/test/test_netconf.sh +++ b/test/test_netconf.sh @@ -25,11 +25,6 @@ cat < $cfg EOF - -# For memcheck -#clixon_netconf="valgrind --leak-check=full --show-leak-kinds=all clixon_netconf" -clixon_netconf=clixon_netconf - echo "clixon_backend -zf $cfg" # kill old backend (if any) new "kill old backend" diff --git a/test/test_order.sh b/test/test_order.sh index 433ee9bd..d29ad4f2 100755 --- a/test/test_order.sh +++ b/test/test_order.sh @@ -13,8 +13,7 @@ fyang=$dir/order.yang # For memcheck # clixon_netconf="valgrind --leak-check=full --show-leak-kinds=all clixon_netconf" -clixon_netconf=clixon_netconf -clixon_cli=clixon_cli + dbdir=$dir/order new "Set up $dbdir" diff --git a/test/test_perf.sh b/test/test_perf.sh index ff3efa48..ece6a3b6 100755 --- a/test/test_perf.sh +++ b/test/test_perf.sh @@ -22,12 +22,6 @@ cfg=$dir/scaling-conf.xml fyang=$dir/scaling.yang fconfig=$dir/config - -# For memcheck -# clixon_netconf="valgrind --leak-check=full --show-leak-kinds=all clixon_netconf" -# clixon_netconf="valgrind --tool=callgrind clixon_netconf -clixon_netconf=clixon_netconf - cat < $fyang module ietf-ip{ container x { diff --git a/test/test_startup.sh b/test/test_startup.sh index 53f7c257..c81f88b9 100755 --- a/test/test_startup.sh +++ b/test/test_startup.sh @@ -10,11 +10,6 @@ . ./lib.sh cfg=$dir/conf_startup.xml -# For memcheck -# clixon_netconf="valgrind --leak-check=full --show-leak-kinds=all clixon_netconf" -clixon_netconf=clixon_netconf -clixon_cli=clixon_cli - cat < $cfg $cfg diff --git a/test/test_type.sh b/test/test_type.sh index 432d30cb..dcc2288b 100755 --- a/test/test_type.sh +++ b/test/test_type.sh @@ -23,12 +23,6 @@ cat < $cfg EOF - -# For memcheck -#clixon_cli="valgrind --leak-check=full --show-leak-kinds=all clixon_cli" -clixon_cli=clixon_cli -clixon_netconf=clixon_netconf - cat < $fyang module example{ typedef ab { diff --git a/test/test_yang.sh b/test/test_yang.sh index c2cdead5..15eeba11 100755 --- a/test/test_yang.sh +++ b/test/test_yang.sh @@ -7,11 +7,6 @@ cfg=$dir/conf_yang.xml fyang=$dir/test.yang -# For memcheck -# clixon_netconf="valgrind --leak-check=full --show-leak-kinds=all clixon_netconf" -clixon_netconf=clixon_netconf -clixon_cli=clixon_cli - cat < $cfg $cfg