summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo/lisp_ip6.sh
diff options
context:
space:
mode:
authorAndrej Kozemcak <akozemca@cisco.com>2016-05-11 10:57:58 +0200
committerAndrej Kozemcak <akozemca@cisco.com>2016-05-11 16:45:56 +0200
commit676362e1714afe4e7bb1557828580e710670b602 (patch)
tree2a4c31822d0267eeb2d784eca5346b9f37465831 /tests/data_plane/vpp_lite_topo/lisp_ip6.sh
parentabfb56e73fed33d0b2f738ace59ae5b37cd2b60d (diff)
Create LISP test for csit_topology and for vpp_lite_topology
Change-Id: If0a886c761a41c9914c10d2ae3abf9f7711151c6 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/lisp_ip6.sh')
-rw-r--r--tests/data_plane/vpp_lite_topo/lisp_ip6.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/data_plane/vpp_lite_topo/lisp_ip6.sh b/tests/data_plane/vpp_lite_topo/lisp_ip6.sh
new file mode 100644
index 0000000..c49ecbf
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/lisp_ip6.sh
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+
+function ping_lisp6 {
+ sudo ip netns exec vppns1 ping6 -c 10 6:0:2::2
+ if [ $? -ne 0 ] ; then
+ echo "Can not ping other machine"
+ exit -1
+ fi
+}
+
+sudo ip netns exec vppns1 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6:0:1::2/64 dev veth_vpp1
+ ip route add 6:0:2::0/64 via 6:0:1::1
+"
+
+sudo ip netns exec vppns2 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6:0:2::2/64 dev veth_vpp2
+ ip route add 6:0:1::0/64 via 6:0:2::1
+"
+
+curl -X POST http://${ODL_IP}:${ODL_PORT}/restconf/operations/odl-mappingservice:add-mapping \
+ -H "Content-Type: application/json" --data-binary "@${ODL_CONFIG_DIR}${ODL_ADD_CONFIG1_6}" \
+ -u ${ODL_USER}:${ODL_PASSWD}
+curl -X POST http://${ODL_IP}:${ODL_PORT}/restconf/operations/odl-mappingservice:add-mapping \
+ -H "Content-Type: application/json" --data-binary "@${ODL_CONFIG_DIR}${ODL_ADD_CONFIG2_6}" \
+ -u ${ODL_USER}:${ODL_PASSWD}
+
+ping_lisp6
+
+expect << EOF
+spawn telnet localhost 5003
+expect -re ".*>"
+send "set int ip address del host-intervpp2 6:0:3::2/64\r"
+expect -re ".*>"
+send "set int ip address host-intervpp2 6:0:3::20/64\r"
+expect -re ".*>"
+EOF
+
+curl -X POST http://${ODL_IP}:${ODL_PORT}/restconf/operations/odl-mappingservice:update-mapping \
+ -H "Content-Type: application/json" --data-binary "@${ODL_CONFIG_DIR}${ODL_REPLACE_CONFIG2_6}" \
+ -u ${ODL_USER}:${ODL_PASSWD}
+
+ping_lisp6