Support for empty yang string added, eg default "";
if-feature added in yang parser at several places.
This commit is contained in:
parent
0502ca4218
commit
bd67a2a5f2
5 changed files with 36 additions and 21 deletions
|
|
@ -13,6 +13,14 @@ testname=
|
|||
# If set, enable debugging (of backend)
|
||||
: ${DBG:=0}
|
||||
|
||||
# Parse yangmodels from https://github.com/YangModels/yang
|
||||
# Recommended: checkout yangmodels elsewhere in the tree and set the env
|
||||
# to that
|
||||
: ${YANGMODELS=$(pwd)/yang}
|
||||
|
||||
# Parse yang openconfig models from https://github.com/openconfig/public
|
||||
: ${OPENCONFIG=$(pwd)/public}
|
||||
|
||||
# For memcheck
|
||||
#clixon_cli="valgrind --leak-check=full --show-leak-kinds=all clixon_cli"
|
||||
clixon_cli=clixon_cli
|
||||
|
|
|
|||
|
|
@ -6,29 +6,24 @@
|
|||
# - release/models/wifi/types/openconfig-wifi-types.yang
|
||||
# issue: https://github.com/clicon/clixon/issues/59
|
||||
#
|
||||
OPENCONFIG=public
|
||||
OCDIR=$OPENCONFIG/release/models
|
||||
|
||||
# Clone openconfig dir if not there
|
||||
if [ ! -d public ]; then
|
||||
git clone https://github.com/openconfig/public
|
||||
#else
|
||||
# (cd public;
|
||||
# #git pull
|
||||
# )
|
||||
fi
|
||||
|
||||
# include err() and new() functions and creates $dir
|
||||
. ./lib.sh
|
||||
|
||||
# Yang specifics: multi-keys and empty type
|
||||
APPNAME=example
|
||||
|
||||
# include err() and new() functions and creates $dir
|
||||
. ./lib.sh
|
||||
|
||||
cfg=$dir/conf_yang.xml
|
||||
fyang=$dir/test.yang
|
||||
|
||||
new "openconfig"
|
||||
if [ ! -d "$OPENCONFIG" ]; then
|
||||
err "Hmm Openconfig dir does not seem to exist, try git clone https://github.com/openconfig/public?"
|
||||
fi
|
||||
|
||||
OCDIR=$OPENCONFIG/release/models
|
||||
|
||||
|
||||
cat <<EOF > $cfg
|
||||
<config>
|
||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue