Clixon release 4.0.0
This commit is contained in:
parent
2a766c5adf
commit
fe46a0e093
12 changed files with 38 additions and 80 deletions
19
CHANGELOG.md
19
CHANGELOG.md
|
|
@ -4,23 +4,26 @@
|
|||
|
||||
### Summary
|
||||
|
||||
This is a major uplift of Yang and XML features which motivates a
|
||||
major number increment. Thanks Netgate for allowing me to spend full
|
||||
time on increasing the feature-set, the stability and performance.
|
||||
This release is a major uplift of Yang and XML features which
|
||||
motivates a major version number increment.
|
||||
|
||||
In short, I consider the Yang and XML support good enough for most
|
||||
use-cases. There are still some features not supported, but they are
|
||||
relatively uncommon (see [README](https://github.com/clicon/clixon/#yang).
|
||||
use-cases. There are still features not supported, but hopefully they
|
||||
are relatively uncommon (see [README](https://github.com/clicon/clixon/#yang).
|
||||
|
||||
The next project is to fix compiance of RESTCONF and NETCONF where
|
||||
there is some work to lift it to the same level.
|
||||
The next task for uplifting is RESTCONF where several use-cases are
|
||||
not supported. There is also a need for NETCONF modernization and
|
||||
added optional features.
|
||||
|
||||
Going forward I plan to make more regular minor releases. With the
|
||||
current Trevor CI in place, making releases should not be a large
|
||||
thing, and it is also safer to just pull a master commit. However, for
|
||||
synchronizing and tracing I will try to make monthly releases.
|
||||
|
||||
--Olof
|
||||
Thanks to Netgate for that enabled me to spend full time on Clixon!
|
||||
|
||||
Stockholm 13 July 2019
|
||||
Olof Hagsand
|
||||
|
||||
### Major New features
|
||||
* Yang "refine" feature supported
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
the terms of any one of the Apache License version 2 or the GPL.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -37,24 +37,6 @@
|
|||
#ifndef _CLI_COMMON_H_
|
||||
#define _CLI_COMMON_H_
|
||||
|
||||
/*! macro to create a single-argument callback from multiple */
|
||||
#define cb_single_arg(fn) \
|
||||
int fn(clicon_handle h, cvec *cvv, cg_var *arg) \
|
||||
{ \
|
||||
int retval=-1; \
|
||||
cvec *argv = NULL; \
|
||||
\
|
||||
if (arg && (argv = cvec_from_var(arg)) == NULL){ \
|
||||
clicon_err(OE_UNIX, errno, "cvec_from_var"); \
|
||||
goto done; \
|
||||
} \
|
||||
retval = fn##v(h, cvv, argv); \
|
||||
done: \
|
||||
if (argv) cvec_free(argv); \
|
||||
return retval; \
|
||||
}
|
||||
|
||||
|
||||
void cli_signal_block(clicon_handle h);
|
||||
void cli_signal_unblock(clicon_handle h);
|
||||
|
||||
|
|
|
|||
|
|
@ -239,17 +239,6 @@ expand_dbvar(void *h,
|
|||
return retval;
|
||||
}
|
||||
|
||||
int
|
||||
expandv_dbvar(void *h,
|
||||
char *name,
|
||||
cvec *cvv,
|
||||
cvec *argv,
|
||||
cvec *commands,
|
||||
cvec *helptexts)
|
||||
{
|
||||
return expand_dbvar(h, name, cvv, argv, commands, helptexts);
|
||||
}
|
||||
|
||||
/*! List files in a directory
|
||||
*/
|
||||
int
|
||||
|
|
|
|||
|
|
@ -59,14 +59,4 @@ int plugin_start(clicon_handle h, int argc, char **argv);
|
|||
*/
|
||||
int plugin_exit(clicon_handle h);
|
||||
|
||||
|
||||
/* Called before prompt is printed, return a customized prompt. */
|
||||
char *plugin_prompt_hook(clicon_handle h, char *mode);
|
||||
|
||||
/* Called if a command is not matched w current mode. Return name of next syntax mode to check until NULL */
|
||||
char *plugin_parse_hook(clicon_handle h, char *cmd, char *name);
|
||||
|
||||
/* Called if ^Z entered. Can modify cli command buffer and position */
|
||||
int plugin_susp_hook(clicon_handle h, char *buf, int prompt_width, int *cursor_loc);
|
||||
|
||||
#endif /* _CLIXON_CLI_H_ */
|
||||
|
|
|
|||
|
|
@ -129,8 +129,6 @@ int cli_help(clicon_handle h, cvec *vars, cvec *argv);
|
|||
int expand_dir(char *dir, int *nr, char ***commands, mode_t flags, int detail);
|
||||
int expand_dbvar(void *h, char *name, cvec *cvv, cvec *argv,
|
||||
cvec *commands, cvec *helptexts);
|
||||
int expandv_dbvar(void *h, char *name, cvec *cvv, cvec *argv,
|
||||
cvec *commands, cvec *helptexts);
|
||||
|
||||
/* cli_show.c: CLIgen new vector arg callbacks */
|
||||
int show_yang(clicon_handle h, cvec *vars, cvec *argv);
|
||||
|
|
|
|||
17
configure
vendored
17
configure
vendored
|
|
@ -663,7 +663,6 @@ build_vendor
|
|||
build_cpu
|
||||
build
|
||||
CLIGEN_PREFIX
|
||||
CLIGEN_VERSION
|
||||
CLIXON_VERSION_MINOR
|
||||
CLIXON_VERSION_MAJOR
|
||||
CLIXON_VERSION_STRING
|
||||
|
|
@ -2172,13 +2171,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||
: ${CFLAGS="-O2 -Wall"}
|
||||
: ${INSTALLFLAGS="-s"}
|
||||
|
||||
CLIXON_VERSION_MAJOR="3"
|
||||
CLIXON_VERSION_MINOR="10"
|
||||
CLIXON_VERSION_MAJOR="4"
|
||||
CLIXON_VERSION_MINOR="0"
|
||||
CLIXON_VERSION_PATCH="0"
|
||||
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\""
|
||||
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\""
|
||||
|
||||
# Fix to specific CLIgen version (eg 3.5) or head (3)
|
||||
CLIGEN_VERSION="3"
|
||||
# Check CLIgen
|
||||
if test "$prefix" = "NONE"; then
|
||||
CLIGEN_PREFIX="$ac_default_prefix"
|
||||
else
|
||||
|
|
@ -2216,7 +2214,6 @@ _ACEOF
|
|||
|
||||
|
||||
|
||||
# Bind to specific CLIgen version
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CLIXON version is ${CLIXON_VERSION}" >&5
|
||||
|
|
@ -4113,7 +4110,7 @@ _ACEOF
|
|||
LIBS="-lcligen $LIBS"
|
||||
|
||||
else
|
||||
as_fn_error $? "CLIgen${CLIGEN_VERSION} missing. Try: git clone https://github.com/olofhagsand/cligen.git" "$LINENO" 5
|
||||
as_fn_error $? "CLIgen missing. Try: git clone https://github.com/olofhagsand/cligen.git" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -4498,8 +4495,8 @@ done
|
|||
|
||||
# YANG_INSTALLDIR is where clixon installs the Clixon yang files
|
||||
# (the files in in yang/clixon)
|
||||
# Each application designer may need to place CLIXON_YANG_DIR in their config:
|
||||
# <CLIXON-YANG-DIR>$YANG_INSTALLDIR</CLIXON-YANG_DIR>
|
||||
# Each application designer may need to place YANG_INSTALLDIR in their config:
|
||||
# <CLICON_YANG_DIR>$YANG_INSTALLDIR</CLICON_YANG_DIR>
|
||||
|
||||
# Check whether --with-yang-installdir was given.
|
||||
if test "${with_yang_installdir+set}" = set; then :
|
||||
|
|
|
|||
12
configure.ac
12
configure.ac
|
|
@ -42,13 +42,12 @@ AC_INIT(lib/clixon/clixon.h.in)
|
|||
: ${CFLAGS="-O2 -Wall"}
|
||||
: ${INSTALLFLAGS="-s"}
|
||||
|
||||
CLIXON_VERSION_MAJOR="3"
|
||||
CLIXON_VERSION_MINOR="10"
|
||||
CLIXON_VERSION_MAJOR="4"
|
||||
CLIXON_VERSION_MINOR="0"
|
||||
CLIXON_VERSION_PATCH="0"
|
||||
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\""
|
||||
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\""
|
||||
|
||||
# Fix to specific CLIgen version (eg 3.5) or head (3)
|
||||
CLIGEN_VERSION="3"
|
||||
# Check CLIgen
|
||||
if test "$prefix" = "NONE"; then
|
||||
CLIGEN_PREFIX="$ac_default_prefix"
|
||||
else
|
||||
|
|
@ -69,7 +68,6 @@ AC_SUBST(CLIXON_VERSION)
|
|||
AC_SUBST(CLIXON_VERSION_STRING)
|
||||
AC_SUBST(CLIXON_VERSION_MAJOR)
|
||||
AC_SUBST(CLIXON_VERSION_MINOR)
|
||||
AC_SUBST(CLIGEN_VERSION) # Bind to specific CLIgen version
|
||||
AC_SUBST(CLIGEN_PREFIX)
|
||||
|
||||
AC_MSG_RESULT(CLIXON version is ${CLIXON_VERSION})
|
||||
|
|
@ -178,7 +176,7 @@ fi
|
|||
|
||||
AC_CHECK_HEADERS(cligen/cligen.h,, AC_MSG_ERROR(cligen missing. Try: git clone https://github.com/olofhagsand/cligen.git))
|
||||
|
||||
AC_CHECK_LIB(cligen, cligen_init,, AC_MSG_ERROR([CLIgen${CLIGEN_VERSION} missing. Try: git clone https://github.com/olofhagsand/cligen.git]))
|
||||
AC_CHECK_LIB(cligen, cligen_init,, AC_MSG_ERROR([CLIgen missing. Try: git clone https://github.com/olofhagsand/cligen.git]))
|
||||
|
||||
# This is for restconf (and fastcgi)
|
||||
AC_ARG_WITH([restconf],
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
# Typically add them in your site file
|
||||
: ${SKIPLIST:=""}
|
||||
|
||||
# Some tests (openconfig/yang_models) just test for the cli to return a version
|
||||
version=4
|
||||
|
||||
>&2 echo "Running $testfile"
|
||||
|
||||
# Site file, an example of this file in README.md
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ fi
|
|||
|
||||
OCDIR=$OPENCONFIG/release/models
|
||||
|
||||
|
||||
cat <<EOF > $cfg
|
||||
<clixon-config xmlns="http://clicon.org/config">
|
||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||
|
|
@ -104,7 +103,7 @@ new "Openconfig test: $clixon_cli -1f $cfg -y $f show version ($m modules)"
|
|||
for f in $files; do
|
||||
if [ -n "$(head -1 $f|grep '^module')" ]; then
|
||||
new "$clixon_cli -1f $cfg -y $f show version"
|
||||
expectfn "$clixon_cli -1f $cfg -y $f show version" 0 "3."
|
||||
expectfn "$clixon_cli -1f $cfg -y $f show version" 0 "$version."
|
||||
fi
|
||||
|
||||
done
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ if [ $BE -ne 0 ]; then
|
|||
fi
|
||||
|
||||
new "cli defined extension"
|
||||
expectfn "$clixon_cli -1f $cfg show version" 0 "3."
|
||||
expectfn "$clixon_cli -1f $cfg show version" 0 "$version."
|
||||
|
||||
new "empty values in leaf-list"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 '<rpc><edit-config><target><candidate/></target><config><x xmlns="urn:example:clixon"><f><e>a</e></f></x></config></edit-config></rpc>]]>]]>' "^<rpc-reply><ok/></rpc-reply>]]>]]>$"
|
||||
|
|
|
|||
|
|
@ -53,21 +53,21 @@ EOF
|
|||
new "yangmodels parse: -f $cfg"
|
||||
|
||||
new "yangmodel Experimental IEEE 802.1: $YANGMODELS/experimental/ieee/802.1"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/802.1 -p $YANGMODELS/experimental/ieee/1588 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/802.1 -p $YANGMODELS/experimental/ieee/1588 show version" 0 "$version."
|
||||
|
||||
new "yangmodel Experimental IEEE 1588: $YANGMODELS/experimental/ieee/1588"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/1588 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/1588 show version" 0 "$version."
|
||||
|
||||
# Standard IEEE
|
||||
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1 show version" 0 "$version."
|
||||
|
||||
new "yangmodel Standard IEEE 802.3: $YANGMODELS/standard/ieee/draft/802.3"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.3 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.3 show version" 0 "$version."
|
||||
|
||||
# Standard IETF
|
||||
new "yangmodel Standard IETF: $YANGMODELS/standard/ietf/RFC"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ietf/RFC show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ietf/RFC show version" 0 "$version."
|
||||
|
||||
# vendor/junos
|
||||
#junos : M/MX, T/TX, Some EX platforms, ACX
|
||||
|
|
@ -90,7 +90,7 @@ let i=0;
|
|||
for f in $files; do
|
||||
if [ -n "$(head -5 $f|grep '^ module')" ]; then
|
||||
new "$clixon_cli -1f $cfg -o CLICON_YANG_MAIN_FILE=$f -p $YANGMODELS/vendor/juniper/18.2/18.2R1/common -p $YANGMODELS/vendor/juniper/18.2/18.2R1/junos/conf show version"
|
||||
expectfn "$clixon_cli -1f $cfg -o CLICON_YANG_MAIN_FILE=$f -p $YANGMODELS/vendor/juniper/18.2/18.2R1/common -p $YANGMODELS/vendor/juniper/18.2/18.2R1/junos/conf -o CLICON_CLI_GENMODEL=0 show version" 0 "3."
|
||||
expectfn "$clixon_cli -1f $cfg -o CLICON_YANG_MAIN_FILE=$f -p $YANGMODELS/vendor/juniper/18.2/18.2R1/common -p $YANGMODELS/vendor/juniper/18.2/18.2R1/junos/conf -o CLICON_CLI_GENMODEL=0 show version" 0 "$version."
|
||||
let i++;
|
||||
sleep 1
|
||||
fi
|
||||
|
|
@ -103,16 +103,16 @@ done
|
|||
if false; then
|
||||
# vendor/cisco/xr
|
||||
new "yangmodel vendor cisco xr 623: $YANGMODELS/vendor/cisco/xr/623"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/623 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/623 show version" 0 "$version."
|
||||
|
||||
new "yangmodel vendor cisco xr 632: $YANGMODELS/vendor/cisco/xr/632"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/632 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/632 show version" 0 "$version."
|
||||
|
||||
new "yangmodel vendor cisco xr 623: $YANGMODELS/vendor/cisco/xr/642"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/642 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/642 show version" 0 "$version."
|
||||
|
||||
new "yangmodel vendor cisco xr 651: $YANGMODELS/vendor/cisco/xr/651"
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/651 show version" 0 "3."
|
||||
expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/vendor/cisco/xr/651 show version" 0 "$version."
|
||||
fi ### cisco
|
||||
|
||||
rm -rf $dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue