more merge

This commit is contained in:
Olof hagsand 2017-09-27 18:29:13 +02:00
parent c74cdda1e8
commit a2bfe2bdd2
3 changed files with 31 additions and 7 deletions

View file

@ -1,8 +1,21 @@
# Clixon CHANGELOG # Clixon CHANGELOG
## 3.3.3 Upcoming ## 3.3.3 Upcoming
* Added a format parameter to clicon_rpc_generate_error() and changed error
printouts for backend errors, such as commit and validate. Example of the
new format:
```
> commit
Sep 27 18:11:58: Commit failed. Edit and try again or discard changes:
protocol invalid-value Missing mandatory variable: type
```
* If clixon config file has .xml ending, yang/clixon-config.yang is used as * If clixon config file has .xml ending, yang/clixon-config.yang is used as
model for an xml-based configuration file. Otherwise legacy format is used. model for an xml-based configuration file. Otherwise legacy format is used.
* The clixon config file format has changed. It now uses XML and YANG.
Old configuration files work, but you can use the new by setting an .xml suffix.
The yang model is yang/clixon-config.yang.
* netconf client was limited to 8K byte messages. Now limit is 2^32. * netconf client was limited to 8K byte messages. Now limit is 2^32.
* Added event_poll function. * Added event_poll function.
* Added experimental xml hash for better performance of large lists. * Added experimental xml hash for better performance of large lists.
@ -23,6 +36,7 @@
* If you use direct netconf get or get-config calls, you may need to handle the return XML differently. * If you use direct netconf get or get-config calls, you may need to handle the return XML differently.
* RESTCONF and CLI is not affected. * RESTCONF and CLI is not affected.
* Example: * Example:
``` ```
Query: Query:
<rpc><get/></rpc> <rpc><get/></rpc>
@ -46,6 +60,7 @@
* Added support for yang presence and no-presence containers. Previous default was "presence". * Added support for yang presence and no-presence containers. Previous default was "presence".
* Empty containers will be removed unless you have used the "presence" yang declaration. * Empty containers will be removed unless you have used the "presence" yang declaration.
* Example YANG without presence: * Example YANG without presence:
``` ```
container container
nopresence { nopresence {
@ -54,7 +69,9 @@
} }
} }
``` ```
If you submit "nopresence" without a leaf, it will automatically be removed: If you submit "nopresence" without a leaf, it will automatically be removed:
``` ```
<nopresence/> # removed <nopresence/> # removed
<nopresence> # not removed <nopresence> # not removed
@ -85,6 +102,7 @@ If you submit "nopresence" without a leaf, it will automatically be removed:
* Validation for leafref forward and backward references; * Validation for leafref forward and backward references;
* CLI completion for generated cli leafrefs for both absolute and relative paths. * CLI completion for generated cli leafrefs for both absolute and relative paths.
* Example, relative path: * Example, relative path:
``` ```
leaf ifname { leaf ifname {
type leafref { type leafref {
@ -215,9 +233,13 @@ May 2017
`load("Comment") <filename:string>,load_config_file("filename", "replace");` `load("Comment") <filename:string>,load_config_file("filename", "replace");`
If you write your own, you need to change the callback signature from; If you write your own, you need to change the callback signature from;
```
int cli_callback(clicon_handle h, cvec *vars, cg_var *arg) int cli_callback(clicon_handle h, cvec *vars, cg_var *arg)
```
to: to:
```
int cli_callback(clicon_handle h, cvec *vars, cvec *argv) int cli_callback(clicon_handle h, cvec *vars, cvec *argv)
```
and rewrite the code to handle argv instead of arg. and rewrite the code to handle argv instead of arg.
These are the system functions affected: These are the system functions affected:
cli_set, cli_merge, cli_del, cli_debug_backend, cli_set_mode, cli_set, cli_merge, cli_del, cli_debug_backend, cli_set_mode,

14
configure vendored
View file

@ -3484,12 +3484,6 @@ if test "$prefix" = "NONE"; then
prefix=${ac_default_prefix} prefix=${ac_default_prefix}
fi fi
cat >>confdefs.h <<_ACEOF
#define CLIXON_DATADIR "${prefix}/share/clixon"
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
$as_echo_n "checking for main in -lm... " >&6; } $as_echo_n "checking for main in -lm... " >&6; }
if ${ac_cv_lib_m_main+:} false; then : if ${ac_cv_lib_m_main+:} false; then :
@ -4271,6 +4265,14 @@ fi
done done
# This is to find clixon system files in the source code.
# same as clixon_DATADIR defined in clixon.mk.cpp for Makefiles
cat >>confdefs.h <<_ACEOF
#define CLIXON_DATADIR "${prefix}/share/clixon"
_ACEOF
ac_config_files="$ac_config_files Makefile lib/Makefile lib/src/Makefile lib/clixon/Makefile apps/Makefile apps/cli/Makefile apps/backend/Makefile apps/netconf/Makefile apps/restconf/Makefile include/Makefile etc/Makefile etc/clixonrc example/Makefile example/docker/Makefile docker/Makefile docker/cli/Makefile docker/cli/Dockerfile docker/backend/Makefile docker/backend/Dockerfile docker/netconf/Makefile docker/netconf/Dockerfile datastore/Makefile datastore/keyvalue/Makefile datastore/text/Makefile yang/Makefile doc/Makefile" ac_config_files="$ac_config_files Makefile lib/Makefile lib/src/Makefile lib/clixon/Makefile apps/Makefile apps/cli/Makefile apps/backend/Makefile apps/netconf/Makefile apps/restconf/Makefile include/Makefile etc/Makefile etc/clixonrc example/Makefile example/docker/Makefile docker/Makefile docker/cli/Makefile docker/cli/Dockerfile docker/backend/Makefile docker/backend/Dockerfile docker/netconf/Makefile docker/netconf/Dockerfile datastore/Makefile datastore/keyvalue/Makefile datastore/text/Makefile yang/Makefile doc/Makefile"

View file

@ -283,7 +283,7 @@ clicon_option_default(clicon_hash_t *copt)
/* Default is to use line-scrolling */ /* Default is to use line-scrolling */
if (!hash_lookup(copt, "CLICON_CLI_LINESCROLLING")){ if (!hash_lookup(copt, "CLICON_CLI_LINESCROLLING")){
if (hash_add(copt, "CLICON_CLI_LINESCROLLING", "1", strlen("1")+1) < 0) if (hash_add(copt, "CLICON_CLI_LINESCROLLING", "1", strlen("1")+1) < 0)
goto catch; goto done;
} }
retval = 0; retval = 0;
done: done: