summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo/odl_utils.sh
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2016-05-26 15:57:49 +0200
committerFilip Tehlar <ftehlar@cisco.com>2016-05-27 09:00:22 +0200
commit4bf6318c1de924c63e22479cc38549ce3af3e420 (patch)
treebca01ef7f954c2f6ef5c33d215a89f47e5a5588d /tests/data_plane/vpp_lite_topo/odl_utils.sh
parent05767cf174f01c5ffdc317112dfabb64bd677a6c (diff)
Add LISP RTR tests
This change adds tests for IPv4overIPv4 and IPv4overIPv6 scenarios. Change-Id: I68e0e94538914cf0b03625ee1be3b92684184c78 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/odl_utils.sh')
-rw-r--r--tests/data_plane/vpp_lite_topo/odl_utils.sh16
1 files changed, 16 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
new file mode 100644
index 0000000..f3edc28
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/odl_utils.sh
@@ -0,0 +1,16 @@
+
+function post_curl {
+ echo "Sending mapping from ${2} to ODL; operation: ${1}"
+ until [ "`curl -X POST "http://${ODL_IP}:${ODL_PORT}/restconf/operations/odl-mappingservice:${1}" \
+ -H "Content-Type: application/json" --data-binary "@${ODL_CONFIG_DIR}${2}" \
+ -u ${ODL_USER}:${ODL_PASSWD} -s -o /dev/null -w "%{http_code}"`" == "200" ]
+ do
+ echo "Updating failed; trying again.."
+ done
+}
+
+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}
+}