aboutsummaryrefslogtreecommitdiffstats
path: root/tests/func/lisp/ipv4_lispgpe_ipv4.robot
diff options
context:
space:
mode:
Diffstat (limited to 'tests/func/lisp/ipv4_lispgpe_ipv4.robot')
-rw-r--r--tests/func/lisp/ipv4_lispgpe_ipv4.robot87
1 files changed, 51 insertions, 36 deletions
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