diff options
Diffstat (limited to 'tests/data_plane/csit_topo/lisp_test.sh')
-rwxr-xr-x | tests/data_plane/csit_topo/lisp_test.sh | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/tests/data_plane/csit_topo/lisp_test.sh b/tests/data_plane/csit_topo/lisp_test.sh index 303b6fc..06ea7fb 100755 --- a/tests/data_plane/csit_topo/lisp_test.sh +++ b/tests/data_plane/csit_topo/lisp_test.sh @@ -18,6 +18,16 @@ # | | # +------+ +if [ "$1" == "-h" ] || [ "$1" == "-help" ] ; then + echo "lisp_test.sh [ip4] [ip6] [ip4_ip6] [4o6] [6o4]" + echo " ip4 - test ip4 topology" + echo " ip6 - test ip6 topology" + echo " ip4_ip6 - test ip4 and ip6 topology" + echo " 4o6 - test ip4 over ip6" + echo " 6o4 - test ip6 over ip4" + exit 0 +fi + set -x USER="csit" @@ -35,18 +45,30 @@ ODL_M_USER="user" ODL_INT="eth2" VPP_CONFIG_DIR="../configs/vpp_csit_config/" VPP_CONFIG1="vpp1.conf" +VPP_CONFIG1_4o6="vpp1_4o6.conf" VPP_CONFIG1_6="vpp1_6.conf" +VPP_CONFIG1_6o4="vpp1_6o4.conf" VPP_CONFIG2="vpp2.conf" +VPP_CONFIG2_4o6="vpp2_4o6.conf" VPP_CONFIG2_6="vpp2_6.conf" +VPP_CONFIG2_6o4="vpp2_6o4.conf" VPP_RECONF2="vpp2_reconf.conf" VPP_RECONF2_6="vpp2_reconf_6.conf" +VPP_RECONF2_4o6="vpp2_reconf_4o6.conf" +VPP_RECONF2_6o4="vpp2_reconf_6o4.conf" ODL_CONFIG_DIR="../configs/odl/" ODL_ADD_CONFIG1="add_ipv4_odl1.txt" +ODL_ADD_CONFIG1_4o6="add_ipv4o6_odl1.txt" ODL_ADD_CONFIG1_6="add_ipv6_odl1.txt" +ODL_ADD_CONFIG1_6o4="add_ipv6o4_odl1.txt" ODL_ADD_CONFIG2="add_ipv4_odl2.txt" +ODL_ADD_CONFIG2_4o6="add_ipv4o6_odl2.txt" ODL_ADD_CONFIG2_6="add_ipv6_odl2.txt" +ODL_ADD_CONFIG2_6o4="add_ipv6o4_odl2.txt" ODL_REPLACE_CONFIG2="replace_ipv4_odl2.txt" ODL_REPLACE_CONFIG2_6="replace_ipv6_odl2.txt" +ODL_REPLACE_CONFIG2_4o6="replace_ipv4o6_odl2.txt" +ODL_REPLACE_CONFIG2_6o4="replace_ipv6o4_odl2.txt" function ssh_vpp1 { ssh ${USER}@${VPP1_IP} ${@} || exit @@ -64,7 +86,14 @@ function ssh_odl { ssh ${ODL_M_USER}@${ODL_IP} ${@} || exit } -curl -X DELETE http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database/ -u ${ODL_USER}:${ODL_PASSWD} +function post_curl { + 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} +} + +curl -X DELETE http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database/ \ + -u ${ODL_USER}:${ODL_PASSWD} ssh_tg "sudo ip netns del net2 &> /dev/null || exit 0" ssh_tg "sudo ip addr flush dev ${TG_INT1} &> /dev/null || exit 0" @@ -97,7 +126,15 @@ if [ "$1" == "ip6" ] ; then source lisp_ip6.sh fi -if [ "$1" == "all" ] ; then +if [ "$1" == "4o6" ] ; then + source lisp_ip4o6.sh +fi + +if [ "$1" == "6o4" ] ; then + source lisp_ip6o4.sh +fi + +if [ "$1" == "ip4_ip6" ] ; then source lisp_ip4.sh source lisp_ip6.sh |