diff --git a/test/lib.sh b/test/lib.sh index 309e6fa4..503c7ee5 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 54ea39e8..98a91513 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 2ae78915..fcd7f901 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 d910cbc6..65dfaf0d 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 5e090346..00f40713 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 b30c8ab9..0d497527 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 ef3b5966..719350a8 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 7aa6edc6..4bab06a8 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 1cccbbd3..6a7c8f35 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 6adb22f1..5f7b7d22 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 58b6aff6..9253e670 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 557bd8ac..83416ade 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 6ab99b24..8c3ef23c 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 a3df3737..3e900669 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 85bd9586..514b7f8f 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 c7c604d0..d36553c0 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 a87b8934..a8ba47b0 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 f43211ec..9efd0b69 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 cc042b0d..50325d2d 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 4a870aea..b872b9b9 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 934650b0..776f660e 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 c958047a..6e047b97 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 6161c999..55fe39c6 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 f7c23e2c..bbaf2487 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 2ca02831..d1302a76 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 69324168..695c8926 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 2a784f11..e72e0a0f 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 bf5d7e2e..731f8a5f 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 0d5b53f3..fbdf69ef 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 7c229ea1..6d8df8db 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 b09a5c92..6bc554d0 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 7f377a9a..9d0d85eb 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 bfdcd221..945fe611 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 09bfb9d7..e45a34e0 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 a5dc07ff..e1f0af6a 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 e0e37637..431d4c96 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 7561cd0a..bc6faf91 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 d5d635d8..0b16719d 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 1cf7e98f..dfc701bf 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 00c62a0f..b30d33df 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 aa6d3796..d98e7e79 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 9944898d..3b2cfbee 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 6a6989a5..263ef359 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 dedc70de..2f2f29ca 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 c2aeaf8f..3fbaf6c2 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 96a6a69d..d4749b32 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 ddefc395..2e8933c2 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 3ab9fcfb..d0f11062 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 e93dbaab..4eb35388 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