From bf231ba795387064e7c4f1781240619429a4ef29 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Wed, 7 Sep 2016 15:47:47 +0200 Subject: Introduce an option for testing binary API This patch introduces an option for choosing a configuration method in tests. Supported methods are VAT and vpp's debug CLI. * Added new aprameter to run.sh to define method (--cfg-method [vat|cli]). Defaults to vat. * When running a test separately the method can be set as follows: $ sudo CFG_METHOD=cli ./tests/.sh Again, it defaults to 'vat' if not provided. * Increased readability in test driver scripts when checking test status * When debugging you can stop test execution by running the test with WAIT=1: $ sudo WAIT=1 tests/.sh Change-Id: If851139cff072ba2e3b3594a3345763d360f3b59 Signed-off-by: Filip Tehlar --- .../rtr_two_iface_two_customers/6o46/rtr.config | 7 ------- .../rtr_two_iface_two_customers/6o46/vpp1.config | 23 +++++++++++----------- .../rtr_two_iface_two_customers/6o46/vpp1.vat | 12 ----------- .../rtr_two_iface_two_customers/6o46/vpp2.config | 23 +++++++++++----------- .../rtr_two_iface_two_customers/6o46/vpp2.vat | 12 ----------- .../rtr_two_iface_two_customers/6o46/vpp3.config | 11 +++++++++++ .../rtr_two_iface_two_customers/6o46/vpp3.vat | 13 ------------ 7 files changed, 33 insertions(+), 68 deletions(-) delete mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/rtr.config delete mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.vat delete mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.vat create mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.config delete mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.vat (limited to 'tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46') diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/rtr.config b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/rtr.config deleted file mode 100644 index 03614b5..0000000 --- a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/rtr.config +++ /dev/null @@ -1,7 +0,0 @@ -create host-interface name rtr_vpp1 -set int state host-rtr_vpp1 up -set int ip address host-rtr_vpp1 6.0.3.2/24 - -create host-interface name rtr_vpp2 -set int state host-rtr_vpp2 up -set int ip address host-rtr_vpp2 6:0:5::2/64 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.config b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.config index 5b5452e..2b80070 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.config @@ -1,13 +1,12 @@ -create host-interface name vpp1_cus1 -set int state host-vpp1_cus1 up -set interface ip6 table host-vpp1_cus1 100 -set int ip address host-vpp1_cus1 6:0:2::1/64 +create_host_iface_vrf_v6 vpp1_cus1 6:0:2::1/64 100 +create_host_iface_vrf_v6 vpp1_cus2 6:0:2::1/64 200 +create_host_iface vpp1_rtr 6.0.3.1/24 -create host-interface name vpp1_cus2 -set int state host-vpp1_cus2 up -set interface ip6 table host-vpp1_cus2 200 -set int ip address host-vpp1_cus2 6:0:2::1/64 - -create host-interface name vpp1_rtr -set int state host-vpp1_rtr up -set int ip address host-vpp1_rtr 6.0.3.1/24 +lisp_state enable +lisp_locator_set_with_locator ls1 host-vpp1_rtr 1 1 +lisp_eid_map_vrf 100 100 +lisp_local_eid vni 100 eid 6:0:2::0/64 locator-set ls1 +lisp_locator_set_with_locator ls2 host-vpp1_rtr 1 1 +lisp_eid_map_vrf 200 200 +lisp_local_eid vni 200 eid 6:0:2::0/64 locator-set ls2 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.vat b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.vat deleted file mode 100644 index 7b477fe..0000000 --- a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp1.vat +++ /dev/null @@ -1,12 +0,0 @@ -lisp_enable_disable enable -lisp_add_del_map_resolver 6.0.3.100 - -lisp_add_del_locator_set locator-set ls1 -lisp_add_del_locator locator-set ls1 iface host-vpp1_rtr p 1 w 1 -lisp_eid_table_add_del_map vni 100 vrf 100 -lisp_add_del_local_eid vni 100 eid 6:0:2::0/64 locator-set ls1 - -lisp_add_del_locator_set locator-set ls2 -lisp_add_del_locator locator-set ls2 iface host-vpp1_rtr p 1 w 1 -lisp_eid_table_add_del_map vni 200 vrf 200 -lisp_add_del_local_eid vni 200 eid 6:0:2::0/64 locator-set ls2 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.config b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.config index 4eaa9e7..50400e2 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.config @@ -1,13 +1,12 @@ -create host-interface name vpp2_cus1 -set int state host-vpp2_cus1 up -set interface ip6 table host-vpp2_cus1 100 -set int ip address host-vpp2_cus1 6:0:4::1/64 +create_host_iface_vrf_v6 vpp2_cus1 6:0:4::1/64 100 +create_host_iface_vrf_v6 vpp2_cus2 6:0:4::1/64 200 +create_host_iface vpp2_rtr 6:0:5::1/64 -create host-interface name vpp2_cus2 -set interface ip6 table host-vpp2_cus2 200 -set int state host-vpp2_cus2 up -set int ip address host-vpp2_cus2 6:0:4::1/64 - -create host-interface name vpp2_rtr -set int state host-vpp2_rtr up -set int ip address host-vpp2_rtr 6:0:5::1/64 +lisp_state enable +lisp_locator_set_with_locator ls1 host-vpp2_rtr 1 1 +lisp_eid_map_vrf 100 100 +lisp_local_eid vni 100 eid 6:0:4::0/64 locator-set ls1 +lisp_locator_set_with_locator ls2 host-vpp2_rtr 1 1 +lisp_eid_map_vrf 200 200 +lisp_local_eid vni 200 eid 6:0:4::0/64 locator-set ls2 +lisp_map_resolver 6:0:5::100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.vat b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.vat deleted file mode 100644 index 0dbd8cf..0000000 --- a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp2.vat +++ /dev/null @@ -1,12 +0,0 @@ -lisp_enable_disable enable -lisp_add_del_map_resolver 6:0:5::100 - -lisp_add_del_locator_set locator-set ls1 -lisp_add_del_locator locator-set ls1 iface host-vpp2_rtr p 1 w 1 -lisp_eid_table_add_del_map vni 100 vrf 100 -lisp_add_del_local_eid vni 100 eid 6:0:4::0/64 locator-set ls1 - -lisp_add_del_locator_set locator-set ls2 -lisp_add_del_locator locator-set ls2 iface host-vpp2_rtr p 1 w 1 -lisp_eid_table_add_del_map vni 200 vrf 200 -lisp_add_del_local_eid vni 200 eid 6:0:4::0/64 locator-set ls2 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.config b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.config new file mode 100644 index 0000000..97f9817 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.config @@ -0,0 +1,11 @@ +create_host_iface rtr_vpp1 6.0.3.2/24 +create_host_iface rtr_vpp2 6:0:5::2/64 + +lisp_state enable +lisp_ls_multiple_locs ls1 iface host-rtr_vpp1 p 1 w 1 iface host-rtr_vpp2 p 1 w 1 +lisp_pitr ls1 +lisp_eid_map_vrf 100 100 +lisp_eid_map_vrf 200 200 +lisp_remote_mapping vni 100 eid 6:0:0::0/32 action send-map-request +lisp_remote_mapping vni 200 eid 6:0:0::0/32 action send-map-request +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.vat b/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.vat deleted file mode 100644 index 1fc326a..0000000 --- a/tests/data_plane/configs/vpp_lite_config/rtr_two_iface_two_customers/6o46/vpp3.vat +++ /dev/null @@ -1,13 +0,0 @@ -lisp_enable_disable enable - -lisp_add_del_locator_set locator-set ls1 -lisp_add_del_locator locator-set ls1 iface host-rtr_vpp1 p 1 w 1 -lisp_add_del_locator locator-set ls1 iface host-rtr_vpp2 p 1 w 1 - -lisp_pitr_set_locator_set locator-set ls1 -lisp_eid_table_add_del_map vni 100 vrf 100 -lisp_eid_table_add_del_map vni 200 vrf 200 - -lisp_add_del_remote_mapping add vni 100 deid 6:0:0::0/32 action 2 -lisp_add_del_remote_mapping add vni 200 deid 6:0:0::0/32 action 2 -lisp_add_del_map_resolver 6.0.3.100 -- cgit 1.2.3-korg