From 12defda1182a88e98a20d63c32fe897359663ad7 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Wed, 6 Jul 2016 13:38:18 +0200 Subject: Refactor basic LISP tests Change-Id: Ibc11d4d82006ea11580d3b3e269f81709eedb53a Signed-off-by: Filip Tehlar --- tests/data_plane/configs/odl/add_ipv4_odl1.txt | 29 ---- tests/data_plane/configs/odl/add_ipv4_odl2.txt | 29 ---- tests/data_plane/configs/odl/add_ipv4o6_odl1.txt | 29 ---- tests/data_plane/configs/odl/add_ipv4o6_odl2.txt | 29 ---- tests/data_plane/configs/odl/add_ipv6_odl1.txt | 29 ---- tests/data_plane/configs/odl/add_ipv6_odl2.txt | 29 ---- tests/data_plane/configs/odl/add_ipv6o4_odl1.txt | 29 ---- tests/data_plane/configs/odl/add_ipv6o4_odl2.txt | 29 ---- .../configs/odl/basic/4o4/update_vpp2.json | 29 ++++ tests/data_plane/configs/odl/basic/4o4/vpp1.json | 29 ++++ tests/data_plane/configs/odl/basic/4o4/vpp2.json | 29 ++++ .../configs/odl/basic/4o6/update_vpp2.json | 29 ++++ tests/data_plane/configs/odl/basic/4o6/vpp1.json | 29 ++++ tests/data_plane/configs/odl/basic/4o6/vpp2.json | 29 ++++ .../configs/odl/basic/6o4/update_vpp2.json | 29 ++++ tests/data_plane/configs/odl/basic/6o4/vpp1.json | 29 ++++ tests/data_plane/configs/odl/basic/6o4/vpp2.json | 29 ++++ .../configs/odl/basic/6o6/update_vpp2.json | 29 ++++ tests/data_plane/configs/odl/basic/6o6/vpp1.json | 29 ++++ tests/data_plane/configs/odl/basic/6o6/vpp2.json | 29 ++++ tests/data_plane/configs/odl/replace_ipv4_odl2.txt | 29 ---- .../data_plane/configs/odl/replace_ipv4o6_odl2.txt | 29 ---- tests/data_plane/configs/odl/replace_ipv6_odl2.txt | 29 ---- .../data_plane/configs/odl/replace_ipv6o4_odl2.txt | 29 ---- .../configs/vpp_lite_config/basic/4o4/vpp1.config | 13 ++ .../configs/vpp_lite_config/basic/4o4/vpp2.config | 13 ++ .../vpp_lite_config/basic/4o4_and_6o6/vpp1.config | 17 ++ .../vpp_lite_config/basic/4o4_and_6o6/vpp2.config | 17 ++ .../vpp_lite_config/basic/4o4_no_odl/vpp1.config | 13 ++ .../vpp_lite_config/basic/4o4_no_odl/vpp2.config | 13 ++ .../configs/vpp_lite_config/basic/4o6/vpp1.config | 13 ++ .../configs/vpp_lite_config/basic/4o6/vpp2.config | 13 ++ .../configs/vpp_lite_config/basic/6o4/vpp1.config | 13 ++ .../configs/vpp_lite_config/basic/6o4/vpp2.config | 13 ++ .../configs/vpp_lite_config/basic/6o6/vpp1.config | 13 ++ .../configs/vpp_lite_config/basic/6o6/vpp2.config | 13 ++ .../vpp_lite_config/basic/6o6_no_odl/vpp1.config | 13 ++ .../vpp_lite_config/basic/6o6_no_odl/vpp2.config | 13 ++ tests/data_plane/configs/vpp_lite_config/vpp1.conf | 13 -- .../configs/vpp_lite_config/vpp1_4o6.conf | 13 -- .../data_plane/configs/vpp_lite_config/vpp1_6.conf | 13 -- .../configs/vpp_lite_config/vpp1_6_remote.conf | 13 -- .../configs/vpp_lite_config/vpp1_6o4.conf | 13 -- .../configs/vpp_lite_config/vpp1_ip4_6.conf | 17 -- .../configs/vpp_lite_config/vpp1_remote.conf | 13 -- tests/data_plane/configs/vpp_lite_config/vpp2.conf | 13 -- .../configs/vpp_lite_config/vpp2_4o6.conf | 13 -- .../data_plane/configs/vpp_lite_config/vpp2_6.conf | 13 -- .../configs/vpp_lite_config/vpp2_6_remote.conf | 13 -- .../configs/vpp_lite_config/vpp2_6o4.conf | 13 -- .../configs/vpp_lite_config/vpp2_ip4_6.conf | 17 -- .../configs/vpp_lite_config/vpp2_remote.conf | 13 -- tests/data_plane/vpp_lite_topo/README | 21 --- tests/data_plane/vpp_lite_topo/config.sh | 5 + .../vpp_lite_topo/lisp_6_remote_mapping.sh | 45 ------ tests/data_plane/vpp_lite_topo/lisp_ip4.sh | 41 ----- tests/data_plane/vpp_lite_topo/lisp_ip4o6.sh | 41 ----- tests/data_plane/vpp_lite_topo/lisp_ip6.sh | 41 ----- tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh | 41 ----- .../vpp_lite_topo/lisp_remote_mapping.sh | 45 ------ tests/data_plane/vpp_lite_topo/lisp_test.sh | 176 --------------------- tests/data_plane/vpp_lite_topo/test_basic_4o4.sh | 10 ++ .../vpp_lite_topo/test_basic_4o4_and_6o6.sh | 11 ++ .../vpp_lite_topo/test_basic_4o4_no_odl.sh | 9 ++ tests/data_plane/vpp_lite_topo/test_basic_4o6.sh | 11 ++ tests/data_plane/vpp_lite_topo/test_basic_6o4.sh | 10 ++ tests/data_plane/vpp_lite_topo/test_basic_6o6.sh | 10 ++ .../vpp_lite_topo/test_basic_6o6_no_odl.sh | 10 ++ .../data_plane/vpp_lite_topo/test_driver/basic.sh | 56 +++++++ .../test_driver/basic_multi_traffic.sh | 77 +++++++++ .../vpp_lite_topo/test_driver/basic_no_odl.sh | 52 ++++++ .../vpp_lite_topo/topologies/basic_topo.sh | 103 ++++++++++++ 72 files changed, 902 insertions(+), 989 deletions(-) delete mode 100644 tests/data_plane/configs/odl/add_ipv4_odl1.txt delete mode 100644 tests/data_plane/configs/odl/add_ipv4_odl2.txt delete mode 100644 tests/data_plane/configs/odl/add_ipv4o6_odl1.txt delete mode 100644 tests/data_plane/configs/odl/add_ipv4o6_odl2.txt delete mode 100644 tests/data_plane/configs/odl/add_ipv6_odl1.txt delete mode 100644 tests/data_plane/configs/odl/add_ipv6_odl2.txt delete mode 100644 tests/data_plane/configs/odl/add_ipv6o4_odl1.txt delete mode 100644 tests/data_plane/configs/odl/add_ipv6o4_odl2.txt create mode 100644 tests/data_plane/configs/odl/basic/4o4/update_vpp2.json create mode 100644 tests/data_plane/configs/odl/basic/4o4/vpp1.json create mode 100644 tests/data_plane/configs/odl/basic/4o4/vpp2.json create mode 100644 tests/data_plane/configs/odl/basic/4o6/update_vpp2.json create mode 100644 tests/data_plane/configs/odl/basic/4o6/vpp1.json create mode 100644 tests/data_plane/configs/odl/basic/4o6/vpp2.json create mode 100644 tests/data_plane/configs/odl/basic/6o4/update_vpp2.json create mode 100644 tests/data_plane/configs/odl/basic/6o4/vpp1.json create mode 100644 tests/data_plane/configs/odl/basic/6o4/vpp2.json create mode 100644 tests/data_plane/configs/odl/basic/6o6/update_vpp2.json create mode 100644 tests/data_plane/configs/odl/basic/6o6/vpp1.json create mode 100644 tests/data_plane/configs/odl/basic/6o6/vpp2.json delete mode 100644 tests/data_plane/configs/odl/replace_ipv4_odl2.txt delete mode 100644 tests/data_plane/configs/odl/replace_ipv4o6_odl2.txt delete mode 100644 tests/data_plane/configs/odl/replace_ipv6_odl2.txt delete mode 100644 tests/data_plane/configs/odl/replace_ipv6o4_odl2.txt create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp2.config delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp1.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp1_4o6.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp1_6.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp1_6_remote.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp1_6o4.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp1_ip4_6.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp1_remote.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp2.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp2_4o6.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp2_6.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp2_6_remote.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp2_6o4.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp2_ip4_6.conf delete mode 100644 tests/data_plane/configs/vpp_lite_config/vpp2_remote.conf delete mode 100644 tests/data_plane/vpp_lite_topo/README delete mode 100644 tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh delete mode 100644 tests/data_plane/vpp_lite_topo/lisp_ip4.sh delete mode 100644 tests/data_plane/vpp_lite_topo/lisp_ip4o6.sh delete mode 100644 tests/data_plane/vpp_lite_topo/lisp_ip6.sh delete mode 100644 tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh delete mode 100644 tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh delete mode 100755 tests/data_plane/vpp_lite_topo/lisp_test.sh create mode 100755 tests/data_plane/vpp_lite_topo/test_basic_4o4.sh create mode 100755 tests/data_plane/vpp_lite_topo/test_basic_4o4_and_6o6.sh create mode 100755 tests/data_plane/vpp_lite_topo/test_basic_4o4_no_odl.sh create mode 100755 tests/data_plane/vpp_lite_topo/test_basic_4o6.sh create mode 100755 tests/data_plane/vpp_lite_topo/test_basic_6o4.sh create mode 100755 tests/data_plane/vpp_lite_topo/test_basic_6o6.sh create mode 100755 tests/data_plane/vpp_lite_topo/test_basic_6o6_no_odl.sh create mode 100644 tests/data_plane/vpp_lite_topo/test_driver/basic.sh create mode 100644 tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh create mode 100644 tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh create mode 100644 tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh diff --git a/tests/data_plane/configs/odl/add_ipv4_odl1.txt b/tests/data_plane/configs/odl/add_ipv4_odl1.txt deleted file mode 100644 index 7544187..0000000 --- a/tests/data_plane/configs/odl/add_ipv4_odl1.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.1.0/24" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "6.0.3.1" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/add_ipv4_odl2.txt b/tests/data_plane/configs/odl/add_ipv4_odl2.txt deleted file mode 100644 index 645432c..0000000 --- a/tests/data_plane/configs/odl/add_ipv4_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.2.0/24" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "6.0.3.2" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/add_ipv4o6_odl1.txt b/tests/data_plane/configs/odl/add_ipv4o6_odl1.txt deleted file mode 100644 index 69729df..0000000 --- a/tests/data_plane/configs/odl/add_ipv4o6_odl1.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.1.0/24" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv6-afi", - "ipv6": "6:0:3::1" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/add_ipv4o6_odl2.txt b/tests/data_plane/configs/odl/add_ipv4o6_odl2.txt deleted file mode 100644 index 3d17a33..0000000 --- a/tests/data_plane/configs/odl/add_ipv4o6_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.2.0/24" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv6-afi", - "ipv6": "6:0:3::2" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/add_ipv6_odl1.txt b/tests/data_plane/configs/odl/add_ipv6_odl1.txt deleted file mode 100644 index 3af329b..0000000 --- a/tests/data_plane/configs/odl/add_ipv6_odl1.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:1::0/64" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv6-afi", - "ipv6": "6:0:3::1" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/add_ipv6_odl2.txt b/tests/data_plane/configs/odl/add_ipv6_odl2.txt deleted file mode 100644 index fcc6ecd..0000000 --- a/tests/data_plane/configs/odl/add_ipv6_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:2::0/64" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv6-afi", - "ipv6": "6:0:3::2" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/add_ipv6o4_odl1.txt b/tests/data_plane/configs/odl/add_ipv6o4_odl1.txt deleted file mode 100644 index f4cb476..0000000 --- a/tests/data_plane/configs/odl/add_ipv6o4_odl1.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:1::0/64" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "6.0.3.1" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/add_ipv6o4_odl2.txt b/tests/data_plane/configs/odl/add_ipv6o4_odl2.txt deleted file mode 100644 index 52f2125..0000000 --- a/tests/data_plane/configs/odl/add_ipv6o4_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:2::0/64" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "6.0.3.2" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/basic/4o4/update_vpp2.json b/tests/data_plane/configs/odl/basic/4o4/update_vpp2.json new file mode 100644 index 0000000..089516b --- /dev/null +++ b/tests/data_plane/configs/odl/basic/4o4/update_vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "6.0.2.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.20" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/4o4/vpp1.json b/tests/data_plane/configs/odl/basic/4o4/vpp1.json new file mode 100644 index 0000000..7544187 --- /dev/null +++ b/tests/data_plane/configs/odl/basic/4o4/vpp1.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "6.0.1.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.1" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/4o4/vpp2.json b/tests/data_plane/configs/odl/basic/4o4/vpp2.json new file mode 100644 index 0000000..645432c --- /dev/null +++ b/tests/data_plane/configs/odl/basic/4o4/vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "6.0.2.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/4o6/update_vpp2.json b/tests/data_plane/configs/odl/basic/4o6/update_vpp2.json new file mode 100644 index 0000000..9b6ba62 --- /dev/null +++ b/tests/data_plane/configs/odl/basic/4o6/update_vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "6.0.2.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv6-afi", + "ipv6": "6:0:3::20" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/4o6/vpp1.json b/tests/data_plane/configs/odl/basic/4o6/vpp1.json new file mode 100644 index 0000000..69729df --- /dev/null +++ b/tests/data_plane/configs/odl/basic/4o6/vpp1.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "6.0.1.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv6-afi", + "ipv6": "6:0:3::1" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/4o6/vpp2.json b/tests/data_plane/configs/odl/basic/4o6/vpp2.json new file mode 100644 index 0000000..3d17a33 --- /dev/null +++ b/tests/data_plane/configs/odl/basic/4o6/vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "6.0.2.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv6-afi", + "ipv6": "6:0:3::2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/6o4/update_vpp2.json b/tests/data_plane/configs/odl/basic/6o4/update_vpp2.json new file mode 100644 index 0000000..e8a8cfd --- /dev/null +++ b/tests/data_plane/configs/odl/basic/6o4/update_vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "6:0:2::0/64" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.20" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/6o4/vpp1.json b/tests/data_plane/configs/odl/basic/6o4/vpp1.json new file mode 100644 index 0000000..f4cb476 --- /dev/null +++ b/tests/data_plane/configs/odl/basic/6o4/vpp1.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "6:0:1::0/64" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.1" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/6o4/vpp2.json b/tests/data_plane/configs/odl/basic/6o4/vpp2.json new file mode 100644 index 0000000..52f2125 --- /dev/null +++ b/tests/data_plane/configs/odl/basic/6o4/vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "6:0:2::0/64" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/6o6/update_vpp2.json b/tests/data_plane/configs/odl/basic/6o6/update_vpp2.json new file mode 100644 index 0000000..6cd17a8 --- /dev/null +++ b/tests/data_plane/configs/odl/basic/6o6/update_vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "6:0:2::0/64" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv6-afi", + "ipv6": "6:0:3::20" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/6o6/vpp1.json b/tests/data_plane/configs/odl/basic/6o6/vpp1.json new file mode 100644 index 0000000..3af329b --- /dev/null +++ b/tests/data_plane/configs/odl/basic/6o6/vpp1.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "6:0:1::0/64" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv6-afi", + "ipv6": "6:0:3::1" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/basic/6o6/vpp2.json b/tests/data_plane/configs/odl/basic/6o6/vpp2.json new file mode 100644 index 0000000..fcc6ecd --- /dev/null +++ b/tests/data_plane/configs/odl/basic/6o6/vpp2.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "6:0:2::0/64" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": true, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv6-afi", + "ipv6": "6:0:3::2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/replace_ipv4_odl2.txt b/tests/data_plane/configs/odl/replace_ipv4_odl2.txt deleted file mode 100644 index 089516b..0000000 --- a/tests/data_plane/configs/odl/replace_ipv4_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.2.0/24" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "6.0.3.20" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/replace_ipv4o6_odl2.txt b/tests/data_plane/configs/odl/replace_ipv4o6_odl2.txt deleted file mode 100644 index 9b6ba62..0000000 --- a/tests/data_plane/configs/odl/replace_ipv4o6_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.2.0/24" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv6-afi", - "ipv6": "6:0:3::20" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/replace_ipv6_odl2.txt b/tests/data_plane/configs/odl/replace_ipv6_odl2.txt deleted file mode 100644 index 6cd17a8..0000000 --- a/tests/data_plane/configs/odl/replace_ipv6_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:2::0/64" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv6-afi", - "ipv6": "6:0:3::20" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/odl/replace_ipv6o4_odl2.txt b/tests/data_plane/configs/odl/replace_ipv6o4_odl2.txt deleted file mode 100644 index e8a8cfd..0000000 --- a/tests/data_plane/configs/odl/replace_ipv6o4_odl2.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "input": { - "mapping-record": { - "recordTtl": 1440, - "action": "NoAction", - "authoritative": true, - "eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:2::0/64" - }, - "LocatorRecord": [ - { - "locator-id": "ISP1", - "priority": 1, - "weight": 1, - "multicastPriority": 255, - "multicastWeight": 0, - "localLocator": true, - "rlocProbed": false, - "routed": true, - "rloc": { - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "6.0.3.20" - } - } - ] - } - } -} diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp1.config new file mode 100644 index 0000000..5648c20 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp1.config @@ -0,0 +1,13 @@ +create host-interface name vpp1 +set int state host-vpp1 up +set int ip address host-vpp1 6.0.1.1/24 + +create host-interface name intervpp1 +set int state host-intervpp1 up +set int ip address host-intervpp1 6.0.3.1/24 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 +lisp eid-table add eid 6.0.1.0/24 locator-set ls1 +lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp2.config new file mode 100644 index 0000000..1bac043 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o4/vpp2.config @@ -0,0 +1,13 @@ +create host-interface name vpp2 +set int state host-vpp2 up +set int ip address host-vpp2 6.0.2.1/24 + +create host-interface name intervpp2 +set int state host-intervpp2 up +set int ip address host-intervpp2 6.0.3.2/24 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 +lisp eid-table add eid 6.0.2.0/24 locator-set ls1 +lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp1.config b/tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp1.config new file mode 100644 index 0000000..9cef140 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp1.config @@ -0,0 +1,17 @@ +create host-interface name vpp1 +set int state host-vpp1 up +set int ip address host-vpp1 6.0.1.1/24 +set int ip address host-vpp1 6:0:1::1/64 + +create host-interface name intervpp1 +set int state host-intervpp1 up +set int ip address host-intervpp1 6.0.3.1/24 +set int ip address host-intervpp1 6:0:3::1/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 +lisp eid-table add eid 6.0.1.0/24 locator-set ls1 +lisp eid-table add eid 6:0:1::0/64 locator-set ls1 +lisp map-resolver add 6.0.3.100 +lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp2.config b/tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp2.config new file mode 100644 index 0000000..7c845f6 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o4_and_6o6/vpp2.config @@ -0,0 +1,17 @@ +create host-interface name vpp2 +set int state host-vpp2 up +set int ip address host-vpp2 6.0.2.1/24 +set int ip address host-vpp2 6:0:2::1/64 + +create host-interface name intervpp2 +set int state host-intervpp2 up +set int ip address host-intervpp2 6.0.3.2/24 +set int ip address host-intervpp2 6:0:3::2/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 +lisp eid-table add eid 6.0.2.0/24 locator-set ls1 +lisp eid-table add eid 6:0:2::0/64 locator-set ls1 +lisp map-resolver add 6.0.3.100 +lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp1.config b/tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp1.config new file mode 100644 index 0000000..f6588c9 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp1.config @@ -0,0 +1,13 @@ +create host-interface name vpp1 +set int state host-vpp1 up +set int ip address host-vpp1 6.0.1.1/24 + +create host-interface name intervpp1 +set int state host-intervpp1 up +set int ip address host-intervpp1 6.0.3.1/24 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 +lisp eid-table add eid 6.0.1.0/24 locator-set ls1 +lisp remote-mapping add vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.2 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp2.config b/tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp2.config new file mode 100644 index 0000000..5361325 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o4_no_odl/vpp2.config @@ -0,0 +1,13 @@ +create host-interface name vpp2 +set int state host-vpp2 up +set int ip address host-vpp2 6.0.2.1/24 + +create host-interface name intervpp2 +set int state host-intervpp2 up +set int ip address host-intervpp2 6.0.3.2/24 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 +lisp eid-table add eid 6.0.2.0/24 locator-set ls1 +lisp remote-mapping add vni 0 deid 6.0.1.0/24 seid 6.0.2.0/24 rloc 6.0.3.1 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp1.config b/tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp1.config new file mode 100644 index 0000000..248eca4 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp1.config @@ -0,0 +1,13 @@ +create host-interface name vpp1 +set int state host-vpp1 up +set int ip address host-vpp1 6.0.1.1/24 + +create host-interface name intervpp1 +set int state host-intervpp1 up +set int ip address host-intervpp1 6:0:3::1/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 +lisp eid-table add eid 6.0.1.0/24 locator-set ls1 +lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp2.config b/tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp2.config new file mode 100644 index 0000000..5f248ad --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/4o6/vpp2.config @@ -0,0 +1,13 @@ +create host-interface name vpp2 +set int state host-vpp2 up +set int ip address host-vpp2 6.0.2.1/24 + +create host-interface name intervpp2 +set int state host-intervpp2 up +set int ip address host-intervpp2 6:0:3::2/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 +lisp eid-table add eid 6.0.2.0/24 locator-set ls1 +lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp1.config new file mode 100644 index 0000000..d4788c2 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp1.config @@ -0,0 +1,13 @@ +create host-interface name vpp1 +set int state host-vpp1 up +set int ip address host-vpp1 6:0:1::1/64 + +create host-interface name intervpp1 +set int state host-intervpp1 up +set int ip address host-intervpp1 6.0.3.1/24 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 +lisp eid-table add eid 6:0:1::0/64 locator-set ls1 +lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp2.config new file mode 100644 index 0000000..cbfa148 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/6o4/vpp2.config @@ -0,0 +1,13 @@ +create host-interface name vpp2 +set int state host-vpp2 up +set int ip address host-vpp2 6:0:2::1/64 + +create host-interface name intervpp2 +set int state host-intervpp2 up +set int ip address host-intervpp2 6.0.3.2/24 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 +lisp eid-table add eid 6:0:2::0/64 locator-set ls1 +lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp1.config b/tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp1.config new file mode 100644 index 0000000..b064a57 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp1.config @@ -0,0 +1,13 @@ +create host-interface name vpp1 +set int state host-vpp1 up +set int ip address host-vpp1 6:0:1::1/64 + +create host-interface name intervpp1 +set int state host-intervpp1 up +set int ip address host-intervpp1 6:0:3::1/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 +lisp eid-table add eid 6:0:1::0/64 locator-set ls1 +lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp2.config b/tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp2.config new file mode 100644 index 0000000..d8ace86 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/6o6/vpp2.config @@ -0,0 +1,13 @@ +create host-interface name vpp2 +set int state host-vpp2 up +set int ip address host-vpp2 6:0:2::1/64 + +create host-interface name intervpp2 +set int state host-intervpp2 up +set int ip address host-intervpp2 6:0:3::2/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 +lisp eid-table add eid 6:0:2::0/64 locator-set ls1 +lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp1.config b/tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp1.config new file mode 100644 index 0000000..4a45cec --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp1.config @@ -0,0 +1,13 @@ +create host-interface name vpp1 +set int state host-vpp1 up +set int ip address host-vpp1 6:0:1::1/64 + +create host-interface name intervpp1 +set int state host-intervpp1 up +set int ip address host-intervpp1 6:0:3::1/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 +lisp eid-table add eid 6:0:1::0/64 locator-set ls1 +lisp remote-mapping add vni 0 deid 6:0:2::0/64 seid 6:0:1::0/64 rloc 6:0:3::2 diff --git a/tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp2.config b/tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp2.config new file mode 100644 index 0000000..ec4bb6d --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/basic/6o6_no_odl/vpp2.config @@ -0,0 +1,13 @@ +create host-interface name vpp2 +set int state host-vpp2 up +set int ip address host-vpp2 6:0:2::1/64 + +create host-interface name intervpp2 +set int state host-intervpp2 up +set int ip address host-intervpp2 6:0:3::2/64 + +lisp enable + +lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 +lisp eid-table add eid 6:0:2::0/64 locator-set ls1 +lisp remote-mapping add vni 0 deid 6:0:1::0/64 seid 6:0:2::0/64 rloc 6:0:3::1 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp1.conf b/tests/data_plane/configs/vpp_lite_config/vpp1.conf deleted file mode 100644 index 5648c20..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp1.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp1 -set int state host-vpp1 up -set int ip address host-vpp1 6.0.1.1/24 - -create host-interface name intervpp1 -set int state host-intervpp1 up -set int ip address host-intervpp1 6.0.3.1/24 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 -lisp eid-table add eid 6.0.1.0/24 locator-set ls1 -lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp1_4o6.conf b/tests/data_plane/configs/vpp_lite_config/vpp1_4o6.conf deleted file mode 100644 index 248eca4..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp1_4o6.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp1 -set int state host-vpp1 up -set int ip address host-vpp1 6.0.1.1/24 - -create host-interface name intervpp1 -set int state host-intervpp1 up -set int ip address host-intervpp1 6:0:3::1/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 -lisp eid-table add eid 6.0.1.0/24 locator-set ls1 -lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp1_6.conf b/tests/data_plane/configs/vpp_lite_config/vpp1_6.conf deleted file mode 100644 index b064a57..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp1_6.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp1 -set int state host-vpp1 up -set int ip address host-vpp1 6:0:1::1/64 - -create host-interface name intervpp1 -set int state host-intervpp1 up -set int ip address host-intervpp1 6:0:3::1/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 -lisp eid-table add eid 6:0:1::0/64 locator-set ls1 -lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp1_6_remote.conf b/tests/data_plane/configs/vpp_lite_config/vpp1_6_remote.conf deleted file mode 100644 index 4a45cec..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp1_6_remote.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp1 -set int state host-vpp1 up -set int ip address host-vpp1 6:0:1::1/64 - -create host-interface name intervpp1 -set int state host-intervpp1 up -set int ip address host-intervpp1 6:0:3::1/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 -lisp eid-table add eid 6:0:1::0/64 locator-set ls1 -lisp remote-mapping add vni 0 deid 6:0:2::0/64 seid 6:0:1::0/64 rloc 6:0:3::2 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp1_6o4.conf b/tests/data_plane/configs/vpp_lite_config/vpp1_6o4.conf deleted file mode 100644 index d4788c2..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp1_6o4.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp1 -set int state host-vpp1 up -set int ip address host-vpp1 6:0:1::1/64 - -create host-interface name intervpp1 -set int state host-intervpp1 up -set int ip address host-intervpp1 6.0.3.1/24 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 -lisp eid-table add eid 6:0:1::0/64 locator-set ls1 -lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp1_ip4_6.conf b/tests/data_plane/configs/vpp_lite_config/vpp1_ip4_6.conf deleted file mode 100644 index 9cef140..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp1_ip4_6.conf +++ /dev/null @@ -1,17 +0,0 @@ -create host-interface name vpp1 -set int state host-vpp1 up -set int ip address host-vpp1 6.0.1.1/24 -set int ip address host-vpp1 6:0:1::1/64 - -create host-interface name intervpp1 -set int state host-intervpp1 up -set int ip address host-intervpp1 6.0.3.1/24 -set int ip address host-intervpp1 6:0:3::1/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 -lisp eid-table add eid 6.0.1.0/24 locator-set ls1 -lisp eid-table add eid 6:0:1::0/64 locator-set ls1 -lisp map-resolver add 6.0.3.100 -lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp1_remote.conf b/tests/data_plane/configs/vpp_lite_config/vpp1_remote.conf deleted file mode 100644 index f6588c9..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp1_remote.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp1 -set int state host-vpp1 up -set int ip address host-vpp1 6.0.1.1/24 - -create host-interface name intervpp1 -set int state host-intervpp1 up -set int ip address host-intervpp1 6.0.3.1/24 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp1 p 1 w 1 -lisp eid-table add eid 6.0.1.0/24 locator-set ls1 -lisp remote-mapping add vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.2 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp2.conf b/tests/data_plane/configs/vpp_lite_config/vpp2.conf deleted file mode 100644 index 1bac043..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp2.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp2 -set int state host-vpp2 up -set int ip address host-vpp2 6.0.2.1/24 - -create host-interface name intervpp2 -set int state host-intervpp2 up -set int ip address host-intervpp2 6.0.3.2/24 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 -lisp eid-table add eid 6.0.2.0/24 locator-set ls1 -lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp2_4o6.conf b/tests/data_plane/configs/vpp_lite_config/vpp2_4o6.conf deleted file mode 100644 index 5f248ad..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp2_4o6.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp2 -set int state host-vpp2 up -set int ip address host-vpp2 6.0.2.1/24 - -create host-interface name intervpp2 -set int state host-intervpp2 up -set int ip address host-intervpp2 6:0:3::2/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 -lisp eid-table add eid 6.0.2.0/24 locator-set ls1 -lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp2_6.conf b/tests/data_plane/configs/vpp_lite_config/vpp2_6.conf deleted file mode 100644 index d8ace86..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp2_6.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp2 -set int state host-vpp2 up -set int ip address host-vpp2 6:0:2::1/64 - -create host-interface name intervpp2 -set int state host-intervpp2 up -set int ip address host-intervpp2 6:0:3::2/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 -lisp eid-table add eid 6:0:2::0/64 locator-set ls1 -lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp2_6_remote.conf b/tests/data_plane/configs/vpp_lite_config/vpp2_6_remote.conf deleted file mode 100644 index ec4bb6d..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp2_6_remote.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp2 -set int state host-vpp2 up -set int ip address host-vpp2 6:0:2::1/64 - -create host-interface name intervpp2 -set int state host-intervpp2 up -set int ip address host-intervpp2 6:0:3::2/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 -lisp eid-table add eid 6:0:2::0/64 locator-set ls1 -lisp remote-mapping add vni 0 deid 6:0:1::0/64 seid 6:0:2::0/64 rloc 6:0:3::1 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp2_6o4.conf b/tests/data_plane/configs/vpp_lite_config/vpp2_6o4.conf deleted file mode 100644 index cbfa148..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp2_6o4.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp2 -set int state host-vpp2 up -set int ip address host-vpp2 6:0:2::1/64 - -create host-interface name intervpp2 -set int state host-intervpp2 up -set int ip address host-intervpp2 6.0.3.2/24 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 -lisp eid-table add eid 6:0:2::0/64 locator-set ls1 -lisp map-resolver add 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp2_ip4_6.conf b/tests/data_plane/configs/vpp_lite_config/vpp2_ip4_6.conf deleted file mode 100644 index 7c845f6..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp2_ip4_6.conf +++ /dev/null @@ -1,17 +0,0 @@ -create host-interface name vpp2 -set int state host-vpp2 up -set int ip address host-vpp2 6.0.2.1/24 -set int ip address host-vpp2 6:0:2::1/64 - -create host-interface name intervpp2 -set int state host-intervpp2 up -set int ip address host-intervpp2 6.0.3.2/24 -set int ip address host-intervpp2 6:0:3::2/64 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 -lisp eid-table add eid 6.0.2.0/24 locator-set ls1 -lisp eid-table add eid 6:0:2::0/64 locator-set ls1 -lisp map-resolver add 6.0.3.100 -lisp map-resolver add 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/vpp2_remote.conf b/tests/data_plane/configs/vpp_lite_config/vpp2_remote.conf deleted file mode 100644 index 5361325..0000000 --- a/tests/data_plane/configs/vpp_lite_config/vpp2_remote.conf +++ /dev/null @@ -1,13 +0,0 @@ -create host-interface name vpp2 -set int state host-vpp2 up -set int ip address host-vpp2 6.0.2.1/24 - -create host-interface name intervpp2 -set int state host-intervpp2 up -set int ip address host-intervpp2 6.0.3.2/24 - -lisp enable - -lisp locator-set add ls1 iface host-intervpp2 p 1 w 1 -lisp eid-table add eid 6.0.2.0/24 locator-set ls1 -lisp remote-mapping add vni 0 deid 6.0.1.0/24 seid 6.0.2.0/24 rloc 6.0.3.1 diff --git a/tests/data_plane/vpp_lite_topo/README b/tests/data_plane/vpp_lite_topo/README deleted file mode 100644 index 1b526c9..0000000 --- a/tests/data_plane/vpp_lite_topo/README +++ /dev/null @@ -1,21 +0,0 @@ -# Test require program expect - - install expect - aptitude install expect - -Please before use, set variable VPP_LITE_BIN to your vpp_lite in file lisp_test.sh - -# example use -# Test ip4 topology -./lisp_test.sh or ./lisp_test ip4 - -# Test ip6 topology -./lisp_test ip6 - -# Test ip4 and ip6 topology -./lisp_test ip4_ip6 - -# Test ip4 over ip6 -./lisp_test 4o6 - -# Test ip6 over ip4 -./lisp_test 6o4 diff --git a/tests/data_plane/vpp_lite_topo/config.sh b/tests/data_plane/vpp_lite_topo/config.sh index 351df29..f7afa3c 100644 --- a/tests/data_plane/vpp_lite_topo/config.sh +++ b/tests/data_plane/vpp_lite_topo/config.sh @@ -6,6 +6,11 @@ ODL_PORT="8181" # path to vpp executable VPP_LITE_BIN=/vpp/build-root/install-vpp_lite_debug-native/vpp/bin/vpp +# read user config file if exists +if [ -f "${HOME}/.onerc" ] ; then + source "${HOME}/.onerc" +fi + if [ ! -f "${VPP_LITE_BIN}" ] ; then echo "Error: VPP binary not found. You can set VPP_LITE_BIN in config.sh" echo "Current value:" diff --git a/tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh b/tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh deleted file mode 100644 index f25e8ec..0000000 --- a/tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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 -" - -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 - -expect << EOF -spawn telnet localhost 5002 -expect -re ".*>" -send "lisp remote-mapping del vni 0 deid 6:0:2::0/64 seid 6:0:1::0/64 rloc 6:0:3::2\r" -expect -re ".*>" -send "lisp remote-mapping add vni 0 deid 6:0:2::0/64 seid 6:0:1::0/64 rloc 6:0:3::20\r" -expect -re ".*>" -EOF - -ping_lisp6 diff --git a/tests/data_plane/vpp_lite_topo/lisp_ip4.sh b/tests/data_plane/vpp_lite_topo/lisp_ip4.sh deleted file mode 100644 index a03b0cb..0000000 --- a/tests/data_plane/vpp_lite_topo/lisp_ip4.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -function ping_lisp { - sudo ip netns exec vppns1 ping -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/24 dev veth_vpp1 - ip route add 6.0.2.0/24 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/24 dev veth_vpp2 - ip route add 6.0.1.0/24 via 6.0.2.1 -" - -post_curl "add-mapping" ${ODL_ADD_CONFIG1} -post_curl "add-mapping" ${ODL_ADD_CONFIG2} - -ping_lisp - -expect << EOF -spawn telnet localhost 5003 -expect -re ".*>" -send "set int ip address del host-intervpp2 6.0.3.2/24\r" -expect -re ".*>" -send "set int ip address host-intervpp2 6.0.3.20/24\r" -expect -re ".*>" -EOF - -post_curl "update-mapping" ${ODL_REPLACE_CONFIG2} - -ping_lisp diff --git a/tests/data_plane/vpp_lite_topo/lisp_ip4o6.sh b/tests/data_plane/vpp_lite_topo/lisp_ip4o6.sh deleted file mode 100644 index edc3ffa..0000000 --- a/tests/data_plane/vpp_lite_topo/lisp_ip4o6.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -function ping_lisp { - sudo ip netns exec vppns1 ping -c 15 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/24 dev veth_vpp1 - ip route add 6.0.2.0/24 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/24 dev veth_vpp2 - ip route add 6.0.1.0/24 via 6.0.2.1 -" - -post_curl "add-mapping" ${ODL_ADD_CONFIG1_4o6} -post_curl "add-mapping" ${ODL_ADD_CONFIG2_4o6} - -ping_lisp - -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 - -post_curl "update-mapping" ${ODL_REPLACE_CONFIG2_4o6} - -ping_lisp diff --git a/tests/data_plane/vpp_lite_topo/lisp_ip6.sh b/tests/data_plane/vpp_lite_topo/lisp_ip6.sh deleted file mode 100644 index 103f113..0000000 --- a/tests/data_plane/vpp_lite_topo/lisp_ip6.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/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 -" - -post_curl "add-mapping" ${ODL_ADD_CONFIG1_6} -post_curl "add-mapping" ${ODL_ADD_CONFIG2_6} - -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 - -post_curl "update-mapping" ${ODL_REPLACE_CONFIG2_6} - -ping_lisp6 diff --git a/tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh b/tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh deleted file mode 100644 index 3da810e..0000000 --- a/tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -function ping_lisp6 { - sudo ip netns exec vppns1 ping6 -c 15 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 -" - -post_curl "add-mapping" ${ODL_ADD_CONFIG1_6o4} -post_curl "add-mapping" ${ODL_ADD_CONFIG2_6o4} - -ping_lisp6 - -expect << EOF -spawn telnet localhost 5003 -expect -re ".*>" -send "set int ip address del host-intervpp2 6.0.3.2/24\r" -expect -re ".*>" -send "set int ip address host-intervpp2 6.0.3.20/24\r" -expect -re ".*>" -EOF - -post_curl "update-mapping" ${ODL_REPLACE_CONFIG2_6o4} - -ping_lisp6 diff --git a/tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh b/tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh deleted file mode 100644 index 3ee6f07..0000000 --- a/tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -function ping_lisp { - sudo ip netns exec vppns1 ping -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/24 dev veth_vpp1 - ip route add 6.0.2.0/24 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/24 dev veth_vpp2 - ip route add 6.0.1.0/24 via 6.0.2.1 -" - -ping_lisp - -expect << EOF -spawn telnet localhost 5003 -expect -re ".*>" -send "set int ip address del host-intervpp2 6.0.3.2/24\r" -expect -re ".*>" -send "set int ip address host-intervpp2 6.0.3.20/24\r" -expect -re ".*>" -EOF - -expect << EOF -spawn telnet localhost 5002 -expect -re ".*>" -send "lisp remote-mapping del vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.2\r" -expect -re ".*>" -send "lisp remote-mapping add vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.20\r" -expect -re ".*>" -EOF - -ping_lisp diff --git a/tests/data_plane/vpp_lite_topo/lisp_test.sh b/tests/data_plane/vpp_lite_topo/lisp_test.sh deleted file mode 100755 index abacd42..0000000 --- a/tests/data_plane/vpp_lite_topo/lisp_test.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env bash - -if [ "$1" == "-h" ] || [ "$1" == "-help" ] ; then - echo "lisp_test.sh [ip4] [ip6] [ip4_ip6] [4o6] [6o4] [remote] [remote6]" - 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" - echo " remote - test static mapping, without ODL" - echo " remote6 - test static mapping for IPv6, without ODL" - exit 0 -fi - -set -x - -VPP_LITE_CONF=`pwd`"/../configs/vpp_lite_config/" -VPP1_CONF="vpp1.conf" -VPP2_CONF="vpp2.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_4o6="replace_ipv4o6_odl2.txt" -ODL_REPLACE_CONFIG2_6="replace_ipv6_odl2.txt" -ODL_REPLACE_CONFIG2_6o4="replace_ipv6o4_odl2.txt" - -source config.sh -source odl_utils.sh - -# make sure there are no vpp instances running -sudo pkill vpp - -# delete previous incarnations if they exist -sudo ip netns exec intervppns ifconfig vppbr down -sudo ip netns exec intervppns brctl delbr vppbr -sudo ip link del dev veth_vpp1 &> /dev/null -sudo ip link del dev veth_vpp2 &> /dev/null -sudo ip link del dev veth_intervpp1 &> /dev/null -sudo ip link del dev veth_intervpp2 &> /dev/null -sudo ip link del dev veth_odl &> /dev/null -sudo ip netns del vppns1 &> /dev/null -sudo ip netns del vppns2 &> /dev/null -sudo ip netns del intervppns &> /dev/null - -if [ "$1" != "remote" ] && [ "$1" != "remote6" ] ; then - odl_clear_all -fi - -if [ "$1" == "clean" ] ; then - exit 0; -fi - -sleep 1 - -# create vpp to clients and inter-vpp namespaces -sudo ip netns add vppns1 -sudo ip netns add vppns2 -sudo ip netns add intervppns - -# create vpp and odl interfaces and set them in intervppns -sudo ip link add veth_intervpp1 type veth peer name intervpp1 -sudo ip link add veth_intervpp2 type veth peer name intervpp2 -sudo ip link add veth_odl type veth peer name odl -sudo ip link set dev intervpp1 up -sudo ip link set dev intervpp2 up -sudo ip link set dev odl up -sudo ip link set dev veth_intervpp1 up netns intervppns -sudo ip link set dev veth_intervpp2 up netns intervppns -sudo ip link set dev veth_odl up netns intervppns - -# create bridge in intervppns and add vpp and odl interfaces -sudo ip netns exec intervppns brctl addbr vppbr -sudo ip netns exec intervppns brctl addif vppbr veth_intervpp1 -sudo ip netns exec intervppns brctl addif vppbr veth_intervpp2 -sudo ip netns exec intervppns brctl addif vppbr veth_odl -sudo ip netns exec intervppns ifconfig vppbr up - -# create and configure 1st veth client to vpp pair -sudo ip link add veth_vpp1 type veth peer name vpp1 -sudo ip link set dev vpp1 up -sudo ip link set dev veth_vpp1 up netns vppns1 - -# create and configure 2nd veth client to vpp pair -sudo ip link add veth_vpp2 type veth peer name vpp2 -sudo ip link set dev vpp2 up -sudo ip link set dev veth_vpp2 up netns vppns2 - -# set odl iface ip and disable checksum offloading -sudo ip addr add 6.0.3.100/24 dev odl -sudo ip addr add 6:0:3::100/64 dev odl -sudo ethtool --offload odl rx off tx off - -if [ "$1" == "ip6" ] ; then - VPP1_CONF="vpp1_6.conf" - VPP2_CONF="vpp2_6.conf" -fi - -if [ "$1" == "ip4_ip6" ] ; then - VPP1_CONF="vpp1_ip4_6.conf" - VPP2_CONF="vpp2_ip4_6.conf" -fi - -if [ "$1" == "4o6" ] ; then - VPP1_CONF="vpp1_4o6.conf" - VPP2_CONF="vpp2_4o6.conf" -fi - -if [ "$1" == "6o4" ] ; then - VPP1_CONF="vpp1_6o4.conf" - VPP2_CONF="vpp2_6o4.conf" -fi - -if [ "$1" == "remote" ] ; then - VPP1_CONF="vpp1_remote.conf" - VPP2_CONF="vpp2_remote.conf" -fi - -if [ "$1" == "remote6" ] ; then - VPP1_CONF="vpp1_6_remote.conf" - VPP2_CONF="vpp2_6_remote.conf" -fi - -# start vpp1 and vpp2 in separate chroot -sudo $VPP_LITE_BIN \ - unix { log /tmp/vpp1.log cli-listen \ - localhost:5002 full-coredump \ - exec $VPP_LITE_CONF/${VPP1_CONF} } \ - api-trace { on } api-segment {prefix xtr1} - -sudo $VPP_LITE_BIN \ - unix { log /tmp/vpp2.log cli-listen \ - localhost:5003 full-coredump \ - exec $VPP_LITE_CONF/${VPP2_CONF}} \ - api-trace { on } api-segment {prefix xtr2} - - -if [ "$#" == 0 ] || [ "$1" == "ip4" ] ; then - source lisp_ip4.sh -fi - -if [ "$1" == "ip6" ] ; then - source lisp_ip6.sh -fi - -if [ "$1" == "ip4_ip6" ] ; then - source lisp_ip4.sh - source lisp_ip6.sh - - ping_lisp - ping_lisp6 -fi - -if [ "$1" == "4o6" ] ; then - source lisp_ip4o6.sh -fi - -if [ "$1" == "6o4" ] ; then - source lisp_ip6o4.sh -fi - -if [ "$1" == "remote" ] ; then - source lisp_remote_mapping.sh -fi - -if [ "$1" == "remote6" ] ; then - source lisp_6_remote_mapping.sh -fi - -echo "Success" diff --git a/tests/data_plane/vpp_lite_topo/test_basic_4o4.sh b/tests/data_plane/vpp_lite_topo/test_basic_4o4.sh new file mode 100755 index 0000000..807edcc --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_basic_4o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test basic LISP functionality (ip4 over ip4) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4 + +source test_driver/basic.sh + +test_basic ping "6.0.2.2" diff --git a/tests/data_plane/vpp_lite_topo/test_basic_4o4_and_6o6.sh b/tests/data_plane/vpp_lite_topo/test_basic_4o4_and_6o6.sh new file mode 100755 index 0000000..9adeaf6 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_basic_4o4_and_6o6.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Test basic LISP functionality with two ongoing traffics - 4o4 and 6o6 + +ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/6o6 +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o4_and_6o6 + +source test_driver/basic_multi_traffic.sh + +test_basic_multi_traffic ping6 "6:0:2::2" ping "6.0.2.2" + diff --git a/tests/data_plane/vpp_lite_topo/test_basic_4o4_no_odl.sh b/tests/data_plane/vpp_lite_topo/test_basic_4o4_no_odl.sh new file mode 100755 index 0000000..0c2d2d0 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_basic_4o4_no_odl.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Test basic LISP functionality without odl (ip4 over ip4) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o4_no_odl + +source test_driver/basic_no_odl.sh + +test_basic_no_odl ping "6.0.2.2" diff --git a/tests/data_plane/vpp_lite_topo/test_basic_4o6.sh b/tests/data_plane/vpp_lite_topo/test_basic_4o6.sh new file mode 100755 index 0000000..c9bd8de --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_basic_4o6.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Test basic LISP functionality (ip4 over ip6) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o6 +ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o6 + +source test_driver/basic.sh + +test_basic ping "6.0.2.2" + diff --git a/tests/data_plane/vpp_lite_topo/test_basic_6o4.sh b/tests/data_plane/vpp_lite_topo/test_basic_6o4.sh new file mode 100755 index 0000000..757b7ce --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_basic_6o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test basic LISP functionality (ip6 over ip4) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/6o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/6o4 + +source test_driver/basic.sh + +test_basic ping6 "6:0:2::2" diff --git a/tests/data_plane/vpp_lite_topo/test_basic_6o6.sh b/tests/data_plane/vpp_lite_topo/test_basic_6o6.sh new file mode 100755 index 0000000..3ef68f4 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_basic_6o6.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test basic LISP functionality (ip6 over ip6) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/6o6 +ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/6o6 + +source test_driver/basic.sh + +test_basic ping6 "6:0:2::2" diff --git a/tests/data_plane/vpp_lite_topo/test_basic_6o6_no_odl.sh b/tests/data_plane/vpp_lite_topo/test_basic_6o6_no_odl.sh new file mode 100755 index 0000000..ce332d4 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_basic_6o6_no_odl.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test basic LISP functionality without odl (ip6 over ip6) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/6o6_no_odl + +source test_driver/basic_no_odl.sh + +test_basic_no_odl ping6 "6:0:2::2" + diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic.sh new file mode 100644 index 0000000..897c773 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_driver/basic.sh @@ -0,0 +1,56 @@ +source config.sh +source odl_utils.sh +source topologies/basic_topo.sh + +ODL_CONFIG_FILE1="vpp1.json" +ODL_CONFIG_FILE2="vpp2.json" +ODL_CONFIG_FILE3="update_vpp2.json" + +if [ "$1" == "clean" ] ; then + basic_topo_clean + exit 0 +fi + +if [[ $(id -u) != 0 ]]; then + echo "Error: run this as a root." + exit 1 +fi + +function test_basic +{ + if [ "$3" != "no_setup" ] ; then + basic_topo_setup + fi + + test_result=1 + + ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}" + rc=$? + if [ $rc -ne 0 ] ; then + echo "No response received!" + basic_topo_clean + exit $test_result + fi + + # change IP addresses of destination RLOC + echo "set int ip address del host-intervpp2 6.0.3.2/24" | nc 0 5003 + echo "set int ip address host-intervpp2 6.0.3.20/24" | nc 0 5003 + echo "set int ip address del host-intervpp2 6:0:3::2/24" | nc 0 5003 + echo "set int ip address host-intervpp2 6:0:3::20/24" | nc 0 5003 + post_curl "update-mapping" ${ODL_CONFIG_FILE3} + + ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}" + rc=$? + + # test done + + basic_topo_clean + if [ $rc -ne 0 ] ; then + echo "Test failed: No ICMP response received within specified timeout limit!" + else + echo "Test passed." + test_result=0 + fi + + exit $test_result +} diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh new file mode 100644 index 0000000..2d3deaf --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh @@ -0,0 +1,77 @@ +source config.sh +source odl_utils.sh +source topologies/basic_topo.sh + +ODL_CONFIG_FILE1="vpp1.json" +ODL_CONFIG_FILE2="vpp2.json" +ODL_CONFIG_FILE3="update_vpp2.json" + +if [ "$1" == "clean" ] ; then + basic_topo_clean + exit 0 +fi + +if [[ $(id -u) != 0 ]]; then + echo "Error: run this as a root." + exit 1 +fi + +function test_basic_multi_traffic +{ + basic_topo_setup + + # additional setup + ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4 + post_curl "add-mapping" ${ODL_CONFIG_FILE1} + post_curl "add-mapping" ${ODL_CONFIG_FILE2} + + test_result=1 + + ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}" + if [ $? -ne 0 ] ; then + echo "No response received!" + basic_topo_clean + exit $test_result + fi + + ip netns exec vppns1 "${3}" -w 15 -c 1 "${4}" + if [ $? -ne 0 ] ; then + echo "No response received!" + basic_topo_clean + exit $test_result + fi + + # change IP addresses of destination RLOC + echo "set int ip address del host-intervpp2 6.0.3.2/24" | nc 0 5003 + echo "set int ip address host-intervpp2 6.0.3.20/24" | nc 0 5003 + echo "set int ip address del host-intervpp2 6:0:3::2/24" | nc 0 5003 + echo "set int ip address host-intervpp2 6:0:3::20/24" | nc 0 5003 + + ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/6o6 + post_curl "update-mapping" ${ODL_CONFIG_FILE3} + ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4 + post_curl "update-mapping" ${ODL_CONFIG_FILE3} + + ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}" + if [ $? -ne 0 ] ; then + echo "No response received!" + basic_topo_clean + exit $test_result + fi + + ip netns exec vppns1 "${3}" -w 15 -c 1 "${4}" + rc=$? + + # test done + + basic_topo_clean + if [ $rc -ne 0 ] ; then + echo "Test failed: No ICMP response received within specified timeout limit!" + else + echo "Test passed." + test_result=0 + fi + + exit $test_result +} + diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh new file mode 100644 index 0000000..f19fce6 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh @@ -0,0 +1,52 @@ +source config.sh +source odl_utils.sh +source topologies/basic_topo.sh + +if [ "$1" == "clean" ] ; then + basic_topo_clean + exit 0 +fi + +if [[ $(id -u) != 0 ]]; then + echo "Error: run this as a root." + exit 1 +fi + +function test_basic_no_odl +{ + basic_topo_setup no_odl + + test_result=1 + + ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}" + if [ $? -ne 0 ] ; then + echo "No response received!" + basic_topo_clean no_odl + exit $test_result + fi + + # change IP addresses of destination RLOC + echo "set int ip address del host-intervpp2 6.0.3.2/24" | nc 0 5003 + echo "set int ip address host-intervpp2 6.0.3.20/24" | nc 0 5003 + echo "set int ip address del host-intervpp2 6:0:3::2/24" | nc 0 5003 + echo "set int ip address host-intervpp2 6:0:3::20/24" | nc 0 5003 + + echo "lisp remote-mapping del vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.2" | nc 0 5002 + echo "lisp remote-mapping add vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.20" | nc 0 5002 + + ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}" + rc=$? + + # test done + + basic_topo_clean no_odl + if [ $rc -ne 0 ] ; then + echo "Test failed: No ICMP response received within specified timeout limit!" + else + echo "Test passed." + test_result=0 + fi + + exit $test_result +} + diff --git a/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh b/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh new file mode 100644 index 0000000..4a57c58 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash + +function basic_topo_clean +{ + echo "Clearing all VPP instances.." + pkill vpp --signal 9 + rm /dev/shm/* + + echo "Cleaning topology.." + ip netns exec intervppns ifconfig vppbr down + ip netns exec intervppns brctl delbr vppbr + ip link del dev veth_vpp1 &> /dev/null + ip link del dev veth_vpp2 &> /dev/null + ip link del dev veth_intervpp1 &> /dev/null + ip link del dev veth_intervpp2 &> /dev/null + ip link del dev veth_odl &> /dev/null + ip netns del vppns1 &> /dev/null + ip netns del vppns2 &> /dev/null + ip netns del intervppns &> /dev/null + + if [ "$1" != "no_odl" ] ; then + odl_clear_all + fi +} + +function basic_topo_setup +{ + + # create vpp to clients and inter-vpp namespaces + ip netns add vppns1 + ip netns add vppns2 + ip netns add intervppns + + # create vpp and odl interfaces and set them in intervppns + ip link add veth_intervpp1 type veth peer name intervpp1 + ip link add veth_intervpp2 type veth peer name intervpp2 + ip link add veth_odl type veth peer name odl + ip link set dev intervpp1 up + ip link set dev intervpp2 up + ip link set dev odl up + ip link set dev veth_intervpp1 up netns intervppns + ip link set dev veth_intervpp2 up netns intervppns + ip link set dev veth_odl up netns intervppns + + # create bridge in intervppns and add vpp and odl interfaces + ip netns exec intervppns brctl addbr vppbr + ip netns exec intervppns brctl addif vppbr veth_intervpp1 + ip netns exec intervppns brctl addif vppbr veth_intervpp2 + ip netns exec intervppns brctl addif vppbr veth_odl + ip netns exec intervppns ifconfig vppbr up + + # create and configure 1st veth client to vpp pair + ip link add veth_vpp1 type veth peer name vpp1 + ip link set dev vpp1 up + ip link set dev veth_vpp1 up netns vppns1 + + # create and configure 2nd veth client to vpp pair + ip link add veth_vpp2 type veth peer name vpp2 + ip link set dev vpp2 up + ip link set dev veth_vpp2 up netns vppns2 + + ip netns exec vppns1 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.1.2/24 dev veth_vpp1 + ip route add 6.0.2.0/24 via 6.0.1.1 + ip addr add 6:0:1::2/64 dev veth_vpp1 + ip route add 6:0:2::0/64 via 6:0:1::1 + " + + ip netns exec vppns2 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.2.2/24 dev veth_vpp2 + ip route add 6.0.1.0/24 via 6.0.2.1 + ip addr add 6:0:2::2/64 dev veth_vpp2 + ip route add 6:0:1::0/64 via 6:0:2::1 + " + + # set odl iface ip and disable checksum offloading + ip addr add 6.0.3.100/24 dev odl + ip addr add 6:0:3::100/64 dev odl + ethtool --offload odl rx off tx off + + # start vpp1 and vpp2 in separate chroot + ${VPP_LITE_BIN} \ + unix { log /tmp/vpp1.log cli-listen \ + localhost:5002 full-coredump \ + exec ${VPP_LITE_CONF}/vpp1.config } \ + api-trace { on } api-segment {prefix xtr1} + + ${VPP_LITE_BIN} \ + unix { log /tmp/vpp2.log cli-listen \ + localhost:5003 full-coredump \ + exec ${VPP_LITE_CONF}/vpp2.config } \ + api-trace { on } api-segment {prefix xtr2} + + if [ "$1" != "no_odl" ] ; then + post_curl "add-mapping" ${ODL_CONFIG_FILE1} + post_curl "add-mapping" ${ODL_CONFIG_FILE2} + fi +} + -- cgit 1.2.3-korg