summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data_plane/vpp_lite_topo')
-rw-r--r--tests/data_plane/vpp_lite_topo/odl_utils.sh1
-rw-r--r--tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py3
-rw-r--r--tests/data_plane/vpp_lite_topo/test_driver/basic.sh46
-rwxr-xr-xtests/data_plane/vpp_lite_topo/tests/manual_test_rloc_probe_4o4.sh18
-rwxr-xr-xtests/data_plane/vpp_lite_topo/tests/test_map_register_4o4.sh10
5 files changed, 78 insertions, 0 deletions
diff --git a/tests/data_plane/vpp_lite_topo/odl_utils.sh b/tests/data_plane/vpp_lite_topo/odl_utils.sh
index 44064c0..f6f9957 100644
--- a/tests/data_plane/vpp_lite_topo/odl_utils.sh
+++ b/tests/data_plane/vpp_lite_topo/odl_utils.sh
@@ -13,6 +13,7 @@ function odl_clear_all {
echo "Deleting all ODL mappings.."
curl -X DELETE "http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database" \
-u ${ODL_USER}:${ODL_PASSWD}
+ # TODO how to delete operational mappings?
}
function check_odl_running {
diff --git a/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py b/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py
index 62cde11..d6bde91 100644
--- a/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py
+++ b/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py
@@ -52,12 +52,15 @@ class RepeatableLocators(SimpleMapping):
SimpleMapping('lisp_state', 'lisp', 'lisp_enable_disable')
SimpleMapping('lisp_map_resolver', 'lisp map-resolver', 'lisp_add_del_map_resolver')
+SimpleMapping('lisp_map_server', 'lisp map-server', 'lisp_add_del_map_server')
SimpleMapping('lisp_local_eid', 'lisp eid-table', 'lisp_add_del_local_eid')
SimpleMapping('lisp_remote_mapping', 'lisp remote-mapping', 'lisp_add_del_remote_mapping')
SimpleMapping('lisp_pitr', 'lisp pitr ls', 'lisp_pitr_set_locator_set locator-set')
SimpleMapping('lisp_adjacency', 'lisp adjacency', 'lisp_add_del_adjacency')
SimpleMapping('lisp_map_request_mode', 'lisp map-request mode', 'lisp_map_request_mode')
SimpleMapping('set_if_ip', 'set int ip address', 'sw_interface_add_del_address')
+SimpleMapping('lisp_rloc_probe_state', 'lisp rloc-probe', 'lisp_rloc_probe_enable_disable')
+SimpleMapping('lisp_map_register_state', 'lisp map-register', 'lisp_map_register_enable_disable')
CustomMapping('lisp_eid_map_bd',
'lisp eid-table map vni {0} bd {1}',
diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic.sh
index 88753bf..309ff64 100644
--- a/tests/data_plane/vpp_lite_topo/test_driver/basic.sh
+++ b/tests/data_plane/vpp_lite_topo/test_driver/basic.sh
@@ -46,3 +46,49 @@ function test_basic
print_status $rc "No ICMP response!"
exit $test_result
}
+
+function test_basic_map_register
+{
+ 2_node_topo_setup no_odl
+ post_curl "add-key" ${ODL_CONFIG_FILE1}
+ post_curl "add-key" ${ODL_CONFIG_FILE2}
+
+ maybe_pause
+
+ test_result=1
+
+ wait_for_map_register=10
+ echo "Waiting for map registration $wait_for_map_register seconds .."
+ sleep $wait_for_map_register
+
+ ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
+ rc=$?
+
+ maybe_pause
+
+ # test done
+ 2_node_topo_clean
+ print_status $rc "No ICMP response!"
+ exit $test_result
+}
+
+function test_rloc_probe
+{
+ 2_node_topo_setup
+
+ maybe_pause
+ test_result=1
+
+ ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
+ rc=$?
+ assert_rc_ok $rc 2_node_topo_clean "No ICMP response!"
+
+ read -p "Please check RLOC probe messages manually .." -n1
+
+ # test done
+
+ maybe_pause
+ 2_node_topo_clean
+ print_status $rc "No ICMP response!"
+ exit $test_result
+}
diff --git a/tests/data_plane/vpp_lite_topo/tests/manual_test_rloc_probe_4o4.sh b/tests/data_plane/vpp_lite_topo/tests/manual_test_rloc_probe_4o4.sh
new file mode 100755
index 0000000..e7f2f2c
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/tests/manual_test_rloc_probe_4o4.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+# Manual test for LISP RLOC probe
+#
+# Test procedure:
+# 1) run the test
+# 2) the test stops its execution after few seconds.
+# At that moment there should be a LISP tunnel configured
+# 3) Attach wireshark to intervpp1 or intervpp2 interface and check if there
+# are map-requests and map-replies coming forth and back with RLOC probe
+# bit set in the LISP header.
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o4_rloc_probe
+ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4
+
+source test_driver/basic.sh
+
+test_rloc_probe ping "6.0.2.2"
diff --git a/tests/data_plane/vpp_lite_topo/tests/test_map_register_4o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_map_register_4o4.sh
new file mode 100755
index 0000000..4bc471b
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/tests/test_map_register_4o4.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+# Test LISP map register feature (ip4 over ip4)
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o4_map_register
+ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4_map_register
+
+source test_driver/basic.sh
+
+test_basic_map_register ping "6.0.2.2"