diff options
author | Zdeno Olsovsky <zolsovsk@cisco.com> | 2016-10-19 09:16:31 +0200 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-11-04 09:17:54 +0000 |
commit | 029a50e37499ba7c1dd121a9613799b520e0fc65 (patch) | |
tree | fef1f2a6a63db44a71185cace6c1c2cd4b93b1f0 | |
parent | 6bfae6634aa26c2e88dddf49d91245d880b0222b (diff) |
CSIT-451 LISP vrf tests rework
Change-Id: I2dac2eaff828672c2d921e889356b70baed5f4da
Signed-off-by: Zdeno Olsovsky <zolsovsk@cisco.com>
6 files changed, 139 insertions, 106 deletions
diff --git a/resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py b/resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py index 244f042f03..9ec54c5d4b 100644 --- a/resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py +++ b/resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py @@ -50,8 +50,8 @@ dut2_ip4_eid = {'locator_name': locator_name, 'eid': '6.6.2.0', 'prefix': 24} -dut1_fib_table = '1' -dut2_fib_table = '2' +fib_table_1 = 1 +dut1_dut2_vni = 1 dut2_spi = 1000 dut1_spi = 1001 diff --git a/resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py b/resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py index f3754e228b..f1ad6e51a5 100644 --- a/resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py +++ b/resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py @@ -42,6 +42,9 @@ dst_ip_range = '6.0.5.0' vm1_vif1_mac = '52:54:00:00:04:01' vm1_vif2_mac = '52:54:00:00:04:02' + +vhost_ip = '6.0.1.3' + prefix4 = 24 dut1_to_dut2_ip4_static_adjacency = {'vni': 0, @@ -64,8 +67,8 @@ dut2_ip4_eid = {'locator_name': locator_name, 'eid': dst_ip_range, 'prefix': prefix4} -dut1_fib_table = 1 -dut2_fib_table = 2 +fib_table_1 = 1 +dut1_dut2_vni = 1 sock1 = "/tmp/sock1" sock2 = "/tmp/sock2" diff --git a/resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py b/resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py index e3206c2bc9..fcb27ae0cc 100644 --- a/resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py +++ b/resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py @@ -30,6 +30,8 @@ tg1_ip6 = '2001:cdba:1::2' tg2_ip6 = '2001:cdba:2::2' prefix6 = 64 +vhost_ip = '2001:cdba:1::9' + dut1_to_dut2_ip6_static_adjacency = {'vni': 0, 'deid': '2001:cdba:2::0', 'rloc': '2001:cdba:3::2', @@ -50,8 +52,8 @@ dut2_ip6_eid = {'locator_name': locator_name, 'eid': '2001:cdba:2::0', 'prefix': 64} -dut1_fib_table = '1' -dut2_fib_table = '2' +fib_table_1 = 1 +dut1_dut2_vni = 1 sock1 = "/tmp/sock1" sock2 = "/tmp/sock2" diff --git a/tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot b/tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot index cbd139cefd..2db8c631a1 100644 --- a/tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot +++ b/tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot @@ -15,6 +15,7 @@ | Library | resources.libraries.python.topology.Topology | Library | resources.libraries.python.NodePath | Library | resources.libraries.python.Trace +| Library | resources.libraries.python.VPPUtil | Resource | resources/libraries/robot/traffic.robot | Resource | resources/libraries/robot/default.robot | Resource | resources/libraries/robot/interfaces.robot @@ -22,6 +23,7 @@ | Resource | resources/libraries/robot/vrf.robot | Resource | resources/libraries/robot/ipsec.robot | Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/lisp/l2lisp.robot # Import configuration and test data: | Variables | resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py | ... @@ -32,8 +34,8 @@ | ... | AND | Update All Interface Data On All Nodes | ${nodes} | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | ... | AND | Show vpp trace dump on all DUTs -| ... | AND | VPP Show Errors | ${nodes['DUT1']} -| ... | AND | VPP Show Errors | ${nodes['DUT2']} +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} | ... | Documentation | *IPv4-ip4-ipsec-lispgpe-ip4 - main fib, vrf (gpe_vni-to-vrf) | ... @@ -61,8 +63,6 @@ | | ... | received packets are correct. | | ... | [Ref] RFC6830, RFC4303. | | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | ${encr_alg}= | Crypto Alg AES CBC 128 | | ${auth_alg}= | Integ Alg SHA1 96 | | Given Setup 3-node Topology @@ -104,8 +104,6 @@ | | ... | received packets are correct. | | ... | [Ref] RFC6830, RFC4303. | | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | ${encr_alg}= | Crypto Alg AES CBC 128 | | ${auth_alg}= | Integ Alg SHA1 96 | | Given Setup 3-node Topology @@ -149,17 +147,10 @@ | | ... | received packets are correct. | | ... | [Ref] RFC6830, RFC4303. | | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | ${encr_alg}= | Crypto Alg AES CBC 128 | | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology -| | And Setup VRF on DUT | ${dut1_node} | ${dut1_fib_table} | ${dut1_to_dut2} -| | ... | ${dut2_to_dut1_ip4} | ${dut2_to_dut1_mac} | ${tg2_ip4} | ${dut1_to_tg} -| | ... | ${tg1_ip4} | ${tg_to_dut1_mac} | ${prefix4} -| | And Setup VRF on DUT | ${dut2_node} | ${dut2_fib_table} | ${dut2_to_dut1} -| | ... | ${dut1_to_dut2_ip4} | ${dut1_to_dut2_mac} | ${tg1_ip4} | ${dut2_to_tg} -| | ... | ${tg2_ip4} | ${tg_to_dut2_mac} | ${prefix4} +| | Given Setup 3-node Topology | ${fib_table_1} +| | And Add IP Neighbors | ${fib_table_1} | | When IPsec Generate Keys | ${encr_alg} | ${auth_alg} | | And Set up LISP GPE topology | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} @@ -167,6 +158,7 @@ | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} | | ... | ${dut1_to_dut2_ip4_static_adjacency} | | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} | | And VPP Setup IPsec Manual Keyed Connection | | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} @@ -197,25 +189,17 @@ | | ... | received packets are correct. | | ... | [Ref] RFC6830, RFC4303. | | ... -| | [teardown] | Run keyword if test passed | Fail | Feature not implemented -| | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | ${encr_alg}= | Crypto Alg AES CBC 128 | | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology -| | And Setup VRF on DUT | ${dut1_node} | ${dut1_fib_table} | ${dut1_to_dut2} -| | ... | ${dut2_to_dut1_ip4} | ${dut2_to_dut1_mac} | ${tg2_ip4} | ${dut1_to_tg} -| | ... | ${tg1_ip4} | ${tg_to_dut1_mac} | ${prefix4} -| | And Setup VRF on DUT | ${dut2_node} | ${dut2_fib_table} | ${dut2_to_dut1} -| | ... | ${dut1_to_dut2_ip4} | ${dut1_to_dut2_mac} | ${tg1_ip4} | ${dut2_to_tg} -| | ... | ${tg2_ip4} | ${tg_to_dut2_mac} | ${prefix4} +| | Given Setup 3-node Topology | ${fib_table_1} +| | And Add IP Neighbors | ${fib_table_1} | | And Set up LISP GPE topology | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} | | ... | ${dut1_to_dut2_ip4_static_adjacency} | | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} | | When IPsec Generate Keys | ${encr_alg} | ${auth_alg} | | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.Get sw if index | | ... | ${dut1_node} | lisp_gpe0 @@ -240,11 +224,18 @@ | Setup 3-node Topology | | [Documentation] | | ... | Setup 3-node topology for this test suite. Set all physical\ -| | ... | interfaces up and assing IP adresses to them. +| | ... | interfaces up and assing IP adresses to them.\ +| | ... | You can specify fib table ID where the DUT-TG interfaces assign to.\ +| | ... | Default is 0. | | ... +| | [Arguments] | ${fib_table}=0 | | Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | Interfaces in 3-node path are up +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table} +| | Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table} | | Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | | ... | ${prefix4} | | Set Interface Address | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} @@ -256,12 +247,14 @@ | Add IP Neighbors | | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs. +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. | | ... +| | [Arguments] | ${fib_id}=0 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut1_mac} | ${fib_id} | | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} +| | ... | ${tg_to_dut2_mac} | ${fib_id} | | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} | | ... | ${dut2_to_dut1_mac} | | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} diff --git a/tests/func/lisp/ipv4_lispgpe_ipv4.robot b/tests/func/lisp/ipv4_lispgpe_ipv4.robot index 13af66f862..7810cf4db4 100644 --- a/tests/func/lisp/ipv4_lispgpe_ipv4.robot +++ b/tests/func/lisp/ipv4_lispgpe_ipv4.robot @@ -16,6 +16,7 @@ | Library | resources.libraries.python.NodePath | Library | resources.libraries.python.Trace | Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VPPUtil | Library | resources.libraries.python.InterfaceUtil | Library | resources.libraries.python.VhostUser | Resource | resources/libraries/robot/traffic.robot @@ -37,8 +38,8 @@ | ... | AND | Update All Interface Data On All Nodes | ${nodes} | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | ... | AND | Show vpp trace dump on all DUTs -| ... | AND | VPP Show Errors | ${nodes['DUT1']} -| ... | AND | VPP Show Errors | ${nodes['DUT2']} +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} | ... | Documentation | *ip4-lispgpe-ip4 encapsulation test cases* | ... @@ -111,32 +112,29 @@ | | ... | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} -| | ... | AND | Run keyword if test passed | Fail -| | ... -| | [Tags] | EXPECTED_FAILING +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} | | ... | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | And Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} +| | Add IP Neighbors | ${fib_table_1} | | And IP addresses are set on interfaces | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | When Setup VRF on DUT | ${dut1_node} | ${dut1_fib_table} | ${dut1_to_dut2} -| | ... | ${dut2_to_dut1_ip4} | ${dut2_to_dut1_mac} | ${tg2_ip4} | ${dut1_to_tg} -| | ... | ${tg1_ip4} | ${tg_to_dut1_mac} | ${prefix4} -| | And Setup VRF on DUT | ${dut2_node} | ${dut2_fib_table} | ${dut2_to_dut1} -| | ... | ${dut1_to_dut2_ip4} | ${dut1_to_dut2_mac} | ${tg1_ip4} | ${dut2_to_tg} -| | ... | ${tg2_ip4} | ${tg_to_dut2_mac} | ${prefix4} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} | | Then Send Packet And Check Headers | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} @@ -159,12 +157,10 @@ | | ... | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} | | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} | | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -211,33 +207,31 @@ | | ... | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} | | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} | | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up -| | When Setup VRF on DUT | ${dut1_node} | ${dut1_fib_table} | ${dut1_to_dut2} -| | ... | ${dut2_to_dut1_ip4} | ${dut2_to_dut1_mac} | ${tg2_ip4} | ${dut1_to_tg} -| | ... | ${tg1_ip4} | ${tg_to_dut1_mac} | ${prefix4} -| | And Setup VRF on DUT | ${dut2_node} | ${dut2_fib_table} | ${dut2_to_dut1} -| | ... | ${dut1_to_dut2_ip4} | ${dut1_to_dut2_mac} | ${tg1_ip4} | ${dut2_to_tg} -| | ... | ${tg2_ip4} | ${tg_to_dut2_mac} | ${prefix4} +| | And Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} +| | Add IP Neighbors | ${fib_table_1} | | And IP addresses are set on interfaces | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | And Set up LISP GPE topology +| | When Set up LISP GPE topology | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} | | ... | ${dut1_to_dut2_ip4_static_adjacency} | | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | And Setup Qemu DUT1 +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | And Setup Qemu DUT1 | ${fib_table_1} | | Then Send Packet And Check Headers | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} @@ -250,10 +244,16 @@ *** Keywords *** | Setup Qemu DUT1 | | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ -| | ... | Qemu and bridge the vhosts. +| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ +| | ... | where the vhost2 interface should be assigned to. +| | ... +| | [Arguments] | ${fib_table}=0 | | ... | | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} | | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${vhost2} | ${fib_table} | | Set Interface State | ${dut1_node} | ${vhost1} | up | | Set Interface State | ${dut1_node} | ${vhost2} | up | | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} @@ -264,3 +264,18 @@ | | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} | | Set test variable | ${dst_vhost_mac} | ${vhost_mac} | | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} + +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac}
\ No newline at end of file diff --git a/tests/func/lisp/ipv6_lispgpe_ipv6.robot b/tests/func/lisp/ipv6_lispgpe_ipv6.robot index c176b7908b..da78cb4453 100644 --- a/tests/func/lisp/ipv6_lispgpe_ipv6.robot +++ b/tests/func/lisp/ipv6_lispgpe_ipv6.robot @@ -17,6 +17,7 @@ | Library | resources.libraries.python.Trace | Library | resources.libraries.python.IPUtil | Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VPPUtil | Resource | resources/libraries/robot/traffic.robot | Resource | resources/libraries/robot/default.robot | Resource | resources/libraries/robot/interfaces.robot @@ -33,10 +34,11 @@ | Test Setup | Run Keywords | Setup all DUTs before test | ... | AND | Setup all TGs before traffic script | ... | AND | Update All Interface Data On All Nodes | ${nodes} +| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | ... | AND | Show vpp trace dump on all DUTs -| ... | AND | VPP Show Errors | ${nodes['DUT1']} -| ... | AND | VPP Show Errors | ${nodes['DUT2']} +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} | ... | Documentation | *ip6-lispgpe-ip6 encapsulation test cases* | ... @@ -77,13 +79,13 @@ | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} | | And Vpp Set If IPv6 Addr | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} | | ... | ${tg_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} | | ... | ${tg_to_dut2_mac} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} | | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} | | ... | ${dut1_to_dut2_mac} | | When Set up LISP GPE topology | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} @@ -115,12 +117,10 @@ | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up -| | When Setup VRF on DUT | ${dut1_node} | ${dut1_fib_table} | ${dut1_to_dut2} -| | ... | ${dut2_to_dut1_ip6} | ${dut2_to_dut1_mac} | ${tg2_ip6} | ${dut1_to_tg} -| | ... | ${tg1_ip6} | ${tg_to_dut1_mac} | ${prefix6} -| | And Setup VRF on DUT | ${dut2_node} | ${dut2_fib_table} | ${dut2_to_dut1} -| | ... | ${dut1_to_dut2_ip6} | ${dut1_to_dut2_mac} | ${tg1_ip6} | ${dut2_to_tg} -| | ... | ${tg2_ip6} | ${tg_to_dut2_mac} | ${prefix6} +| | And Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} | ipv6=${TRUE} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} | ipv6=${TRUE} | | And Vpp Set If IPv6 Addr | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} | | And Vpp Set If IPv6 Addr @@ -129,12 +129,14 @@ | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} | | And Vpp Set If IPv6 Addr | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Set up LISP GPE topology +| | And Add IP Neighbors | ${fib_table_1} +| | When Set up LISP GPE topology | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} | | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} | | ... | ${dut1_to_dut2_ip6_static_adjacency} | | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} | | Then Send Packet And Check Headers | | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} @@ -157,12 +159,10 @@ | | ... | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} | | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} | | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -174,13 +174,13 @@ | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} | | And Vpp Set If IPv6 Addr | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} | | ... | ${tg_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} | | ... | ${tg_to_dut2_mac} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} | | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} | | ... | ${dut1_to_dut2_mac} | | When Set up LISP GPE topology | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} @@ -212,21 +212,17 @@ | | ... | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} | | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} | | ... -| | [Tags] | EXPECTED_FAILING -| | ... | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up -| | When Setup VRF on DUT | ${dut1_node} | ${dut1_fib_table} | ${dut1_to_dut2} -| | ... | ${dut2_to_dut1_ip6} | ${dut2_to_dut1_mac} | ${tg2_ip6} | ${dut1_to_tg} -| | ... | ${tg1_ip6} | ${tg_to_dut1_mac} | ${prefix6} -| | And Setup VRF on DUT | ${dut2_node} | ${dut2_fib_table} | ${dut2_to_dut1} -| | ... | ${dut1_to_dut2_ip6} | ${dut1_to_dut2_mac} | ${tg1_ip6} | ${dut2_to_tg} -| | ... | ${tg2_ip6} | ${tg_to_dut2_mac} | ${prefix6} +| | And Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} | ipv6=${TRUE} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} | ipv6=${TRUE} | | And Vpp Set If IPv6 Addr | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} | | And Vpp Set If IPv6 Addr @@ -235,13 +231,15 @@ | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} | | And Vpp Set If IPv6 Addr | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Set up LISP GPE topology +| | And Add IP Neighbors | ${fib_table_1} +| | When Set up LISP GPE topology | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} | | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} | | ... | ${dut1_to_dut2_ip6_static_adjacency} | | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | And Setup Qemu DUT1 +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | And Setup Qemu DUT1 | ${fib_table_1} | | Then Send Packet And Check Headers | | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} @@ -254,10 +252,17 @@ *** Keywords *** | Setup Qemu DUT1 | | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ -| | ... | Qemu and bridge the vhosts. +| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ +| | ... | where the vhost2 interface should be assigned to. +| | ... +| | [Arguments] | ${fib_table}=0 | | ... | | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} | | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip} +| | ... | ${prefix6} +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${vhost2} | ${fib_table} | ipv6=${TRUE} | | Set Interface State | ${dut1_node} | ${vhost1} | up | | Set Interface State | ${dut1_node} | ${vhost2} | up | | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} @@ -268,3 +273,18 @@ | | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} | | Set test variable | ${dst_vhost_mac} | ${vhost_mac} | | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} + +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac}
\ No newline at end of file |