From f2cad01fc66af2bcf7569d9fbfb56316c96c074b Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sat, 16 Nov 2019 17:34:18 +0100 Subject: [PATCH] Updated openconfig and yangmodels repos lead to some changed in testscript and a minor parsing lapsus --- lib/src/clixon_yang_parse.y | 1 + test/test_openconfig.sh | 1 + test/test_yang_models.sh | 28 +++++++++++++++++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lib/src/clixon_yang_parse.y b/lib/src/clixon_yang_parse.y index 81189eb83..e363ff693 100644 --- a/lib/src/clixon_yang_parse.y +++ b/lib/src/clixon_yang_parse.y @@ -1490,6 +1490,7 @@ notification_substmt : if_feature_stmt { clicon_debug(2,"notification-substmt - | typedef_stmt { clicon_debug(2,"notification-substmt -> typedef-stmt"); } | grouping_stmt { clicon_debug(2,"notification-substmt -> grouping-stmt"); } | data_def_stmt { clicon_debug(2,"notification-substmt -> data-def-stmt"); } + | unknown_stmt { clicon_debug(2,"notification-substmt -> unknown-stmt");} | { clicon_debug(2,"notification-substmt -> "); } ; diff --git a/test/test_openconfig.sh b/test/test_openconfig.sh index b11db7873..1f1158aec 100755 --- a/test/test_openconfig.sh +++ b/test/test_openconfig.sh @@ -37,6 +37,7 @@ cat < $cfg $OCDIR/lacp $OCDIR/lldp $OCDIR/local-routing + $OCDIR/macsec $OCDIR/mpls $OCDIR/multicast $OCDIR/network-instance diff --git a/test/test_yang_models.sh b/test/test_yang_models.sh index 0da1e5fd7..0e3fec473 100755 --- a/test/test_yang_models.sh +++ b/test/test_yang_models.sh @@ -35,8 +35,10 @@ cat < $cfg $cfg $YANGMODELS/standard/ietf/RFC - $YANGMODELS/standard/ieee/draft/802.1 + $YANGMODELS/standard/ieee/draft/802.1/Qcr $YANGMODELS/standard/ieee/draft/802 + $YANGMODELS/standard/ieee/draft/802 + $YANGMODELS/standard/ieee/published/802.1 /usr/local/share/clixon /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli @@ -59,11 +61,27 @@ 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 "$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 "$version." +new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/ABcu" +expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/ABcu show version" 0 "$version." + +new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcr" +expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcr show version" 0 "$version." + +new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcw" +expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcw show version" 0 "$version." + +new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcx" +expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcx -p $YANGMODELS/standard/ieee/draft/802.1/ABcu show version" 0 "$version." + +new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/x" +expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/x show version" 0 "$version." + +# Published +new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/published/802.1" +expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/published/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 "$version." +new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/published/802.3" +expectfn "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/published/802.3 show version" 0 "$version." # Standard IETF new "yangmodel Standard IETF: $YANGMODELS/standard/ietf/RFC"