diff --git a/test/lib.sh b/test/lib.sh index 309e6fa40..503c7ee53 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -219,8 +219,6 @@ if [ ! -d $dir ]; then mkdir $dir fi -dir_tmp=/var/tmp - # Default restconf configuration: http IPv4 # Can be placed in clixon-config # Note that https clause assumes there exists certs and keys in /etc/ssl,... diff --git a/test/long.sh b/test/long.sh index 54ea39e8d..98a915138 100755 --- a/test/long.sh +++ b/test/long.sh @@ -50,7 +50,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/plot_perf.sh b/test/plot_perf.sh index 2ae78915a..fcd7f901d 100755 --- a/test/plot_perf.sh +++ b/test/plot_perf.sh @@ -76,7 +76,7 @@ EOF cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon scaling /usr/local/var/example/example.sock diff --git a/test/test_augment.sh b/test/test_augment.sh index d910cbc61..65dfaf0d1 100755 --- a/test/test_augment.sh +++ b/test/test_augment.sh @@ -31,7 +31,7 @@ cat < $cfg $cfg a:test clixon-restconf:allow-auth-none - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_augment_state.sh b/test/test_augment_state.sh index 5e0903460..00f40713b 100755 --- a/test/test_augment_state.sh +++ b/test/test_augment_state.sh @@ -16,7 +16,7 @@ cat < $cfg $cfg a:test - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_augment_trans.sh b/test/test_augment_trans.sh index b30c8ab9a..0d497527d 100755 --- a/test/test_augment_trans.sh +++ b/test/test_augment_trans.sh @@ -19,7 +19,7 @@ cat < $cfg $cfg a:test - $dir_tmp + $dir /usr/local/share/clixon $fyang2 /usr/local/lib/$APPNAME/clispec diff --git a/test/test_choice.sh b/test/test_choice.sh index ef3b59663..719350a88 100755 --- a/test/test_choice.sh +++ b/test/test_choice.sh @@ -21,7 +21,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/test_cli_apipath.sh b/test/test_cli_apipath.sh index 7aa6edc6d..4bab06a82 100755 --- a/test/test_cli_apipath.sh +++ b/test/test_cli_apipath.sh @@ -24,7 +24,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $fyang $clidir /usr/local/lib/$APPNAME/cli diff --git a/test/test_cli_auto_extension.sh b/test/test_cli_auto_extension.sh index 1cccbbd3d..6a7c8f357 100755 --- a/test/test_cli_auto_extension.sh +++ b/test/test_cli_auto_extension.sh @@ -27,7 +27,7 @@ cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $dir_tmp + $dir $dir /usr/local/lib/$APPNAME/backend $clidir diff --git a/test/test_cli_auto_genmodel.sh b/test/test_cli_auto_genmodel.sh index 6adb22f1c..5f7b7d220 100755 --- a/test/test_cli_auto_genmodel.sh +++ b/test/test_cli_auto_genmodel.sh @@ -37,7 +37,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $OPENCONFIG/ $dir /usr/local/lib/$APPNAME/backend diff --git a/test/test_cli_auto_sub.sh b/test/test_cli_auto_sub.sh index 58b6aff60..9253e6709 100755 --- a/test/test_cli_auto_sub.sh +++ b/test/test_cli_auto_sub.sh @@ -26,7 +26,7 @@ cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $dir_tmp + $dir $fyang /usr/local/lib/$APPNAME/backend $clidir diff --git a/test/test_cli_leafref.sh b/test/test_cli_leafref.sh index 557bd8acf..83416ade2 100755 --- a/test/test_cli_leafref.sh +++ b/test/test_cli_leafref.sh @@ -18,7 +18,7 @@ cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $dir_tmp + $dir example-leafref /usr/local/lib/$APPNAME/backend $APPNAME diff --git a/test/test_cli_multikey.sh b/test/test_cli_multikey.sh index 6ab99b24e..8c3ef23c3 100755 --- a/test/test_cli_multikey.sh +++ b/test/test_cli_multikey.sh @@ -18,7 +18,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_identity.sh b/test/test_identity.sh index a3df37373..3e9006698 100755 --- a/test/test_identity.sh +++ b/test/test_identity.sh @@ -18,7 +18,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/test_insert.sh b/test/test_insert.sh index 85bd9586b..514b7f8f7 100755 --- a/test/test_insert.sh +++ b/test/test_insert.sh @@ -18,7 +18,7 @@ fyang=$dir/example.yang cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_leaf_default.sh b/test/test_leaf_default.sh index c7c604d03..d36553c0b 100755 --- a/test/test_leaf_default.sh +++ b/test/test_leaf_default.sh @@ -27,7 +27,7 @@ cat < $cfg $cfg ietf-netconf:startup - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/test_leafref.sh b/test/test_leafref.sh index a87b8934a..a8ba47b00 100755 --- a/test/test_leafref.sh +++ b/test/test_leafref.sh @@ -12,7 +12,7 @@ fyang=$dir/leafref.yang cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/test_leafref_augment.sh b/test/test_leafref_augment.sh index f43211ecd..9efd0b692 100755 --- a/test/test_leafref_augment.sh +++ b/test/test_leafref_augment.sh @@ -37,7 +37,7 @@ fyang2=$dir/augment.yang cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $fyang2 /usr/local/lib/$APPNAME/clispec diff --git a/test/test_leafref_state.sh b/test/test_leafref_state.sh index cc042b0df..50325d2d4 100755 --- a/test/test_leafref_state.sh +++ b/test/test_leafref_state.sh @@ -28,7 +28,7 @@ fyangno=$dir/leafrefno.yang # No require-instance cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/lib/$APPNAME/backend diff --git a/test/test_nacm_datanode.sh b/test/test_nacm_datanode.sh index 4a870aea8..b872b9b90 100755 --- a/test/test_nacm_datanode.sh +++ b/test/test_nacm_datanode.sh @@ -53,7 +53,7 @@ cat < $cfg $cfg /usr/local/share/clixon $IETFRFC - $dir_tmp + $dir $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_nacm_datanode_paths.sh b/test/test_nacm_datanode_paths.sh index 934650b0e..776f660e5 100755 --- a/test/test_nacm_datanode_paths.sh +++ b/test/test_nacm_datanode_paths.sh @@ -25,7 +25,7 @@ cat < $cfg $cfg /usr/local/share/clixon $IETFRFC - $dir_tmp + $dir $fyang ietf-netconf:startup /usr/local/lib/$APPNAME/clispec diff --git a/test/test_nacm_datanode_read.sh b/test/test_nacm_datanode_read.sh index c958047a0..6e047b979 100755 --- a/test/test_nacm_datanode_read.sh +++ b/test/test_nacm_datanode_read.sh @@ -33,7 +33,7 @@ cat < $cfg $cfg /usr/local/share/clixon $IETFRFC - $dir_tmp + $dir $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_nacm_datanode_write.sh b/test/test_nacm_datanode_write.sh index 6161c9991..55fe39c67 100755 --- a/test/test_nacm_datanode_write.sh +++ b/test/test_nacm_datanode_write.sh @@ -25,7 +25,7 @@ cat < $cfg $cfg /usr/local/share/clixon $IETFRFC - $dir_tmp + $dir $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_openconfig.sh b/test/test_openconfig.sh index f7c23e2c9..bbaf2487f 100755 --- a/test/test_openconfig.sh +++ b/test/test_openconfig.sh @@ -23,46 +23,12 @@ if [ ! -d "$OPENCONFIG" ]; then if [ "$s" = $0 ]; then exit 0; else return 0; fi fi -OCDIR=$OPENCONFIG/release/models - cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $OCDIR - $OCDIR/acl - $OCDIR/aft - $OCDIR/bfd - $OCDIR/bgp - $OCDIR/catalog - $OCDIR/firewall - $OCDIR/interfaces - $OCDIR/isis - $OCDIR/lacp - $OCDIR/lldp - $OCDIR/local-routing - $OCDIR/macsec - $OCDIR/mpls - $OCDIR/multicast - $OCDIR/network-instance - $OCDIR/openflow - $OCDIR/optical-transport - $OCDIR/ospf - $OCDIR/platform - $OCDIR/policy - $OCDIR/policy-forwarding - $OCDIR/probes - $OCDIR/qos - $OCDIR/relay-agent - $OCDIR/rib - $OCDIR/segment-routing - $OCDIR/stp - $OCDIR/system - $OCDIR/telemetry - $OCDIR/types - $OCDIR/vlan - $OCDIR/wifi + $OPENCONFIG /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME @@ -73,7 +39,7 @@ cat < $cfg EOF -files=$(find $OCDIR -name "*.yang") +files=$(find $OPENCONFIG -name "*.yang") # Count nr of modules (exclude submodule) Assume "module" or "submodule" # first word on first line let ms=0; # Nr of modules diff --git a/test/test_openconfig_interfaces.sh b/test/test_openconfig_interfaces.sh index 2ca028312..d1302a765 100755 --- a/test/test_openconfig_interfaces.sh +++ b/test/test_openconfig_interfaces.sh @@ -17,18 +17,12 @@ if [ ! -d "$OPENCONFIG" ]; then if [ "$s" = $0 ]; then exit 0; else return 0; fi fi -OCDIR=$OPENCONFIG/release/models - cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $OCDIR - $OCDIR/interfaces - $OCDIR/types - $OCDIR/vlan - $OCDIR/platform + $OPENCONFIG $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_pattern.sh b/test/test_pattern.sh index 693241682..695c89268 100755 --- a/test/test_pattern.sh +++ b/test/test_pattern.sh @@ -34,7 +34,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $fyang $regex /usr/local/lib/$APPNAME/clispec diff --git a/test/test_perf_cli.sh b/test/test_perf_cli.sh index 2a784f117..e72e0a0f5 100755 --- a/test/test_perf_cli.sh +++ b/test/test_perf_cli.sh @@ -55,7 +55,7 @@ EOF cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_perf_mem.sh b/test/test_perf_mem.sh index bf5d7e2e1..731f8a5fc 100755 --- a/test/test_perf_mem.sh +++ b/test/test_perf_mem.sh @@ -45,7 +45,7 @@ cat < $cfg $cfg ietf-netconf:startup - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_perf_netconf.sh b/test/test_perf_netconf.sh index 0d5b53f3f..fbdf69efa 100755 --- a/test/test_perf_netconf.sh +++ b/test/test_perf_netconf.sh @@ -59,7 +59,7 @@ EOF cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_perf_restconf.sh b/test/test_perf_restconf.sh index 7c229ea1e..6d8df8db9 100755 --- a/test/test_perf_restconf.sh +++ b/test/test_perf_restconf.sh @@ -63,7 +63,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_perf_startup.sh b/test/test_perf_startup.sh index b09a5c920..6bc554d06 100755 --- a/test/test_perf_startup.sh +++ b/test/test_perf_startup.sh @@ -55,7 +55,7 @@ EOF cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $fyang /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_restconf_err.sh b/test/test_restconf_err.sh index 7f377a9ab..9d0d85eba 100755 --- a/test/test_restconf_err.sh +++ b/test/test_restconf_err.sh @@ -48,7 +48,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none /usr/local/share/clixon - $dir_tmp + $dir $fyang /usr/local/var/$APPNAME/$APPNAME.sock $dir/restconf.pidfile diff --git a/test/test_submodule.sh b/test/test_submodule.sh index bfdcd221c..945fe611a 100755 --- a/test/test_submodule.sh +++ b/test/test_submodule.sh @@ -36,7 +36,7 @@ cat < $cfg clixon-restconf:allow-auth-none $cfg /usr/local/share/clixon - $dir_tmp + $dir $fmain /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_type.sh b/test/test_type.sh index 09bfb9d79..e45a34e02 100755 --- a/test/test_type.sh +++ b/test/test_type.sh @@ -217,7 +217,7 @@ function testrun(){ cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/test_type_range.sh b/test/test_type_range.sh index a5dc07fff..e1f0af6a8 100755 --- a/test/test_type_range.sh +++ b/test/test_type_range.sh @@ -171,7 +171,7 @@ EOF cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/test_union.sh b/test/test_union.sh index e0e376378..431d4c969 100755 --- a/test/test_union.sh +++ b/test/test_union.sh @@ -15,7 +15,7 @@ fyang3=$dir/example3.yang cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang diff --git a/test/test_upgrade_failsafe.sh b/test/test_upgrade_failsafe.sh index 7561cd0ad..bc6faf91c 100755 --- a/test/test_upgrade_failsafe.sh +++ b/test/test_upgrade_failsafe.sh @@ -98,7 +98,7 @@ cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $dir_tmp + $dir $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/example/backend diff --git a/test/test_upgrade_interfaces.sh b/test/test_upgrade_interfaces.sh index d5d635d86..0b16719d0 100755 --- a/test/test_upgrade_interfaces.sh +++ b/test/test_upgrade_interfaces.sh @@ -36,7 +36,7 @@ cat < $cfg ietf-netconf:startup /usr/local/share/clixon interfaces:if-mib - $dir_tmp + $dir $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/example/backend diff --git a/test/test_upgrade_repair.sh b/test/test_upgrade_repair.sh index 1cf7e98f6..dfc701bf9 100755 --- a/test/test_upgrade_repair.sh +++ b/test/test_upgrade_repair.sh @@ -59,7 +59,7 @@ cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $dir_tmp + $dir $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/example/backend diff --git a/test/test_upgrade_simple.sh b/test/test_upgrade_simple.sh index 00c62a0f1..b30d33df2 100755 --- a/test/test_upgrade_simple.sh +++ b/test/test_upgrade_simple.sh @@ -17,7 +17,7 @@ cat < $cfg /usr/local/etc/clixon.xml *:* /usr/local/share/clixon - $dir_tmp + $dir $APPNAME hello /usr/local/lib/hello/clispec diff --git a/test/test_xml_trees.sh b/test/test_xml_trees.sh index aa6d3796a..d98e7e79d 100755 --- a/test/test_xml_trees.sh +++ b/test/test_xml_trees.sh @@ -17,7 +17,7 @@ fyang=$dir/example.yang cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_xpath_functions.sh b/test/test_xpath_functions.sh index 9944898dd..3b2cfbeee 100755 --- a/test/test_xpath_functions.sh +++ b/test/test_xpath_functions.sh @@ -17,7 +17,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $IETFRFC $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang.sh b/test/test_yang.sh index 6a6989a59..263ef3591 100755 --- a/test/test_yang.sh +++ b/test/test_yang.sh @@ -15,7 +15,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $IETFRFC $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_anydata.sh b/test/test_yang_anydata.sh index dedc70de6..2f2f29ca2 100755 --- a/test/test_yang_anydata.sh +++ b/test/test_yang_anydata.sh @@ -133,7 +133,7 @@ function testrun() $cfg clixon-restconf:allow-auth-none /usr/local/share/clixon - $dir_tmp + $dir $IETFRFC $dir/yang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_bind.sh b/test/test_yang_bind.sh index c2aeaf8f3..3fbaf6c20 100755 --- a/test/test_yang_bind.sh +++ b/test/test_yang_bind.sh @@ -27,7 +27,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $IETFRFC $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_deviation.sh b/test/test_yang_deviation.sh index 96a6a69dd..d4749b329 100755 --- a/test/test_yang_deviation.sh +++ b/test/test_yang_deviation.sh @@ -19,7 +19,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $IETFRFC $dir /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_extension.sh b/test/test_yang_extension.sh index ddefc3952..2e8933c26 100755 --- a/test/test_yang_extension.sh +++ b/test/test_yang_extension.sh @@ -29,7 +29,7 @@ cat < $cfg $cfg /usr/local/share/clixon - $dir_tmp + $dir $IETFRFC $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_load.sh b/test/test_yang_load.sh index 3ab9fcfb5..d0f110627 100755 --- a/test/test_yang_load.sh +++ b/test/test_yang_load.sh @@ -60,7 +60,7 @@ new "1. Load module as file" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang1 @@ -113,7 +113,7 @@ new "2. Load old module as file" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang2 @@ -161,7 +161,7 @@ new "3. Load module with no revision" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC example @@ -204,7 +204,7 @@ new "4. Load module with old revision" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC example @@ -249,7 +249,7 @@ new "5. Load dir" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $dir @@ -294,7 +294,7 @@ new "6. Load dir override with file" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $dir @@ -339,7 +339,7 @@ new "7. Load dir override with module + revision" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $dir @@ -385,7 +385,7 @@ new "8. Load module w new revision overrided by old file" cat < $cfg $cfg - $dir_tmp + $dir /usr/local/share/clixon $IETFRFC $fyang2 diff --git a/test/test_yang_when.sh b/test/test_yang_when.sh index e93dbaabd..4eb35388d 100755 --- a/test/test_yang_when.sh +++ b/test/test_yang_when.sh @@ -27,7 +27,7 @@ cat < $cfg $cfg ietf-netconf:startup /usr/local/share/clixon - $dir_tmp + $dir $dir /usr/local/lib/$APPNAME/backend $clidir