Test modifications
- Remove dependency of IETF YANGs on most tests - Remove dependnency of example/main in most tests, instead make local copy of example yang
This commit is contained in:
parent
f92e9609dc
commit
dec05e2cae
67 changed files with 516 additions and 149 deletions
|
|
@ -13,14 +13,13 @@ APPNAME=example
|
|||
|
||||
cfg=$dir/conf_yang.xml
|
||||
|
||||
# Use yang in example
|
||||
fyang=$dir/clixon-example.yang
|
||||
|
||||
cat <<EOF > $cfg
|
||||
<clixon-config xmlns="http://clicon.org/config">
|
||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||
<CLICON_YANG_DIR>/usr/local/share/clixon</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_DIR>$IETFRFC</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_MODULE_MAIN>clixon-example</CLICON_YANG_MODULE_MAIN>
|
||||
<CLICON_YANG_MAIN_FILE>$fyang</CLICON_YANG_MAIN_FILE>
|
||||
<CLICON_CLISPEC_DIR>$dir</CLICON_CLISPEC_DIR>
|
||||
<CLICON_CLI_DIR>/usr/local/lib/$APPNAME/cli</CLICON_CLI_DIR>
|
||||
<CLICON_CLI_MODE>$APPNAME</CLICON_CLI_MODE>
|
||||
|
|
@ -31,6 +30,26 @@ cat <<EOF > $cfg
|
|||
</clixon-config>
|
||||
EOF
|
||||
|
||||
cat <<EOF > $fyang
|
||||
module clixon-example{
|
||||
yang-version 1.1;
|
||||
namespace "urn:example:clixon";
|
||||
prefix ex;
|
||||
/* Generic config data */
|
||||
container table{
|
||||
list parameter{
|
||||
key name;
|
||||
leaf name{
|
||||
type string;
|
||||
}
|
||||
leaf value{
|
||||
type string;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
# The diff here is the "translate" command that adds entry table/parameter=translate
|
||||
cat<<EOF > $dir/example_cli.cli
|
||||
# Clixon example specification
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue