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/config.sh11
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh4
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh4
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh4
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh4
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh5
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh5
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh5
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh5
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh4
10 files changed, 51 insertions, 0 deletions
diff --git a/tests/data_plane/vpp_lite_topo/config.sh b/tests/data_plane/vpp_lite_topo/config.sh
index 1fa060a..e4c3283 100644
--- a/tests/data_plane/vpp_lite_topo/config.sh
+++ b/tests/data_plane/vpp_lite_topo/config.sh
@@ -5,6 +5,7 @@ ODL_PORT="8181"
# path to vpp executable
VPP_LITE_BIN=/vpp/build-root/install-vpp_lite_debug-native/vpp/bin/vpp
+VPP_API_TEST=/vpp/build-root/install-vpp_lite_debug-native/vpp-api-test/bin/vpp_api_test
# read user config file if exists
if [ -f "${HOME}/.onerc" ] ; then
@@ -18,6 +19,16 @@ if [ ! -f "${VPP_LITE_BIN}" ] ; then
exit 1
fi
+if [ ! -f "${VPP_API_TEST}" ] ; then
+ echo "Error: vpp_api_test not found. Either it's not built or environment \
+ variable VPP_API_TEST is not set. You can build vpp_api_test with:"
+ echo "$ make build-vat"
+ echo "VPP_API_TEST can be set in config.sh or in ~/.onerc."
+ echo "Current value:"
+ echo "VPP_LITE_BIN=${VPP_API_TEST}"
+ exit 1
+fi
+
function clean_all
{
echo "Clearing all VPP instances.."
diff --git a/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh b/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh
index 4a57c58..09b8e24 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh
@@ -95,6 +95,10 @@ function basic_topo_setup
exec ${VPP_LITE_CONF}/vpp2.config } \
api-trace { on } api-segment {prefix xtr2}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+
if [ "$1" != "no_odl" ] ; then
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh b/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh
index 3b6fee3..9066a74 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh
@@ -102,6 +102,10 @@ function basic_topo_setup
exec ${VPP_LITE_CONF}/vpp2.config } \
api-trace { on } api-segment {prefix xtr2}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+
if [ "$1" != "no_odl" ] ; then
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh
index 3d493f0..85f2f90 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh
@@ -116,6 +116,10 @@ function multihoming_topo_setup
exec ${VPP_LITE_CONF}/vpp2.config } \
api-trace { on } api-segment {prefix xtr2}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+
if [ "$1" != "no_odl" ] ; then
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh
index bd490c0..308f375 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh
@@ -123,6 +123,10 @@ function multihoming_topo_setup
exec ${VPP_LITE_CONF}/vpp2.config } \
api-trace { on } api-segment {prefix xtr2}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+
if [ "$1" != "no_odl" ] ; then
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh b/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh
index b6530e7..c740a17 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh
@@ -97,6 +97,11 @@ function rtr_single_iface_setup {
exec ${VPP_LITE_CONF}/rtr.config } \
api-trace { on } api-segment {prefix rtr}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+ ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat
+
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
index 9f5d856..69306bb 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
@@ -129,6 +129,11 @@ function rtr_two_iface_setup {
exec ${VPP_LITE_CONF}/rtr.config } \
api-trace { on } api-segment {prefix rtr}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+ ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat
+
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh
index ac9020d..12ab299 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh
@@ -160,6 +160,11 @@ function rtr_two_iface_two_customers_setup {
exec ${VPP_LITE_CONF}/rtr.config } \
api-trace { on } api-segment {prefix rtr}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+ ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat
+
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
post_curl "add-mapping" ${ODL_CONFIG_FILE3}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh b/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh
index 03e1c84..2b50cc9 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh
@@ -133,6 +133,11 @@ function smr_rtr_disjoint_setup {
exec ${VPP_LITE_CONF}/rtr.config } \
api-trace { on } api-segment {prefix rtr}
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+ ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat
+
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
}
diff --git a/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh b/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh
index 2f62913..2570087 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh
@@ -121,6 +121,10 @@ function two_customers_topo_setup {
exec ${VPP_LITE_CONF}/vpp2.config } \
api-trace { on } api-segment { prefix xtr2 }
+ sleep 2
+ ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat
+ ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat
+
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
post_curl "add-mapping" ${ODL_CONFIG_FILE3}