From 5089c8126fe1d2c389ebc2e4b579612d6df15a69 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Fri, 16 Sep 2016 15:11:01 +0200 Subject: Add source/dest tests Change-Id: Idb3ec8dc48f16d4321701e405d8e76492cd7e9de Signed-off-by: Filip Tehlar --- .../configs/odl/rtr_single_iface/4o4/elp1.json | 2 +- .../configs/odl/rtr_single_iface/4o4/elp2.json | 2 +- .../configs/odl/rtr_single_iface/4o6/elp1.json | 2 +- .../configs/odl/rtr_single_iface/4o6/elp2.json | 2 +- .../configs/odl/rtr_single_iface/6o4/elp1.json | 2 +- .../configs/odl/rtr_single_iface/6o4/elp2.json | 2 +- .../configs/odl/rtr_single_iface/6o6/elp1.json | 2 +- .../configs/odl/rtr_single_iface/6o6/elp2.json | 2 +- tests/data_plane/configs/odl/sd/4o4/map1.json | 32 +++ tests/data_plane/configs/odl/sd/4o4/map2.json | 33 +++ tests/data_plane/configs/odl/sd/4o4/map3.json | 29 +++ tests/data_plane/configs/odl/sd/4o4/map4.json | 29 +++ tests/data_plane/configs/odl/sd/6o6/map1.json | 32 +++ tests/data_plane/configs/odl/sd/6o6/map2.json | 33 +++ tests/data_plane/configs/odl/sd/6o6/map3.json | 29 +++ tests/data_plane/configs/odl/sd/6o6/map4.json | 29 +++ tests/data_plane/configs/odl/sd/l2o4/map1.json | 33 +++ tests/data_plane/configs/odl/sd/l2o4/map2.json | 34 +++ tests/data_plane/configs/odl/sd/l2o4/map3.json | 30 +++ tests/data_plane/configs/odl/sd/l2o4/map4.json | 30 +++ .../configs/odl/sd/overwrite/4o4/map1.json | 32 +++ .../configs/odl/sd/overwrite/4o4/map2.json | 30 +++ .../configs/odl/sd/overwrite/4o4/replace1.json | 16 ++ .../configs/odl/sd/overwrite/4o4/replace2.json | 32 +++ .../configs/odl/sd/overwrite/6o4/map1.json | 32 +++ .../configs/odl/sd/overwrite/6o4/map2.json | 30 +++ .../configs/odl/sd/overwrite/6o4/replace1.json | 16 ++ .../configs/odl/sd/overwrite/6o4/replace2.json | 32 +++ .../odl/sd/overwrite_superset/4o4/map1.json | 32 +++ .../odl/sd/overwrite_superset/4o4/map2.json | 30 +++ .../odl/sd/overwrite_superset/4o4/replace1.json | 16 ++ .../odl/sd/overwrite_superset/4o4/replace2.json | 32 +++ .../odl/sd/overwrite_superset/6o4/map1.json | 32 +++ .../odl/sd/overwrite_superset/6o4/map2.json | 30 +++ .../odl/sd/overwrite_superset/6o4/replace1.json | 16 ++ .../odl/sd/overwrite_superset/6o4/replace2.json | 32 +++ .../rtr_single_iface/4o4/vpp1.config | 8 +- .../rtr_single_iface/4o4/vpp2.config | 8 +- .../rtr_single_iface/4o4/vpp3.config | 4 +- .../rtr_single_iface/4o6/vpp1.config | 8 +- .../rtr_single_iface/4o6/vpp2.config | 8 +- .../rtr_single_iface/4o6/vpp3.config | 4 +- .../rtr_single_iface/6o4/vpp1.config | 8 +- .../rtr_single_iface/6o4/vpp2.config | 8 +- .../rtr_single_iface/6o4/vpp3.config | 4 +- .../rtr_single_iface/6o6/vpp1.config | 8 +- .../rtr_single_iface/6o6/vpp2.config | 8 +- .../rtr_single_iface/6o6/vpp3.config | 4 +- .../configs/vpp_lite_config/sd/4o4/vpp1.config | 10 + .../configs/vpp_lite_config/sd/4o4/vpp2.config | 7 + .../configs/vpp_lite_config/sd/4o4/vpp3.config | 7 + .../configs/vpp_lite_config/sd/6o6/vpp1.config | 10 + .../configs/vpp_lite_config/sd/6o6/vpp2.config | 7 + .../configs/vpp_lite_config/sd/6o6/vpp3.config | 7 + .../configs/vpp_lite_config/sd/l2o4/vpp1.config | 16 ++ .../configs/vpp_lite_config/sd/l2o4/vpp2.config | 9 + .../configs/vpp_lite_config/sd/l2o4/vpp3.config | 9 + .../vpp_lite_config/sd/overwrite/4o4/vpp1.config | 8 + .../vpp_lite_config/sd/overwrite/4o4/vpp2.config | 7 + .../vpp_lite_config/sd/overwrite/6o4/vpp1.config | 8 + .../vpp_lite_config/sd/overwrite/6o4/vpp2.config | 7 + tests/data_plane/vpp_lite_topo/config.sh | 11 + tests/data_plane/vpp_lite_topo/run.sh | 2 +- .../vpp_lite_topo/scripts/cmd_mappings.py | 4 +- .../vpp_lite_topo/test_driver/rtr_single_iface.sh | 8 +- .../vpp_lite_topo/test_driver/src_dst.sh | 96 +++++++++ .../vpp_lite_topo/test_driver/src_dst_overwrite.sh | 92 ++++++++ .../tests/test_rtr_single_iface_4o4.sh | 2 +- .../tests/test_rtr_single_iface_4o6.sh | 2 +- .../tests/test_rtr_single_iface_6o4.sh | 2 +- .../tests/test_rtr_single_iface_6o6.sh | 2 +- .../vpp_lite_topo/tests/test_src_dst_4o4.sh | 10 + .../vpp_lite_topo/tests/test_src_dst_6o6.sh | 10 + .../test_src_dst_identical_ippref_overwrite_4o4.sh | 10 + .../test_src_dst_identical_ippref_overwrite_6o4.sh | 10 + .../vpp_lite_topo/tests/test_src_dst_l2o4.sh | 10 + .../test_src_dst_superset_ippref_overwrite_4o4.sh | 10 + .../test_src_dst_superset_ippref_overwrite_6o4.sh | 10 + .../vpp_lite_topo/topologies/3_node_star.sh | 240 +++++++++++++++++++++ .../vpp_lite_topo/topologies/basic_topo_l2.sh | 2 + .../vpp_lite_topo/topologies/rtr_single_iface.sh | 108 ---------- 81 files changed, 1494 insertions(+), 168 deletions(-) create mode 100644 tests/data_plane/configs/odl/sd/4o4/map1.json create mode 100644 tests/data_plane/configs/odl/sd/4o4/map2.json create mode 100644 tests/data_plane/configs/odl/sd/4o4/map3.json create mode 100644 tests/data_plane/configs/odl/sd/4o4/map4.json create mode 100644 tests/data_plane/configs/odl/sd/6o6/map1.json create mode 100644 tests/data_plane/configs/odl/sd/6o6/map2.json create mode 100644 tests/data_plane/configs/odl/sd/6o6/map3.json create mode 100644 tests/data_plane/configs/odl/sd/6o6/map4.json create mode 100644 tests/data_plane/configs/odl/sd/l2o4/map1.json create mode 100644 tests/data_plane/configs/odl/sd/l2o4/map2.json create mode 100644 tests/data_plane/configs/odl/sd/l2o4/map3.json create mode 100644 tests/data_plane/configs/odl/sd/l2o4/map4.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/4o4/map1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/4o4/map2.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/4o4/replace1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/4o4/replace2.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/6o4/map1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/6o4/map2.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/6o4/replace1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite/6o4/replace2.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map2.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/4o4/replace1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/4o4/replace2.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map2.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/6o4/replace1.json create mode 100644 tests/data_plane/configs/odl/sd/overwrite_superset/6o4/replace2.json create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp3.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp3.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp3.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp2.config create mode 100644 tests/data_plane/vpp_lite_topo/test_driver/src_dst.sh create mode 100644 tests/data_plane/vpp_lite_topo/test_driver/src_dst_overwrite.sh create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_src_dst_4o4.sh create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_src_dst_6o6.sh create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_4o4.sh create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_6o4.sh create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_src_dst_l2o4.sh create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_4o4.sh create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_6o4.sh create mode 100644 tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh delete mode 100644 tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh (limited to 'tests') diff --git a/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp1.json b/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp1.json index a6275ca..2823cfc 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp1.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp1.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.2.0/24" + "ipv4-prefix": "6.0.1.0/24" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp2.json b/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp2.json index d63f6b6..0c1a842 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp2.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/4o4/elp2.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.4.0/24" + "ipv4-prefix": "6.0.2.0/24" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp1.json b/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp1.json index 211dce4..0f920a9 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp1.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp1.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.2.0/24" + "ipv4-prefix": "6.0.1.0/24" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp2.json b/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp2.json index 94268e9..dbc408f 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp2.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/4o6/elp2.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": "6.0.4.0/24" + "ipv4-prefix": "6.0.2.0/24" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp1.json b/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp1.json index 3928aa7..e52094a 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp1.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp1.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:2::0/64" + "ipv6-prefix": "6:0:1::0/64" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp2.json b/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp2.json index 0a0b213..f525c2f 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp2.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/6o4/elp2.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:4::0/64" + "ipv6-prefix": "6:0:2::0/64" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp1.json b/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp1.json index 4c10f0e..d7c5b69 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp1.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp1.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:2::0/64" + "ipv6-prefix": "6:0:1::0/64" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp2.json b/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp2.json index dc83b42..6945c6a 100644 --- a/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp2.json +++ b/tests/data_plane/configs/odl/rtr_single_iface/6o6/elp2.json @@ -6,7 +6,7 @@ "authoritative": true, "eid": { "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": "6:0:4::0/64" + "ipv6-prefix": "6:0:2::0/64" }, "LocatorRecord": [ { diff --git a/tests/data_plane/configs/odl/sd/4o4/map1.json b/tests/data_plane/configs/odl/sd/4o4/map1.json new file mode 100644 index 0000000..b11bf47 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/4o4/map1.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.1.0/24", + "dest": "6.0.2.0/24" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/4o4/map2.json b/tests/data_plane/configs/odl/sd/4o4/map2.json new file mode 100644 index 0000000..fcdae72 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/4o4/map2.json @@ -0,0 +1,33 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.5.0/24", + "dest": "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.3" + } + } + ] + } + } +} + diff --git a/tests/data_plane/configs/odl/sd/4o4/map3.json b/tests/data_plane/configs/odl/sd/4o4/map3.json new file mode 100644 index 0000000..7544187 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/4o4/map3.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/sd/4o4/map4.json b/tests/data_plane/configs/odl/sd/4o4/map4.json new file mode 100644 index 0000000..4492f65 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/4o4/map4.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.5.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/sd/6o6/map1.json b/tests/data_plane/configs/odl/sd/6o6/map1.json new file mode 100644 index 0000000..0a29dd3 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/6o6/map1.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:1::0/64", + "dest": "6:0:2::0/64" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv6-afi", + "ipv6": "6:0:3::2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/6o6/map2.json b/tests/data_plane/configs/odl/sd/6o6/map2.json new file mode 100644 index 0000000..3794a36 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/6o6/map2.json @@ -0,0 +1,33 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:5::0/64", + "dest": "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::3" + } + } + ] + } + } +} + diff --git a/tests/data_plane/configs/odl/sd/6o6/map3.json b/tests/data_plane/configs/odl/sd/6o6/map3.json new file mode 100644 index 0000000..3af329b --- /dev/null +++ b/tests/data_plane/configs/odl/sd/6o6/map3.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/sd/6o6/map4.json b/tests/data_plane/configs/odl/sd/6o6/map4.json new file mode 100644 index 0000000..7f3bbc9 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/6o6/map4.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:5::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/sd/l2o4/map1.json b/tests/data_plane/configs/odl/sd/l2o4/map1.json new file mode 100644 index 0000000..05fc102 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/l2o4/map1.json @@ -0,0 +1,33 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "virtual-network-id": 10, + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "08:55:55:55:55:55", + "dest": "08:22:22:22:22:22" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/l2o4/map2.json b/tests/data_plane/configs/odl/sd/l2o4/map2.json new file mode 100644 index 0000000..eb3c27e --- /dev/null +++ b/tests/data_plane/configs/odl/sd/l2o4/map2.json @@ -0,0 +1,34 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "virtual-network-id": 20, + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "08:11:11:11:11:11", + "dest": "08:22:22:22:22:22" + } + }, + "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.3" + } + } + ] + } + } +} + diff --git a/tests/data_plane/configs/odl/sd/l2o4/map3.json b/tests/data_plane/configs/odl/sd/l2o4/map3.json new file mode 100644 index 0000000..3daeaa6 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/l2o4/map3.json @@ -0,0 +1,30 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "virtual-network-id": 20, + "address-type": "ietf-lisp-address-types:mac-afi", + "mac": "08:11:11:11:11:11" + }, + "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/sd/l2o4/map4.json b/tests/data_plane/configs/odl/sd/l2o4/map4.json new file mode 100644 index 0000000..2219bf6 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/l2o4/map4.json @@ -0,0 +1,30 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "virtual-network-id": 10, + "address-type": "ietf-lisp-address-types:mac-afi", + "mac": "08:55:55:55:55:55" + }, + "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/sd/overwrite/4o4/map1.json b/tests/data_plane/configs/odl/sd/overwrite/4o4/map1.json new file mode 100644 index 0000000..b11bf47 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/4o4/map1.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.1.0/24", + "dest": "6.0.2.0/24" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite/4o4/map2.json b/tests/data_plane/configs/odl/sd/overwrite/4o4/map2.json new file mode 100644 index 0000000..77e9891 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/4o4/map2.json @@ -0,0 +1,30 @@ +{ + "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/sd/overwrite/4o4/replace1.json b/tests/data_plane/configs/odl/sd/overwrite/4o4/replace1.json new file mode 100644 index 0000000..2671d11 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/4o4/replace1.json @@ -0,0 +1,16 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.1.0/24", + "dest": "6.0.2.0/24" + } + } + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite/4o4/replace2.json b/tests/data_plane/configs/odl/sd/overwrite/4o4/replace2.json new file mode 100644 index 0000000..b11bf47 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/4o4/replace2.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.1.0/24", + "dest": "6.0.2.0/24" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite/6o4/map1.json b/tests/data_plane/configs/odl/sd/overwrite/6o4/map1.json new file mode 100644 index 0000000..d89db51 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/6o4/map1.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:1::0/64", + "dest": "6:0:2::0/64" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite/6o4/map2.json b/tests/data_plane/configs/odl/sd/overwrite/6o4/map2.json new file mode 100644 index 0000000..379a183 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/6o4/map2.json @@ -0,0 +1,30 @@ +{ + "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/sd/overwrite/6o4/replace1.json b/tests/data_plane/configs/odl/sd/overwrite/6o4/replace1.json new file mode 100644 index 0000000..d039ce3 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/6o4/replace1.json @@ -0,0 +1,16 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:1::0/64", + "dest": "6:0:2::0/64" + } + } + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite/6o4/replace2.json b/tests/data_plane/configs/odl/sd/overwrite/6o4/replace2.json new file mode 100644 index 0000000..a2d92bc --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite/6o4/replace2.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:1::0/64", + "dest": "6:0:2::0/64" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map1.json b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map1.json new file mode 100644 index 0000000..b11bf47 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map1.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.1.0/24", + "dest": "6.0.2.0/24" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map2.json b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map2.json new file mode 100644 index 0000000..77e9891 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/map2.json @@ -0,0 +1,30 @@ +{ + "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/sd/overwrite_superset/4o4/replace1.json b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/replace1.json new file mode 100644 index 0000000..7b2d931 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/replace1.json @@ -0,0 +1,16 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.0.0/16", + "dest": "6.0.2.0/24" + } + } + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/replace2.json b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/replace2.json new file mode 100644 index 0000000..4662671 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/4o4/replace2.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6.0.0.0/8", + "dest": "6.0.2.0/24" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map1.json b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map1.json new file mode 100644 index 0000000..d89db51 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map1.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:1::0/64", + "dest": "6:0:2::0/64" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map2.json b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map2.json new file mode 100644 index 0000000..379a183 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/map2.json @@ -0,0 +1,30 @@ +{ + "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/sd/overwrite_superset/6o4/replace1.json b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/replace1.json new file mode 100644 index 0000000..d039ce3 --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/replace1.json @@ -0,0 +1,16 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:1::0/64", + "dest": "6:0:2::0/64" + } + } + } + } +} diff --git a/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/replace2.json b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/replace2.json new file mode 100644 index 0000000..a2d92bc --- /dev/null +++ b/tests/data_plane/configs/odl/sd/overwrite_superset/6o4/replace2.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "6:0:1::0/64", + "dest": "6:0:2::0/64" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "6.0.3.2" + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp1.config index c7c062c..cf74251 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp1.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp1.config @@ -1,7 +1,7 @@ -create_host_iface vpp1 6.0.2.1/24 -create_host_iface xtr_rtr1 6.0.3.1/24 +create_host_iface vpp1 6.0.1.1/24 +create_host_iface xtr1 6.0.3.1/24 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1 -lisp_local_eid eid 6.0.2.0/24 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_local_eid eid 6.0.1.0/24 locator-set ls1 lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp2.config index 7a086e4..8ab5453 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp2.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp2.config @@ -1,7 +1,7 @@ -create_host_iface vpp2 6.0.4.1/24 -create_host_iface xtr_rtr3 6.0.3.2/24 +create_host_iface vpp2 6.0.2.1/24 +create_host_iface xtr2 6.0.3.2/24 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1 -lisp_local_eid eid 6.0.4.0/24 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_local_eid eid 6.0.2.0/24 locator-set ls1 lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp3.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp3.config index 62f823c..cf1c628 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp3.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4/vpp3.config @@ -1,7 +1,7 @@ -create_host_iface xtr_rtr2 6.0.3.3/24 +create_host_iface xtr3 6.0.3.3/24 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1 +lisp_locator_set_with_locator ls1 host-xtr3 1 1 lisp_pitr ls1 lisp_remote_mapping eid 6.0.0.0/16 action send-map-request lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp1.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp1.config index 6d2871c..0de274e 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp1.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp1.config @@ -1,7 +1,7 @@ -create_host_iface vpp1 6.0.2.1/24 -create_host_iface xtr_rtr1 6:0:3::1/64 +create_host_iface vpp1 6.0.1.1/24 +create_host_iface xtr1 6:0:3::1/64 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1 -lisp_local_eid eid 6.0.2.0/24 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_local_eid eid 6.0.1.0/24 locator-set ls1 lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp2.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp2.config index 3705d92..1522d9e 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp2.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp2.config @@ -1,7 +1,7 @@ -create_host_iface vpp2 6.0.4.1/24 -create_host_iface xtr_rtr3 6:0:3::2/64 +create_host_iface vpp2 6.0.2.1/24 +create_host_iface xtr2 6:0:3::2/64 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1 -lisp_local_eid eid 6.0.4.0/24 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_local_eid eid 6.0.2.0/24 locator-set ls1 lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp3.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp3.config index 57401c7..07955f3 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp3.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o6/vpp3.config @@ -1,7 +1,7 @@ -create_host_iface xtr_rtr2 6:0:3::3/64 +create_host_iface xtr3 6:0:3::3/64 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1 +lisp_locator_set_with_locator ls1 host-xtr3 1 1 lisp_pitr ls1 lisp_remote_mapping eid 6.0.0.0/16 action send-map-request lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp1.config index 46a3c98..5e7f6c3 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp1.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp1.config @@ -1,7 +1,7 @@ -create_host_iface vpp1 6:0:2::1/64 -create_host_iface xtr_rtr1 6.0.3.1/24 +create_host_iface vpp1 6:0:1::1/64 +create_host_iface xtr1 6.0.3.1/24 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1 -lisp_local_eid eid 6:0:2::0/64 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_local_eid eid 6:0:1::0/64 locator-set ls1 lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp2.config index 240993a..426c4fc 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp2.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp2.config @@ -1,7 +1,7 @@ -create_host_iface vpp2 6:0:4::1/64 -create_host_iface xtr_rtr3 6.0.3.2/24 +create_host_iface vpp2 6:0:2::1/64 +create_host_iface xtr2 6.0.3.2/24 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1 -lisp_local_eid eid 6:0:4::0/64 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_local_eid eid 6:0:2::0/64 locator-set ls1 lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp3.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp3.config index 48c6ecb..e771f16 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp3.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o4/vpp3.config @@ -1,7 +1,7 @@ -create_host_iface xtr_rtr2 6.0.3.3/24 +create_host_iface xtr3 6.0.3.3/24 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1 +lisp_locator_set_with_locator ls1 host-xtr3 1 1 lisp_pitr ls1 lisp_remote_mapping 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_single_iface/6o6/vpp1.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp1.config index 450528e..6639c91 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp1.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp1.config @@ -1,7 +1,7 @@ -create_host_iface vpp1 6:0:2::1/64 -create_host_iface xtr_rtr1 6:0:3::1/64 +create_host_iface vpp1 6:0:1::1/64 +create_host_iface xtr1 6:0:3::1/64 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr1 1 1 -lisp_local_eid eid 6:0:2::0/64 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_local_eid eid 6:0:1::0/64 locator-set ls1 lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp2.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp2.config index 5aa0973..b6f9fca 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp2.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp2.config @@ -1,7 +1,7 @@ -create_host_iface vpp2 6:0:4::1/64 -create_host_iface xtr_rtr3 6:0:3::2/64 +create_host_iface vpp2 6:0:2::1/64 +create_host_iface xtr2 6:0:3::2/64 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr3 1 1 -lisp_local_eid eid 6:0:4::0/64 locator-set ls1 +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_local_eid eid 6:0:2::0/64 locator-set ls1 lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp3.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp3.config index 89cbe7e..bebd27f 100644 --- a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp3.config +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/6o6/vpp3.config @@ -1,7 +1,7 @@ -create_host_iface xtr_rtr2 6:0:3::3/64 +create_host_iface xtr3 6:0:3::3/64 lisp_state enable -lisp_locator_set_with_locator ls1 host-xtr_rtr2 1 1 +lisp_locator_set_with_locator ls1 host-xtr3 1 1 lisp_pitr ls1 lisp_remote_mapping 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/sd/4o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp1.config new file mode 100644 index 0000000..5279dfc --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp1.config @@ -0,0 +1,10 @@ +create_host_iface vpp1 6.0.1.1/24 +create_host_iface vpp3 6.0.5.1/24 +create_host_iface xtr1 6.0.3.1/24 + +lisp_state enable +lisp_map_request_mode src-dst +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_local_eid eid 6.0.1.0/24 locator-set ls1 +lisp_local_eid eid 6.0.5.0/24 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp2.config new file mode 100644 index 0000000..8ab5453 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp2.config @@ -0,0 +1,7 @@ +create_host_iface vpp2 6.0.2.1/24 +create_host_iface xtr2 6.0.3.2/24 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_local_eid eid 6.0.2.0/24 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp3.config b/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp3.config new file mode 100644 index 0000000..b9af7d5 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/4o4/vpp3.config @@ -0,0 +1,7 @@ +create_host_iface vpp4 6.0.2.1/24 +create_host_iface xtr3 6.0.3.3/24 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-xtr3 1 1 +lisp_local_eid eid 6.0.2.0/24 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp1.config b/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp1.config new file mode 100644 index 0000000..2c05e80 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp1.config @@ -0,0 +1,10 @@ +create_host_iface vpp1 6:0:1::1/64 +create_host_iface vpp3 6:0:5::1/64 +create_host_iface xtr1 6:0:3::1/64 + +lisp_state enable +lisp_map_request_mode src-dst +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_local_eid eid 6:0:1::0/64 locator-set ls1 +lisp_local_eid eid 6:0:5::0/64 locator-set ls1 +lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp2.config b/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp2.config new file mode 100644 index 0000000..b6f9fca --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp2.config @@ -0,0 +1,7 @@ +create_host_iface vpp2 6:0:2::1/64 +create_host_iface xtr2 6:0:3::2/64 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_local_eid eid 6:0:2::0/64 locator-set ls1 +lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp3.config b/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp3.config new file mode 100644 index 0000000..249d859 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/6o6/vpp3.config @@ -0,0 +1,7 @@ +create_host_iface vpp4 6:0:2::1/64 +create_host_iface xtr3 6:0:3::3/64 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-xtr3 1 1 +lisp_local_eid eid 6:0:2::0/64 locator-set ls1 +lisp_map_resolver 6:0:3::100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp1.config new file mode 100644 index 0000000..1fee115 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp1.config @@ -0,0 +1,16 @@ +create_host_iface vpp5 6.0.10.11/24 +set_if_l2_bridge host-vpp5 20 + +create_host_iface vpp8 6.0.10.15/24 +set_if_l2_bridge host-vpp8 10 + +create_host_iface xtr1 6.0.3.1/24 + +lisp_state enable +lisp_map_request_mode src-dst +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_eid_map_bd 10 10 +lisp_eid_map_bd 20 20 +lisp_local_eid vni 10 eid 08:55:55:55:55:55 locator-set ls1 +lisp_local_eid vni 20 eid 08:11:11:11:11:11 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp2.config new file mode 100644 index 0000000..71fb31e --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp2.config @@ -0,0 +1,9 @@ +create_host_iface vpp7 6.0.10.12/24 +set_if_l2_bridge host-vpp7 10 +create_host_iface xtr2 6.0.3.2/24 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_eid_map_bd 10 10 +lisp_local_eid vni 10 eid 08:22:22:22:22:22 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp3.config b/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp3.config new file mode 100644 index 0000000..c542453 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/l2o4/vpp3.config @@ -0,0 +1,9 @@ +create_host_iface vpp6 6.0.10.12/24 +set_if_l2_bridge host-vpp6 20 +create_host_iface xtr3 6.0.3.3/24 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-xtr3 1 1 +lisp_eid_map_bd 20 20 +lisp_local_eid vni 20 eid 08:22:22:22:22:22 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp1.config new file mode 100644 index 0000000..ee55b68 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp1.config @@ -0,0 +1,8 @@ +create_host_iface vpp1 6.0.1.1/24 +create_host_iface intervpp1 6.0.3.1/24 + +lisp_state enable +lisp_map_request_mode src-dst +lisp_locator_set_with_locator ls1 host-intervpp1 1 1 +lisp_local_eid eid 6.0.1.0/24 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp2.config new file mode 100644 index 0000000..c2edf63 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/4o4/vpp2.config @@ -0,0 +1,7 @@ +create_host_iface vpp2 6.0.2.1/24 +create_host_iface intervpp2 6.0.3.2/24 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-intervpp2 1 1 +lisp_local_eid eid 6.0.2.0/24 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp1.config b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp1.config new file mode 100644 index 0000000..8362486 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp1.config @@ -0,0 +1,8 @@ +create_host_iface vpp1 6:0:1::1/64 +create_host_iface intervpp1 6.0.3.1/24 + +lisp_state enable +lisp_map_request_mode src-dst +lisp_locator_set_with_locator ls1 host-intervpp1 1 1 +lisp_local_eid eid 6:0:1::0/64 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp2.config b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp2.config new file mode 100644 index 0000000..bb1d78d --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/sd/overwrite/6o4/vpp2.config @@ -0,0 +1,7 @@ +create_host_iface vpp2 6:0:2::1/64 +create_host_iface intervpp2 6.0.3.2/24 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-intervpp2 1 1 +lisp_local_eid eid 6:0:2::0/64 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/vpp_lite_topo/config.sh b/tests/data_plane/vpp_lite_topo/config.sh index a4709f0..2c58007 100644 --- a/tests/data_plane/vpp_lite_topo/config.sh +++ b/tests/data_plane/vpp_lite_topo/config.sh @@ -135,6 +135,17 @@ function assert_rc_ok # assert_rc_ok rc cleanup_fcn error_msg if [ $1 -ne 0 ] ; then echo $3 + maybe_pause + $2 + exit $test_result + fi +} + +function assert_rc_not_ok +{ + if [ $1 -eq 0 ] ; then + echo $3 + maybe_pause $2 exit $test_result fi diff --git a/tests/data_plane/vpp_lite_topo/run.sh b/tests/data_plane/vpp_lite_topo/run.sh index f57e4a2..942acf8 100755 --- a/tests/data_plane/vpp_lite_topo/run.sh +++ b/tests/data_plane/vpp_lite_topo/run.sh @@ -85,7 +85,7 @@ do # run the test case base_name=`basename -a "$test_case"` - printf "*** %2d/%d : %-45s" $count $test_num "$base_name" + printf "*** %2d/%d : %-48s" $count $test_num "$base_name" if [ $verbose -ne 0 ] ; then "$test_case" diff --git a/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py b/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py index d0d9f0f..62cde11 100644 --- a/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py +++ b/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py @@ -37,9 +37,6 @@ class CustomMapping(SimpleMapping): class RepeatableLocators(SimpleMapping): - def append_locs(self, locs): - pass - def generate(self, mode, args): name = args[:args.index(' ')] # first word is ls name locs = args[args.index(' '):] @@ -59,6 +56,7 @@ SimpleMapping('lisp_local_eid', 'lisp eid-table', 'lisp_add_del_local_eid') SimpleMapping('lisp_remote_mapping', 'lisp remote-mapping', 'lisp_add_del_remote_mapping') SimpleMapping('lisp_pitr', 'lisp pitr ls', 'lisp_pitr_set_locator_set locator-set') SimpleMapping('lisp_adjacency', 'lisp adjacency', 'lisp_add_del_adjacency') +SimpleMapping('lisp_map_request_mode', 'lisp map-request mode', 'lisp_map_request_mode') SimpleMapping('set_if_ip', 'set int ip address', 'sw_interface_add_del_address') CustomMapping('lisp_eid_map_bd', diff --git a/tests/data_plane/vpp_lite_topo/test_driver/rtr_single_iface.sh b/tests/data_plane/vpp_lite_topo/test_driver/rtr_single_iface.sh index 8ec9320..692e9d4 100644 --- a/tests/data_plane/vpp_lite_topo/test_driver/rtr_single_iface.sh +++ b/tests/data_plane/vpp_lite_topo/test_driver/rtr_single_iface.sh @@ -1,14 +1,14 @@ source config.sh source odl_utils.sh -source topologies/rtr_single_iface.sh +source topologies/3_node_star.sh # set odl config json file names; they are common among all rtr tests ODL_CONFIG_FILE1="elp1.json" ODL_CONFIG_FILE2="elp2.json" if [ "$1" == "clean" ] ; then - rtr_single_iface_clean + 3_node_star_topo_clean exit 0 fi @@ -18,7 +18,7 @@ if [[ $(id -u) != 0 ]]; then fi function test_rtr_single_iface { - rtr_single_iface_setup + 3_node_star_topo_setup maybe_pause @@ -28,7 +28,7 @@ function test_rtr_single_iface { rc=$? maybe_pause - rtr_single_iface_clean + 3_node_star_topo_clean print_status $rc "No ICMP response!" exit $test_result diff --git a/tests/data_plane/vpp_lite_topo/test_driver/src_dst.sh b/tests/data_plane/vpp_lite_topo/test_driver/src_dst.sh new file mode 100644 index 0000000..14654ad --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_driver/src_dst.sh @@ -0,0 +1,96 @@ +source config.sh +source odl_utils.sh +source topologies/3_node_star.sh + +ODL_CONFIG_FILE1="map1.json" +ODL_CONFIG_FILE2="map2.json" + +if [ "$1" == "clean" ] ; then + 3_node_star_topo_clean + exit 0 +fi + +if [[ $(id -u) != 0 ]]; then + echo "Error: run this as a root." + exit 1 +fi + +function send_ping_from_ns +{ + ip netns exec "${1}" "${2}" -w 20 -c 1 "${3}" + assert_rc_ok $? 3_node_star_topo_clean "No ICMP Response!" +} + +function test_src_dst +{ + 3_node_star_topo_setup + post_curl "add-mapping" "map3.json" + post_curl "add-mapping" "map4.json" + + maybe_pause + + test_result=1 + + # send ping for first EID + send_ping_from_ns vpp-ns1 ${1} ${2} + + # TODO assert counters + + maybe_pause + + # send ping for second EID + send_ping_from_ns vpp-ns3 ${1} ${2} + + maybe_pause + + # verify first tunnel still works + send_ping_from_ns vpp-ns1 ${1} ${2} + + maybe_pause + + # verify second tunnel still works + send_ping_from_ns vpp-ns3 ${1} ${2} + rc=$? + + maybe_pause + 3_node_star_topo_clean + print_status $rc "No ICM response!" + exit $test_result +} + +function test_src_dst_l2 +{ + 3_node_star_topo_setup + post_curl "add-mapping" "map3.json" + post_curl "add-mapping" "map4.json" + + maybe_pause + + test_result=1 + + # send ping for first EID + send_ping_from_ns vpp-ns5 ${1} ${2} + + # TODO assert counters + + maybe_pause + + # send ping for second EID + send_ping_from_ns vpp-ns8 ${1} ${2} + + maybe_pause + + # verify first tunnel still works + send_ping_from_ns vpp-ns5 ${1} ${2} + + maybe_pause + + # verify second tunnel still works + send_ping_from_ns vpp-ns8 ${1} ${2} + rc=$? + + maybe_pause + 3_node_star_topo_clean + print_status $rc "No ICM response!" + exit $test_result +} diff --git a/tests/data_plane/vpp_lite_topo/test_driver/src_dst_overwrite.sh b/tests/data_plane/vpp_lite_topo/test_driver/src_dst_overwrite.sh new file mode 100644 index 0000000..e7bf1a2 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_driver/src_dst_overwrite.sh @@ -0,0 +1,92 @@ +source config.sh +source odl_utils.sh +source topologies/2_node_topo.sh + +ODL_CONFIG_FILE1="map1.json" +ODL_CONFIG_FILE2="map2.json" + +if [ "$1" == "clean" ] ; then + 2_node_topo_clean + exit 0 +fi + +if [[ $(id -u) != 0 ]]; then + echo "Error: run this as a root." + exit 1 +fi + +function send_ping_from_ns +{ + ip netns exec "${1}" "${2}" -w 20 -c 1 "${3}" + assert_rc_ok $? 2_node_topo_clean "No ICMP Response!" +} + +function send_ping_from_ns_expect_failure +{ + ip netns exec "${1}" "${2}" -w 10 -c 1 "${3}" + assert_rc_not_ok $? 2_node_topo_clean "Reply received, but failure expected!" +} + +function remove_sd_mapping { + curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 1e4f00f4-74eb-20d7-97da-89963f37713b" -d '{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "'$1'", + "dest": "'$2'" + } + } + } +}' "http://${ODL_IP}:8181/restconf/operations/odl-mappingservice:remove-mapping" +} + +function remove_mapping1 { +curl -X DELETE -H "Content-Type: application/json" -H "Cache-Control: no-cache" "http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database/virtual-network-identifier/0/mapping/${1}/northbound/" +} + +function test_src_dst_overwrite +{ + 2_node_topo_setup + + maybe_pause + + test_result=1 + + # send ping request + send_ping_from_ns vppns1 ${1} ${2} + + maybe_pause + + # Replace ODL mapping with negative one + post_curl "add-mapping" "replace1.json" + remove_sd_mapping "6.0.1.0/24" "6.0.2.0/24" + + # wait for SMR being resolved + sleep 2 + + maybe_pause + + # now ping should fail + send_ping_from_ns_expect_failure vppns1 ${1} ${2} + + maybe_pause + + # Replace ODL mapping with positive one + post_curl "add-mapping" "replace2.json" + remove_sd_mapping "6.0.0.0/16" "6.0.2.0/24" + + # wait for SMR being resolved + sleep 2 + + maybe_pause + + # expect ping reply again + send_ping_from_ns vppns1 ${1} ${2} + rc=$? + + maybe_pause + 2_node_topo_clean + print_status $rc "No ICM response!" + exit $test_result +} diff --git a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4.sh index 465a014..2ccf008 100755 --- a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4.sh +++ b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4.sh @@ -17,4 +17,4 @@ ODL_CONFIG_DIR=`pwd`"/../configs/odl/rtr_single_iface/4o4" source test_driver/rtr_single_iface.sh -test_rtr_single_iface ping "6.0.4.4" +test_rtr_single_iface ping "6.0.2.2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o6.sh b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o6.sh index 1bc2474..f23bc32 100755 --- a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o6.sh +++ b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o6.sh @@ -17,4 +17,4 @@ ODL_CONFIG_DIR=`pwd`"/../configs/odl/rtr_single_iface/4o6" source test_driver/rtr_single_iface.sh -test_rtr_single_iface ping "6.0.4.4" +test_rtr_single_iface ping "6.0.2.2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o4.sh index ced8729..b1424ee 100755 --- a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o4.sh +++ b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o4.sh @@ -16,4 +16,4 @@ ODL_CONFIG_DIR=`pwd`"/../configs/odl/rtr_single_iface/6o4" source test_driver/rtr_single_iface.sh -test_rtr_single_iface ping6 "6:0:4::4" +test_rtr_single_iface ping6 "6:0:2::2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o6.sh b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o6.sh index 184c4ac..3445fa8 100755 --- a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o6.sh +++ b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_6o6.sh @@ -17,4 +17,4 @@ ODL_CONFIG_DIR=`pwd`"/../configs/odl/rtr_single_iface/6o6" source test_driver/rtr_single_iface.sh -test_rtr_single_iface ping6 "6:0:4::4" +test_rtr_single_iface ping6 "6:0:2::2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_src_dst_4o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_4o4.sh new file mode 100755 index 0000000..2786328 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_4o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test LISP source/destination feature (ip4 over ip4) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/4o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/4o4 + +source test_driver/src_dst.sh + +test_src_dst ping "6.0.2.2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_src_dst_6o6.sh b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_6o6.sh new file mode 100755 index 0000000..baaa8f2 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_6o6.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test LISP source/destination feature (ip4 over ip4) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/6o6 +ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/6o6 + +source test_driver/src_dst.sh + +test_src_dst ping6 "6:0:2::2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_4o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_4o4.sh new file mode 100755 index 0000000..5909e88 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_4o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test for overwriting remote mappings from the LISP map-cache + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/4o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite/4o4 + +source test_driver/src_dst_overwrite.sh + +test_src_dst_overwrite ping "6.0.2.2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_6o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_6o4.sh new file mode 100755 index 0000000..6ec47db --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_identical_ippref_overwrite_6o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test for overwriting remote mappings from the LISP map-cache + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/6o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite/6o4 + +source test_driver/src_dst_overwrite.sh + +test_src_dst_overwrite ping6 "6:0:2::2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_src_dst_l2o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_l2o4.sh new file mode 100755 index 0000000..38c1261 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_l2o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test LISP source/destination feature (ip4 over ip4) + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/l2o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/l2o4 + +source test_driver/src_dst.sh + +test_src_dst_l2 ping "6.0.10.22" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_4o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_4o4.sh new file mode 100755 index 0000000..d62aff6 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_4o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test for overwriting remote mappings from the LISP map-cache + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/4o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite_superset/4o4 + +source test_driver/src_dst_overwrite.sh + +test_src_dst_overwrite ping "6.0.2.2" diff --git a/tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_6o4.sh b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_6o4.sh new file mode 100755 index 0000000..752ea9b --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_src_dst_superset_ippref_overwrite_6o4.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Test for overwriting remote mappings from the LISP map-cache + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/sd/overwrite/6o4 +ODL_CONFIG_DIR=`pwd`/../configs/odl/sd/overwrite_superset/6o4 + +source test_driver/src_dst_overwrite.sh + +test_src_dst_overwrite ping6 "6:0:2::2" diff --git a/tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh b/tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh new file mode 100644 index 0000000..9f23315 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh @@ -0,0 +1,240 @@ +#!/usr/bin/env bash + +# +--------+ +# | | +# 6.0.10.25 | MR | +# 08:55:55:55:55:55 | | +# + +--------+ +# | |6.0.3.100 +# 6:0:1::2 |vpp8 |6:0:3::100 +# 6.0.1.2 vpp1 +-+------+ | +--------+ +# +---------+ |xtr1 | xtr2 | |vpp2 +# | VPP1 +----------+---------+ VPP2 +---------+ +# +---------+ | | | | 6.0.2.2 +# 6.0.5.5 vpp3 +-+------+ | +-----+--+ 6:0:2::2 +# 6:0:5::5 |vpp5 |xtr3 |vpp7 +# | +--------+ | +# + | | + 6.0.10.22 +# 6.0.10.21 | VPP3 | 08:22:22:22:22:22 +# 08:11:11:11:11:11 | | +# +-+----+-+ +# vpp6| |vpp4 +# | | +# | +6.0.2.2 +# + 6:0:2::2 +# 6.0.10.22 +# 08:22:22:22:22:22 +# + + +function 3_node_star_topo_clean +{ + echo "Clearing all VPP instances.." + pkill vpp --signal 9 + + rm /dev/shm/* + + echo "Cleaning 3 node star topology..." + ip netns exec xtr-ns ifconfig vppbr1 down + ip netns exec xtr-ns brctl delbr vppbr1 + ip link del dev vpp1 &> /dev/null + ip link del dev vpp2 &> /dev/null + ip link del dev vpp3 &> /dev/null + ip link del dev vpp4 &> /dev/null + ip link del dev vpp5 &> /dev/null + ip link del dev vpp6 &> /dev/null + ip link del dev vpp7 &> /dev/null + ip link del dev vpp8 &> /dev/null + ip link del dev xtr1 &> /dev/null + ip link del dev xtr2 &> /dev/null + ip link del dev xtr3 &> /dev/null + ip link del dev odl &> /dev/null + + ip netns del vpp-ns1 &> /dev/null + ip netns del vpp-ns2 &> /dev/null + ip netns del vpp-ns3 &> /dev/null + ip netns del vpp-ns4 &> /dev/null + ip netns del vpp-ns5 &> /dev/null + ip netns del vpp-ns6 &> /dev/null + ip netns del vpp-ns7 &> /dev/null + ip netns del vpp-ns8 &> /dev/null + ip netns del xtr-ns &> /dev/null + + odl_clear_all +} + +function set_arp +{ + mac1=`ip netns exec vpp-ns5 ip a show dev veth_vpp5 | grep "link/ether" | awk '{print $2}'` + ip netns exec vpp-ns6 arp -s 6.0.10.21 $mac1 + + mac2=`ip netns exec vpp-ns8 ip a show dev veth_vpp8 | grep "link/ether" | awk '{print $2}'` + ip netns exec vpp-ns7 arp -s 6.0.10.25 $mac2 + + mac3=`ip netns exec vpp-ns7 ip a show dev veth_vpp7 | grep "link/ether" | awk '{print $2}'` + ip netns exec vpp-ns5 arp -s 6.0.10.22 $mac3 + ip netns exec vpp-ns8 arp -s 6.0.10.22 $mac3 +} + +function 3_node_star_topo_setup +{ + ip netns add vpp-ns1 + ip netns add vpp-ns2 + ip netns add vpp-ns3 + ip netns add vpp-ns4 + ip netns add vpp-ns5 + ip netns add vpp-ns6 + ip netns add vpp-ns7 + ip netns add vpp-ns8 + ip netns add xtr-ns + + ip link add veth_xtr1 type veth peer name xtr1 + ip link add veth_xtr2 type veth peer name xtr2 + ip link add veth_xtr3 type veth peer name xtr3 + ip link add veth_odl type veth peer name odl + ip link set dev xtr1 up + ip link set dev xtr2 up + ip link set dev xtr3 up + ip link set dev odl up + + ip link set dev veth_xtr1 up netns xtr-ns + ip link set dev veth_xtr2 up netns xtr-ns + ip link set dev veth_xtr3 up netns xtr-ns + ip link set dev veth_odl up netns xtr-ns + + ip netns exec xtr-ns brctl addbr vppbr1 + ip netns exec xtr-ns brctl addif vppbr1 veth_xtr1 + ip netns exec xtr-ns brctl addif vppbr1 veth_xtr2 + ip netns exec xtr-ns brctl addif vppbr1 veth_xtr3 + ip netns exec xtr-ns brctl addif vppbr1 veth_odl + ip netns exec xtr-ns ifconfig vppbr1 up + + ip link add veth_vpp1 type veth peer name vpp1 + ip link set dev vpp1 up + ip link set dev veth_vpp1 up netns vpp-ns1 + + ip netns exec vpp-ns1 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.1.2/24 dev veth_vpp1 + ip addr add 6:0:1::2/64 dev veth_vpp1 + ip route add 6.0.2.0/24 via 6.0.1.1 + ip route add 6:0:2::0/64 via 6:0:1::1 + " + + ip link add veth_vpp2 type veth peer name vpp2 + ip link set dev vpp2 up + ip link set dev veth_vpp2 up netns vpp-ns2 + + ip netns exec vpp-ns2 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.2.2/24 dev veth_vpp2 + ip addr add 6:0:2::2/64 dev veth_vpp2 + ip route add 6.0.1.0/24 via 6.0.2.1 + ip route add 6:0:1::0/64 via 6:0:2::1 + " + + ip link add veth_vpp3 type veth peer name vpp3 + ip link set dev vpp3 up + ip link set dev veth_vpp3 up netns vpp-ns3 + + ip netns exec vpp-ns3 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.5.5/24 dev veth_vpp3 + ip addr add 6:0:5::5/64 dev veth_vpp3 + ip route add 6.0.2.0/24 via 6.0.5.1 + ip route add 6:0:2::0/64 via 6:0:5::1 + " + + ip link add veth_vpp4 type veth peer name vpp4 + ip link set dev vpp4 up + ip link set dev veth_vpp4 up netns vpp-ns4 + + ip netns exec vpp-ns4 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.2.2/24 dev veth_vpp4 + ip addr add 6:0:2::2/64 dev veth_vpp4 + ip route add 6.0.5.0/24 via 6.0.2.1 + ip route add 6:0:5::0/64 via 6:0:2::1 + " + + ip link add veth_vpp5 type veth peer name vpp5 + ip link set dev vpp5 up + ip link set dev veth_vpp5 address 08:11:11:11:11:11 + ip link set dev veth_vpp5 up netns vpp-ns5 + + ip netns exec vpp-ns5 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.10.21/24 dev veth_vpp5 + " + + ip link add veth_vpp6 type veth peer name vpp6 + ip link set dev vpp6 up + ip link set dev veth_vpp6 address 08:22:22:22:22:22 + ip link set dev veth_vpp6 up netns vpp-ns6 + + ip netns exec vpp-ns6 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.10.22/24 dev veth_vpp6 + " + + ip link add veth_vpp7 type veth peer name vpp7 + ip link set dev vpp7 up + ip link set dev veth_vpp7 address 08:22:22:22:22:22 + ip link set dev veth_vpp7 up netns vpp-ns7 + + ip netns exec vpp-ns7 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.10.22/24 dev veth_vpp7 + " + + ip link add veth_vpp8 type veth peer name vpp8 + ip link set dev vpp8 up + ip link set dev veth_vpp8 address 08:55:55:55:55:55 + ip link set dev veth_vpp8 up netns vpp-ns8 + + ip netns exec vpp-ns8 \ + bash -c " + ip link set dev lo up + ip addr add 6.0.10.25/24 dev veth_vpp8 + " + + 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 +maybe_pause + # generate config files + ./scripts/generate_config.py ${VPP_LITE_CONF} ${CFG_METHOD} + + start_vpp 5002 vpp1 + start_vpp 5003 vpp2 + start_vpp 5004 vpp3 + + echo "* Selected configuration method: $CFG_METHOD" + if [ "$CFG_METHOD" == "cli" ] ; then + echo "exec ${VPP_LITE_CONF}/vpp1.cli" | nc 0 5002 + echo "exec ${VPP_LITE_CONF}/vpp2.cli" | nc 0 5003 + echo "exec ${VPP_LITE_CONF}/vpp3.cli" | nc 0 5004 + elif [ "$CFG_METHOD" == "vat" ] ; then + sleep 2 + ${VPP_API_TEST} chroot prefix vpp1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix vpp2 script in ${VPP_LITE_CONF}/vpp2.vat + ${VPP_API_TEST} chroot prefix vpp3 script in ${VPP_LITE_CONF}/vpp3.vat + else + echo "=== WARNING:" + echo "=== Invalid configuration method selected!" + echo "=== To resolve this set env variable CFG_METHOD to vat or cli." + echo "===" + fi + + post_curl "add-mapping" ${ODL_CONFIG_FILE1} + post_curl "add-mapping" ${ODL_CONFIG_FILE2} + + set_arp +} 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 630651f..15ad7af 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 @@ -95,6 +95,8 @@ function basic_topo_setup start_vpp 5002 vpp1 start_vpp 5003 vpp2 + maybe_pause + echo "* Selected configuration method: $CFG_METHOD" if [ "$CFG_METHOD" == "cli" ] ; then echo "exec ${VPP_LITE_CONF}/vpp1.cli" | nc 0 5002 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 deleted file mode 100644 index 4c3e9ca..0000000 --- a/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash - -function rtr_single_iface_clean { - echo "Clearing all VPP instances.." - pkill vpp --signal 9 - - rm /dev/shm/* - - echo "Cleaning RTR topology.." - ip netns exec xtr-rtr-ns ifconfig vppbr1 down - ip netns exec xtr-rtr-ns brctl delbr vppbr1 - ip link del dev vpp1 &> /dev/null - ip link del dev vpp2 &> /dev/null - ip link del dev xtr_rtr1 &> /dev/null - ip link del dev xtr_rtr2 &> /dev/null - ip link del dev xtr_rtr3 &> /dev/null - ip link del dev odl &> /dev/null - - ip netns del vpp-ns1 &> /dev/null - ip netns del vpp-ns2 &> /dev/null - ip netns del xtr-rtr-ns &> /dev/null - - odl_clear_all -} - -function rtr_single_iface_setup { - ip netns add vpp-ns1 - ip netns add vpp-ns2 - ip netns add xtr-rtr-ns - - ip link add veth_xtr_rtr1 type veth peer name xtr_rtr1 - ip link add veth_xtr_rtr2 type veth peer name xtr_rtr2 - ip link add veth_xtr_rtr3 type veth peer name xtr_rtr3 - ip link add veth_odl type veth peer name odl - ip link set dev xtr_rtr1 up - ip link set dev xtr_rtr2 up - ip link set dev xtr_rtr3 up - ip link set dev odl up - - ip link set dev veth_xtr_rtr1 up netns xtr-rtr-ns - ip link set dev veth_xtr_rtr2 up netns xtr-rtr-ns - ip link set dev veth_xtr_rtr3 up netns xtr-rtr-ns - ip link set dev veth_odl up netns xtr-rtr-ns - - ip netns exec xtr-rtr-ns brctl addbr vppbr1 - ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_xtr_rtr1 - ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_xtr_rtr2 - ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_xtr_rtr3 - ip netns exec xtr-rtr-ns brctl addif vppbr1 veth_odl - ip netns exec xtr-rtr-ns ifconfig vppbr1 up - - ip link add veth_vpp1 type veth peer name vpp1 - ip link set dev vpp1 up - ip link set dev veth_vpp1 up netns vpp-ns1 - - ip netns exec vpp-ns1 \ - bash -c " - ip link set dev lo up - ip addr add 6.0.2.2/24 dev veth_vpp1 - ip addr add 6:0:2::2/64 dev veth_vpp1 - ip route add 6.0.4.0/24 via 6.0.2.1 - ip route add 6:0:4::0/64 via 6:0:2::1 - " - - ip link add veth_vpp2 type veth peer name vpp2 - ip link set dev vpp2 up - ip link set dev veth_vpp2 up netns vpp-ns2 - - ip netns exec vpp-ns2 \ - bash -c " - ip link set dev lo up - ip addr add 6.0.4.4/24 dev veth_vpp2 - ip addr add 6:0:4::4/64 dev veth_vpp2 - ip route add 6.0.2.0/24 via 6.0.4.1 - ip route add 6:0:2::0/64 via 6:0:4::1 - " - - 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 - - # generate config files - ./scripts/generate_config.py ${VPP_LITE_CONF} ${CFG_METHOD} - - start_vpp 5002 vpp1 - start_vpp 5003 vpp2 - start_vpp 5004 vpp3 - - echo "* Selected configuration method: $CFG_METHOD" - if [ "$CFG_METHOD" == "cli" ] ; then - echo "exec ${VPP_LITE_CONF}/vpp1.cli" | nc 0 5002 - echo "exec ${VPP_LITE_CONF}/vpp2.cli" | nc 0 5003 - echo "exec ${VPP_LITE_CONF}/vpp3.cli" | nc 0 5004 - elif [ "$CFG_METHOD" == "vat" ] ; then - sleep 2 - ${VPP_API_TEST} chroot prefix vpp1 script in ${VPP_LITE_CONF}/vpp1.vat - ${VPP_API_TEST} chroot prefix vpp2 script in ${VPP_LITE_CONF}/vpp2.vat - ${VPP_API_TEST} chroot prefix vpp3 script in ${VPP_LITE_CONF}/vpp3.vat - else - echo "=== WARNING:" - echo "=== Invalid configuration method selected!" - echo "=== To resolve this set env variable CFG_METHOD to vat or cli." - echo "===" - fi - - post_curl "add-mapping" ${ODL_CONFIG_FILE1} - post_curl "add-mapping" ${ODL_CONFIG_FILE2} -} -- cgit 1.2.3-korg